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

# AI agents

> Give agents a real database to work against: isolated, disposable, cloned from production

Agents are only as good as the data they can work with. Mocked data misses edge cases. Shared staging gets corrupted. Production is off-limits.

Ardent gives every agent run its own isolated copy of your real database: spun up in under 6 seconds, handed off as a connection URL, thrown away when the task is done.

## The pattern

```bash theme={null}
# Create a branch for the agent task and capture its URL
AGENT_DATABASE_URL="$(ardent branch create agent-task --print-url)"
if [ -z "$AGENT_DATABASE_URL" ]; then
  echo "branch creation did not return a database URL" >&2
  exit 1
fi

# Hand the returned URL to your agent
# → $AGENT_DATABASE_URL

# Agent writes migrations, runs queries, tests against real data
# When it's done, clean up
ardent branch delete agent-task
```

## Copy this into Claude Code or Cursor

```
I'm working on [describe task]. Before making any database changes,
create an Ardent branch with `ardent branch create <branch-name> --print-url`,
use the returned connection URL for all database work, and delete
the branch when we're done. Never touch the main connection string.
```

No more giving agents production access. No more hand-maintained fixtures. Real data, safely isolated, every time.
