# Use Xantly with Aide (codestory.ai)

[Aide](https://aide.dev) from [codestory.ai](https://codestory.ai) is an AI-native editor with a sidecar architecture, a local Rust binary handles LLM calls and tool orchestration while the editor UI stays snappy. Aide exposes a provider-config block that accepts OpenAI-compatible endpoints. Point it at Xantly and every sidecar-mediated call routes through smart routing + cache + memory.

## Prerequisites

- Aide installed, download from [aide.dev](https://aide.dev)
- A Xantly API key, [create one](/dashboard/api-keys)

## Setup

1. Open Aide → **Settings** (`Cmd+,` / `Ctrl+,`).
2. Search for **AI Providers** → add a new **OpenAI Compatible** provider.
3. Configure:

| Field | Value |
|---|---|
| Name | `Xantly` |
| Base URL | `https://api.xantly.com/v1` |
| API Key | `xantly_sk_...` |
| Available Models | `xantly/auto-quality`, `xantly/auto-value`, `anthropic/claude-sonnet-4.6`, `openai/gpt-5.4` |

4. Save. Under **Default Model** → select `xantly/auto-quality`.
5. Reload the window.

## Setup via sidecar config

Aide's sidecar reads a config file at `~/.aide/sidecar.toml`:

```toml
[providers.xantly]
kind = "openai_compatible"
base_url = "https://api.xantly.com/v1"
api_key = "xantly_sk_..."

[defaults]
model = "xantly/auto-quality"
provider = "xantly"
```

Restart the sidecar (`aide-sidecar restart` or restart Aide) for changes to apply.

## Using Aide

- `Cmd+K` → inline edit.
- `Cmd+I` → agent panel.
- `/` commands in the chat → references files, commits, diffs.

All three surfaces route through Xantly.

## Agent mode

Aide's agent panel supports Plan / Act / Verify cycles, similar to Cline but with codestory's specialized Sota (state-of-the-art task agent) model handoffs.

Use `xantly/auto-quality` for the main agent model and `anthropic/claude-sonnet-4.6` for tool-heavy sub-tasks.

## Model choice

| Model ID | When |
|---|---|
| `xantly/auto-quality` | Main agent, Cmd+K complex edits. |
| `xantly/auto-value` | High-volume chat / reviews. |
| `anthropic/claude-sonnet-4.6` | Long-context agent runs, tool calls. |
| `openai/gpt-5.4` | Schema-tight edits. |
| `xantly/auto-speed` | Inline quick completions. |

## Verify

In the Aide chat panel:

```
Reply with just the word "pong".
```

Check your Xantly dashboard, call logged with routed-to model + cost.

## What you get

- **Sidecar performance + Xantly routing.** Aide's Rust sidecar dispatches fast; Xantly adds 12ms p50 overhead for smart routing.
- **Waterfall fallback** through the sidecar, mid-agent provider outages don't derail Aide's Act loop.
- **Semantic cache** on Cmd+K repeats.
- **Memory** across Aide projects via Xantly's L3 cascade.
- **Cost visibility**: the sidecar's request logs align with your Xantly dashboard entries.

## Gotchas

**Sidecar version matters.** Older Aide builds ship an older sidecar that might not support custom `openai_compatible` providers. Update to the latest Aide release before filing issues.

**`base_url` with `/v1`.**

**The sidecar runs as a separate process.** If you change the config via Settings, give it a few seconds to pick up the new values, or manually restart with `aide-sidecar restart`.

**Proprietary codestory models.** Aide's "Sota" internal model (for plan-act handoffs) is hosted by codestory, that one call stays on their infra. Everything else (chat, edit, agent step models) respects your provider config.

**MCP + Aide.** Aide is adding MCP client support; Xantly passes MCP tool calls through normally.

## Next steps

- [Cline](/docs/use-with-cline), closest open-source equivalent.
- [Claude Code](/docs/use-with-claude-code), Anthropic's CLI with MCP.
- [Zed](/docs/use-with-zed), fast native editor alternative.
- [Bring Your Own Key](/docs/bring-your-own-key), route Aide through your own provider credits.
