# Set up Coding Agents & Tools

> Connect coding agents to Agent Router with tare integrate or ready-to-paste config: API patterns, model routing, fallback, and cost tracking for each tool.

# Set up Coding Agents & Tools

  Use <code>tare integrate</code> to point supported coding tools at a Tetrate Agent Router gateway in one command. For deeper tool-specific setup, and for tools the CLI does not cover yet, the per-tool guides below give project context and manual configuration.

Preferred path

  <Link to="/agent-router-service/guides/coding-agents/configure-tools-with-tare-cli/" className="tare-nav-card">
    Configure coding tools with the tare CLI
    Run <code>tare integrate</code> to detect a local tool, write its config from the logged-in Agent Router session, and validate the gateway key.
  </Link>

Per-tool guides

  <Link to="/agent-router-service/guides/coding-agents/vscode/" className="tare-nav-card">
    Visual Studio Code
    Install the Tetrate model provider extension so one key serves VS Code chat, agent mode, and every extension that uses the Language Model API.
  </Link>
  <Link to="/agent-router-service/guides/coding-agents/claude-code/" className="tare-nav-card">
    Claude Code
    Point Claude Code at the gateway (managed or Max), then optionally add a <code>CLAUDE.md</code> for Agent Router patterns.
  </Link>
  <Link to="/agent-router-service/guides/coding-agents/cursor/" className="tare-nav-card">
    Cursor
    Add a <code>.cursorrules</code> file so Cursor's agent and inline chat default to Agent Router.
  </Link>
  <Link to="/agent-router-service/guides/coding-agents/codex/" className="tare-nav-card">
    Codex CLI
    Configure the gateway with <code>tare integrate</code>, then add project context so Codex uses Agent Router endpoints.
  </Link>
  <Link to="/agent-router-service/guides/coding-agents/lovable/" className="tare-nav-card">
    Lovable
    Paste project context so apps generated in Lovable call the Agent Router API.
  </Link>
  <Link to="/agent-router-service/guides/coding-agents/coder/" className="tare-nav-card">
    Coder
    Route agents inside Coder workspaces: a user secret for the API key, one <code>coder_env</code> block for the gateway URL.
  </Link>

## How it works

For tools that `tare integrate` supports, the CLI detects the install, reuses the logged-in Agent Router session, writes the tool's config (with a backup), and validates the key against the gateway. Preview with `--dry-run` before applying.

For project context, and for tools configured by hand, the setup follows four steps:

1. Pick a tool above and copy its config.
1. Paste the config into the project, in the file the tool reads (a repo-root instructions file, a rules file, or a project context field).
1. Start prompting. The agent now understands the Agent Router base URL, authentication, and available endpoints.
1. Layer in routing, fallback, and cost-tracking patterns as the application grows.

The config teaches the agent to use the Agent Router [Gateway APIs](/reference/supported-apis/) (chat completions, embeddings, image generation, and audio speech), along with routing, fallback, and cost-tracking patterns, so generated code points at the gateway from the first request.

## What every config provides

With the config in place, the coding agent:

- Uses the correct Agent Router base URL and Bearer-token auth pattern automatically.
- Defaults to routing through the gateway instead of calling a single provider directly.
- Suggests separate API keys when multiple AI features are built, so cost can be attributed per feature.
- Recommends fallback routing when a feature needs high availability.
- Recommends traffic splitting when models are being compared.
- Uses streaming for user-facing chat interfaces.

Where to go next

  <Link to="/agent-router-service/guides/coding-agents/configure-tools-with-tare-cli/" className="tare-nav-card">
    Configure with the tare CLI
    Automate gateway setup for Claude Code, Codex, Aider, and other supported tools.
  </Link>
  <Link to="/agent-router-service/quickstarts/make-an-api-call/" className="tare-nav-card">
    Make an API call
    Send the first request through the gateway with the OpenAI SDK.
  </Link>
  <Link to="/agent-router-service/guides/integrate-the-gateway-with-an-app/" className="tare-nav-card">
    Integrate the gateway with an app
    Point SDKs and frameworks at the gateway in application code.
  </Link>
