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

> ## Agent Instructions
> To act on Atlan objects, use the Atlan MCP server at https://api.atlan.com/mcp or the SDK. To install or publish skills from a terminal, use the `brain` CLI; `brain --map json` prints its command map. The `atlanai` CLI is deprecated. Run a read-only identity check before any write.
> The docs MCP server at /mcp searches these docs only. It cannot read or change Atlan objects.
> SDK packages: Python `atlanai` (PyPI) and TypeScript `@atlanai/sdk` (npm). Show Python first, then TypeScript.
> These docs cover Atlan Agent Registry, Atlan's hosted product. The open-source agent registry specification and its CLI (`brain`) are documented, released and maintained in their own repository; /open-source on this site links to it. Answer general specification or `brain` command questions from the project's own docs, and use these docs only for Atlan-specific setup such as the Atlan adapter, sign-in and workspaces.

# Capture coding-agent traces with brain

> Send Claude Code and Codex sessions to Atlan as traces with brain and the Atlan adapter, once or on a schedule, and control what leaves your machine.

The Atlan adapter adds a `brain trace` command and a background job that read
your Claude Code and Codex session transcripts and send them to Atlan as
traces. You then see coding sessions in Atlan the same way you see traces from
the [SDK](/tools/sdk/overview).

`brain` reads the transcripts the coding agents already write. It installs no
hooks into Claude Code or Codex.

## Before you start

* `brain` and the Atlan adapter, signed in. See
  [Use brain with Atlan](/tools/brain/how-tos/use-with-atlan). Traces need a
  signed-in account: a `REGISTRY_TOKEN_<NAME>` variable is not enough.
* The name of the account to send traces to. Run `brain auth list`: it's the
  registry name you signed in with, such as `atlan`. On a machine with Atlan
  Desktop, it's your organization's slug, its short name, with one account per
  organization you belong to.

If you use Atlan Desktop, the app can set up a traces job for you. Run
`brain job list` before you add one.

## Look before you send

List the sessions `brain` can read:

```bash theme={null}
brain trace list
```

To see what would be sent, without sending it, write the batches to a folder:

```bash theme={null}
brain trace export --to ./trace-preview --dry-run
```

The folder holds what your own `--content` setting keeps. Your organization's
trace policy, and the fields Atlan adds when it sends, aren't applied.
`--dry-run` doesn't mark sessions as sent, so a later export still includes
them.

## Send sessions once

```bash theme={null}
brain trace export --account atlan
```

To narrow the export:

* name sessions by ID, by an ID prefix of at least 8 characters, or by
  transcript path: `brain trace export <session> --account atlan`;
* read one coding agent only: `--for claude` or `--for codex`;
* send again, from the start, sessions changed since a date:
  `--since 2026-10-01`. It doesn't skip older sessions that were never sent.

`brain` sends only work that has finished. A turn or tool call still in
progress stays on this machine until it finishes, so a session you're still in
may send nothing yet. A later export, or the background job, sends the rest.

Traces go to your personal workspace, or to the workspace set as
`default_namespace` for that registry. The command exits with status 1 if any
session fails to send.

## Send sessions on a schedule

Add a background job that, every 15 minutes, sends the sessions it hasn't
sent yet. Its first run includes the sessions already on this machine:

```bash theme={null}
brain job add --traces --account atlan
```

To limit the job to sessions started in some folders, add `--cwd <folder>`.
For the job's other options, and for starting the `brain` background service
that runs it, see `brain job` in the
[brain CLI reference](/open-source#where-to-find-what). To check on the job,
run `brain job list` and `brain job runs`.

`brain help job add` doesn't list `--traces` yet, because the Atlan adapter
adds it.

## Choose what leaves your machine

By default, prompts and completions are sent with each trace. To send the
structure of each session without its content, add `--content drop`:

```bash theme={null}
brain trace export --account atlan --content drop
brain job add --traces --account atlan --content drop
```

If your organization's trace policy drops content, `brain` follows it whatever
you set.

Installing the Atlan adapter also turns on usage and crash reporting. See
[Usage and crash reporting](/tools/brain/references/atlan-adapter#usage-and-crash-reporting)
for what it sends and how to turn it off.

## Related

* [Atlan adapter reference](/tools/brain/references/atlan-adapter)
* [Errors with Atlan](/tools/brain/troubleshooting/atlan-errors)
* [brain CLI reference](/open-source#where-to-find-what)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.