> ## Documentation Index
> Fetch the complete documentation index at: https://www.edgee.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Xcode

> Route Xcode's Coding Assistant through Edgee to cut token costs and gain full observability over every session.

Xcode's Coding Assistant runs a Claude agent under the hood, and reads its endpoint and headers from a settings file. Point it at Edgee to reduce token costs with lossless compression and gain full observability over every session.

## Manual setup

The Coding Assistant reads `ANTHROPIC_BASE_URL` and `ANTHROPIC_CUSTOM_HEADERS` from its agent settings file. Create or edit `~/Library/Developer/Xcode/CodingAssistant/ClaudeAgentConfig/settings.json`:

```json theme={"dark"}
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://edgee.io",
    "ANTHROPIC_CUSTOM_HEADERS": "x-edgee-api-key:<YOUR_EDGEE_API_KEY>"
  }
}
```

<Note>
  Replace `<YOUR_EDGEE_API_KEY>` with your actual Edgee API key from the [Edgee Console](https://www.edgee.ai).
</Note>

Restart Xcode for the change to take effect. The Coding Assistant now routes through Edgee, and token compression is enabled automatically.

## Benefits

<CardGroup cols={2}>
  <Card title="Cost reduction" icon="dollar-sign">
    Edgee's token compression reduces the tokens sent to and from the model, with no change to output quality.
  </Card>

  <Card title="Observability" icon="chart-line">
    Every request is logged in the Edgee Console with token counts, latency, and cost breakdowns.
  </Card>

  <Card title="Reliability" icon="shield-check">
    Automatic retry and fallback across providers keeps your sessions running even when a provider has issues.
  </Card>

  <Card title="No new tools" icon="check">
    Keep using the Coding Assistant inside Xcode, requests route through Edgee transparently.
  </Card>
</CardGroup>

## Next Steps

* Learn more about the [Edgee CLI](/docs/features/cli) and its launch commands
* Set up [observability](/docs/features/observability) to monitor usage and costs
* Explore [retry and fallback](/docs/features/retry-and-fallback) for resilient routing
