Skip to main content
When you’re done, your agent’s actions flow into the console automatically.
You’ll need an Actrail account and Python 3.11 or 3.12 — the system Python on macOS is 3.9 and won’t work. Use a 3.11/3.12 environment (e.g. uv venv --python 3.12).
1

Get an API key

In the console, open Settings → API keys and create one. It starts with ak_ and is shown in full once — copy it now.
2

Install the SDK

3

Connect Claude Code

Run this in your project directory:
You should see ✓ Actrail capturing (shadow).
4

Verify

Confirms your config, hooks, the backend, and whether policy is being consulted.
5

Use Claude Code

Work as usual. Every action is captured as metadata only.
You’re set up. Claude Code’s actions now flow into Actrail — open Trails in the console to see them.
You’re in shadow mode: Actrail watches and flags, but nothing is blocked until you arm a policy.

See it work

Turn a flagged risk into an enforced policy.

SDK reference

Every command, all config options, and how the SDK works.