> For the complete documentation index, see [llms.txt](https://docs.afx.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.afx.xyz/api-reference/agent-artifacts.md).

# Agent Artifacts

AFX DEX publishes machine-readable artifacts for coding agents, SDK generators, API clients, and AI-agent trading workflows.

## API Artifacts

| Artifact                        | Repo path                                              | Public raw URL                                                                                                 |
| ------------------------------- | ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |
| Combined REST OpenAPI           | `artifacts/openapi.json`                               | `https://raw.githubusercontent.com/afx-dex/afx-docs/main/artifacts/openapi.json`                               |
| Info API OpenAPI                | `artifacts/openapi-info.json`                          | `https://raw.githubusercontent.com/afx-dex/afx-docs/main/artifacts/openapi-info.json`                          |
| Exchange API OpenAPI            | `artifacts/openapi-exchange.json`                      | `https://raw.githubusercontent.com/afx-dex/afx-docs/main/artifacts/openapi-exchange.json`                      |
| WebSocket AsyncAPI              | `artifacts/asyncapi.json`                              | `https://raw.githubusercontent.com/afx-dex/afx-docs/main/artifacts/asyncapi.json`                              |
| Signed exchange envelope schema | `artifacts/schemas/signed-action-envelope.schema.json` | `https://raw.githubusercontent.com/afx-dex/afx-docs/main/artifacts/schemas/signed-action-envelope.schema.json` |
| Signed action payload schemas   | `artifacts/schemas/signed-actions.schema.json`         | `https://raw.githubusercontent.com/afx-dex/afx-docs/main/artifacts/schemas/signed-actions.schema.json`         |

## AI Agent Entry Points

| Agent                        | Repo path                     | Public raw URL                                                                        |
| ---------------------------- | ----------------------------- | ------------------------------------------------------------------------------------- |
| General                      | `AGENTS.md`                   | `https://raw.githubusercontent.com/afx-dex/afx-docs/main/AGENTS.md`                   |
| Codex                        | `CODEX.md`                    | `https://raw.githubusercontent.com/afx-dex/afx-docs/main/CODEX.md`                    |
| Claude Code                  | `CLAUDE.md`                   | `https://raw.githubusercontent.com/afx-dex/afx-docs/main/CLAUDE.md`                   |
| OpenClaw                     | `OPENCLAW.md`                 | `https://raw.githubusercontent.com/afx-dex/afx-docs/main/OPENCLAW.md`                 |
| LLM index                    | `llms.txt`                    | `https://raw.githubusercontent.com/afx-dex/afx-docs/main/llms.txt`                    |
| Full LLM context             | `llms-full.txt`               | `https://raw.githubusercontent.com/afx-dex/afx-docs/main/llms-full.txt`               |
| Paste-ready first trade task | `agent-guides/first-trade.md` | `https://raw.githubusercontent.com/afx-dex/afx-docs/main/agent-guides/first-trade.md` |
| Agent safety guide           | `agent-safety.md`             | `https://raw.githubusercontent.com/afx-dex/afx-docs/main/agent-safety.md`             |

## Recommended Agent Flow

1. Read `llms.txt`.
2. Use the official Python or JavaScript SDK.
3. Run the first trade guide on testnet.
4. Query product metadata before choosing symbols, leverage, or quantities.
5. Keep the Master private key out of trading runtimes.
6. Cancel test orders and verify no unintended position remains.
7. Revoke or rotate temporary Agent keys.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.afx.xyz/api-reference/agent-artifacts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
