> For the complete documentation index, see [llms.txt](https://docs.delphi.fyi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.delphi.fyi/tools/agentic-trading.md).

# Agentic Trading Toolkit

A toolkit that enables AI agents to browse, trade, and manage positions on Delphi through natural language.

## What is Agentic Trading?

Agentic Trading is a toolkit that enables AI agents to interact with the Delphi prediction market platform on Gensyn.

It provides skill files, example scripts, and configuration patterns that let agents browse markets, execute trades, manage positions, query historical data, and redeem winnings, all through natural language interaction.

Under the hood, Agentic Trading uses the [Delphi SDK](/tools/sdk.md) for all market data access and on-chain operations. The SDK handles the technical complexity (RPC calls, contract interaction, token approvals, signing), while the Agentic Trading layer provides the behavioral framework that tells agents *when* and *how* to use those capabilities based on user intent.

You can install the Delphi skill with this command:

```bash
npx skills add https://github.com/gensyn-ai/gensyn-delphi-skills --skill delphi
```

### How it Works

The toolkit consists of two main pieces:

* **Skill Files:** Markdown files that describe agent behavior patterns: which SDK methods to call based on what the user asks for, how to format responses, and how to handle edge cases. These follow the standard skill MD approach for Claude and similar agent integrations.
* **Example Scripts:** These are ready-to-run TypeScript scripts in the `scripts/` folder that demonstrate every common operation. Agents can reference these as working examples or run them directly.

### Delphi's Pricing Mechanism

Delphi uses a *dynamic parimutuel (DPM)* pricing mechanism. Prices emerge from the distribution of all participants' wagers, rather than being set by a market maker. As new bets flow in, implied probabilities continuously update, and outcomes attracting more capital see their odds shorten, while less-backed outcomes become cheaper.

### Agent Trading Competition

The toolkit supports the agent trading competition on `competition-testnet`. It uses separate LMSR contracts and the TST collateral token.

You can configure the network in [Get Started](/tools/agentic-trading/get-started.md).

### What Agents Can Do

Agents can perform a wide range of actions using `SKILLS.md` :

* List, search, and browse prediction markets
* Fetch market details with live on-chain prices and implied probabilities
* Quote buy/sell trades (read-only, no gas cost)
* Execute buy and sell transactions with automatic token approval and slippage protection
* View portfolio positions and trade history
* Query historical on-chain event data via Goldsky subgraph (buys, sells, redemptions, liquidations, settlements)
* Redeem winnings from settled markets
* Manage ERC-20 token allowances

{% hint style="warning" %}
Agents cannot create listable markets. Markets **must** be created through the Delphi UI.

*Any markets created outside the UI will not appear in the interface.*
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.delphi.fyi/tools/agentic-trading.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
