Why it matters
Every session becomes an attestation: a signed record that anyone can verify later, stored in your cloud or ours. Rules and AI reviewers run on it, to gate what ships and to send findings back to the agent. Think of it as a flight recorder for AI work: complete, tamper-evident, and there when you need to ask what happened. Start with coding sessions today. Every other session your organization runs, PRDs, reviews, security assessments, deployments, lands in the same graph.Record your first session
This walkthrough uses Chainloop SaaS. Open source users follow the same steps against their own instance. See How to trace AI coding sessions for the full guide.- Coding session
- General session
- A git repository you can push to. A small test repository is perfect.
- One of the supported agents installed: Claude Code, Cursor, or OpenCode. See which agents are supported.
- A terminal on macOS or Linux.
Create your Chainloop account
Open Coding Sessions
Install the Chainloop CLI and log in
Set up your repository
Let the agent make a change and push
See your session
Two kinds of session
Govern every session
Policies run on every session, and they are code. Deterministic ones check facts: no secrets in the transcript, only approved agents, only allowed MCP servers and skills, signed commits. Agentic ones apply judgment: an adversarial security review of a spec, a PRD readout run by a team of agents, a quality score on a pull request. You define them once, at project, team or organization level, and Chainloop applies them to every session that lands. A session that breaks a rule is rejected, the way a QA session rejects a build that fails its checks. One that falls short comes back with the findings, the way a security review sends a release back to the agent to fix before it ships. That is the governance loop: the same policies that gate what ships also steer the agents that produce it, and the results get better with every pass.How it works
- Hooks capture the session. While the agent works, hooks in the agent record the model, the tools it calls, and the messages. In a coding session they also snapshot each file before and after every edit, which is what makes per-line attribution possible. Nothing leaves your machine yet.
- Push signs and sends it. When you push, or when a general session’s run ends, Chainloop bundles the session, redacts secrets, signs the bundle, and uploads it. Hand-written commits pass through untouched.
- Chainloop shows it and gates on it. The session appears with every line attributed to AI or to a person. Policies run on it. Connected pull requests get a summary and a check.
Secrets redacted. Removed before upload, reported without the value.
Signed, not logged. Every session is an attestation you can verify later.
Open source collector. You can read exactly what is captured. Under the hood, attestations land in the trusted evidence store next to your builds, scans and SBOMs, and the policy engine evaluates them against Chainloop’s curated catalog and your own policies as code. Results surface in the session view, on the pull request, in the dashboard, and through MCP and the API.
Next steps
- Share the setup. Commit
.chainloop.ymland.claude/settings.json. Teammates only install the CLI and log in. - Connect your pull requests. Install the Chainloop GitHub App. Every PR gets the sessions behind it and a policy check. See Pull Request Correlation.
- Add rules. Attach policies: approved agents only, no dangerous commands, no secrets, signed commits.
- Go deeper. AI Coding Sessions explains sessions, pull requests, and the dashboard together.
FAQ
Which AI coding agents are supported?
Which AI coding agents are supported?
Is it open source?
Is it open source?
What is stored for each session?
What is stored for each session?
- The agent and its version, when the session started and ended
- The models used, token counts, and estimated cost
- Every tool the agent called and how many times
- The messages exchanged, that is the transcript
- For coding sessions, each file changed with the exact line ranges, attributed to AI or to a person
- The repository, branch and commit range the session belongs to
- What secret redaction did before upload
Are transcripts stored?
Are transcripts stored?
Where is it stored?
Where is it stored?
Is it signed or encrypted?
Is it signed or encrypted?
Do I need a git repository?
Do I need a git repository?
chainloop trace run records the run on its own, including the transcript and tool calls, and records it even if nothing was committed.What policies can I run against sessions, and where do I read about them?
What policies can I run against sessions, and where do I read about them?
Can I run security or adversarial review agents against my sessions?
Can I run security or adversarial review agents against my sessions?
How does the governance loop work?
How does the governance loop work?
Can I run PRD readouts or spec reviews automatically?
Can I run PRD readouts or spec reviews automatically?
How can I query all sessions?
How can I query all sessions?
Do you have an MCP server?
Do you have an MCP server?
https://api.app.chainloop.dev/mcp with OAuth or API token authentication, and works from Claude Code, Cursor and other MCP clients. See How to use the Chainloop MCP server.Does this change how developers work?
Does this change how developers work?
Does it slow down git push?
Does it slow down git push?
requireTrace in .chainloop.yml. See Enforcing.What leaves my machine, and when?
What leaves my machine, and when?
How does my team get onboarded?
How does my team get onboarded?
.chainloop.yml and the agent configuration files that chainloop trace init created. Each teammate then installs the CLI, logs in, and runs chainloop trace init once. It has nothing left to ask them.How do I remove it?
How do I remove it?
chainloop trace uninstall from the repository root. It removes the git hooks, the agent hooks, and the local session data, and restores any hooks that were there before. See Removing Tracing.Is it used in production?
Is it used in production?
