# Integrations and Best Practices

- [Integrations](https://thegrid.ai/docs/integrations-and-best-practices/integrations.md): Set up The Grid in IDEs, coding agents, routers, and agent frameworks.
- [General Agent Skill](https://thegrid.ai/docs/integrations-and-best-practices/integrations/general-agent-skill.md): A drop-in pattern for any custom agent harness. Point your OpenAI client at The Grid, pick an instrument, handle 402 retries, and you're live.
- [Cline](https://thegrid.ai/docs/integrations-and-best-practices/integrations/cline.md): Configure Cline's OpenAI Compatible provider to run on The Grid in three fields.
- [Continue](https://thegrid.ai/docs/integrations-and-best-practices/integrations/continue.md): Wire The Grid into Continue's config.yaml and assign instruments to chat, edit, apply, and autocomplete roles.
- [Cursor](https://thegrid.ai/docs/integrations-and-best-practices/integrations/cursor.md): Point Cursor's chat at The Grid by overriding the OpenAI Base URL and adding instrument names as custom models.
- [Claude Code](https://thegrid.ai/docs/integrations-and-best-practices/integrations/claude-code.md): Point Claude Code at The Grid's beta Anthropic Messages API with two environment variables and a model alias map.
- [Kilo Code](https://thegrid.ai/docs/integrations-and-best-practices/integrations/kilocode.md): Connect Kilo Code to The Grid in VS Code through the gear icon, or in the CLI with /connect.
- [OpenCode](https://thegrid.ai/docs/integrations-and-best-practices/integrations/opencode.md): Connect OpenCode to The Grid with opencode auth /connect and select The Grid from the provider list.
- [OpenClaw](https://thegrid.ai/docs/integrations-and-best-practices/integrations/openclaw.md): Add The Grid as a custom OpenAI-compatible provider in OpenClaw's openclaw.json and route agent traffic through Grid instruments.
- [CrewAI](https://thegrid.ai/docs/integrations-and-best-practices/integrations/crewai.md): Build a CrewAI LLM instance pointed at The Grid and pass it to each Agent. One key, one endpoint, per-agent tiering.
- [Deep Agents](https://thegrid.ai/docs/integrations-and-best-practices/integrations/deepagents.md): Wire The Grid into LangChain's create\_deep\_agent with ChatOpenAI and use\_responses\_api=False.
- [DeerFlow](https://thegrid.ai/docs/integrations-and-best-practices/integrations/deerflow.md): Add Grid instruments to DeerFlow's config.yaml as ChatOpenAI models with use\_responses\_api set to false.
- [Hermes Agent](https://thegrid.ai/docs/integrations-and-best-practices/integrations/hermes-agent.md): Configure The Grid as a custom OpenAI-compatible provider in Hermes Agent's config.yaml or via the hermes model wizard.
- [LiteLLM](https://thegrid.ai/docs/integrations-and-best-practices/integrations/litellm.md): Run LiteLLM as a Python SDK or standalone proxy with The Grid as an OpenAI-compatible backend. One config, every downstream tool.
- [ClawRouter](https://thegrid.ai/docs/integrations-and-best-practices/integrations/clawrouter.md): ClawRouter cannot route to The Grid as a backend; here's what works instead in OpenClaw.
- [Manifest](https://thegrid.ai/docs/integrations-and-best-practices/integrations/manifest.md): Add The Grid as a custom OpenAI-compatible backend in Manifest's dashboard and map instruments to Manifest's complexity tiers.
- [Codex](https://thegrid.ai/docs/integrations-and-best-practices/integrations/codex.md): Codex requires the OpenAI Responses API, which The Grid does not yet support. Here's what to do instead.
- [Migrating from OpenAI](https://thegrid.ai/docs/integrations-and-best-practices/migrating-from-openai.md): Switch from the OpenAI API to The Grid by changing three values in your existing code, base URL, API key, and model string. Your SDK, request body, and response shape stay the same.
- [Migrating from Anthropic](https://thegrid.ai/docs/integrations-and-best-practices/migrating-from-anthropic.md): Move an Anthropic-based application to The Grid. Keep the Anthropic SDK against our Messages API beta, or swap to the OpenAI SDK against the Consumption API.
- [Any OpenAI-compatible tool](https://thegrid.ai/docs/integrations-and-best-practices/any-openai-compatible-tool.md): Any tool that targets OpenAI's Chat Completions API works with The Grid. Set the base URL, API key, and model. Tools built on OpenAI's Responses API (Codex and similar) don't work yet.
- [Routing patterns](https://thegrid.ai/docs/integrations-and-best-practices/routing-patterns.md): How to allocate workloads across our nine instruments. Default to Prime, escalate to Max for hard tasks, demote to Standard for volume.
- [Troubleshooting](https://thegrid.ai/docs/integrations-and-best-practices/troubleshooting.md): Common errors when integrating with The Grid and how to fix them. Auth, base URLs, instrument strings, balance, and the "is it me or The Grid" diagnostic flow.
- [Best practices for development](https://thegrid.ai/docs/integrations-and-best-practices/best-practices.md): Production patterns for The Grid. Tier routing, two-balance accounting, retry-on-retryable, streaming, FIFO consumption, Auto Mode limits, instrument pinning.


---

# Agent Instructions: 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://thegrid.ai/docs/integrations-and-best-practices.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.
