# Agent context Source: https://docs.getworg.com/ai-agents Give your coding agent one link and it can add Worg to your project. The files below are built from these pages every time the docs are published. ## Copy context for your agent Paste this into your agent's chat or rules file, or give it the link. It is `/agent-context.md`: the rules, a tested request, the lanes open when the docs were built, the troubleshooting table and every error code. - Context: `https://docs.getworg.com/agent-context.md` ## Files - Index: `https://docs.getworg.com/llms.txt` - Full docs: `https://docs.getworg.com/llms-full.txt` - OpenAPI: `https://docs.getworg.com/openapi.json` - `agent-context.md`: The short version: rules, a request, the lanes, troubleshooting and error codes. - `llms.txt`: Every page with a one-line summary, and the rules in the prompt below. - `llms-full.txt`: Every page in one Markdown file. - `openapi.json`: OpenAPI 3.1 description of GET /v1/models and POST /v1/chat/completions. - Every page as Markdown: add `.md` to its address, for example `/errors.md`, or `/index.md` for the Quickstart. Copy page at the top of each page copies the same text. They hold only what these public pages hold. There are no keys or account data in them, and the build fails if one appears. ## Prompt to paste Paste this into your agent, in the project it should change: Prompt: ``` Integrate the Worg API into this project. Worg is an OpenAI-compatible API. Read https://docs.getworg.com/agent-context.md before writing code. For detail, read https://docs.getworg.com/llms-full.txt, and use https://docs.getworg.com/openapi.json for request and response shapes. - Base URL: https://api.getworg.com/v1. Use the official OpenAI SDK with this base URL, or plain HTTP. - Endpoints: POST /v1/chat/completions and GET /v1/models. Nothing else exists under /v1. - Model: use an ID from GET /v1/models, for example deepseek-v4.1-flash:cached. Do not guess IDs. - Always set max_tokens. - Read the API key from the WORG_API_KEY environment variable. Never write the key into code, config files, tests, the repository or logs, and never print it. If the variable is not set, stop and ask the user to set it. - Call the API from server-side code only, never from a browser. - Branch on the error code field, not the message. Retry 429 and 502 with backoff. - Before concluding that your code is wrong after a 5xx or a timeout, fetch https://status.getworg.com/api/status.json and check whether a component is down. ``` ## Give the agent its own key - Create a separate key for development, with a short expiry, limited to the models the project uses. See [Keys](https://docs.getworg.com/authentication#keys). - Give it a budget that covers one request's hold: agents that leave out `max_tokens` hold the model's whole output limit. See [Rate limits](https://docs.getworg.com/rate-limits#hold). - Put it in `WORG_API_KEY` in your shell, or in a `.env` file that git ignores. Do not paste the key into the chat with the agent. - If the key leaks, revoke it in API keys. Your other keys keep working. Next: [Connect clients](https://docs.getworg.com/connect-clients) · [Troubleshooting](https://docs.getworg.com/troubleshooting) · [Chat requests](https://docs.getworg.com/chat-completions)