Overview
Cairn agents read a trigger, gather context from your tools, decide what to do and act through scoped permissions — leaving a trace of every step. In this guide you’ll build a refund agent for a support team and run it safely before it touches a real customer.
You’ll need a Cairn workspace on any plan, admin access to one support tool such as Zendesk or Intercom, and about 30 minutes.
New to agents?
Start with the Key concepts section below — five definitions cover everything this guide uses.
1. Create a workspace
Workspaces hold your agents, connections and traces. Pick the region where your data should live — you can’t move a workspace between regions later.
Terminal
2. Connect a tool
Connections use OAuth where the tool supports it. Start with read-only scopes; you’ll grant write access per action when the agent is ready to act.
Terminal
3. Create an agent
Describe the job in plain language, list the tools the agent may use and set the conditions that require a person. You can do the same thing in the visual builder.
create-agent.ts
4. Run in shadow mode
Shadow mode runs the full workflow but never writes to your tools. Replay recent tickets to see what the agent would have done, then compare its decisions with your team’s.
Terminal
Nothing leaves shadow mode by accident
Every proposed action is recorded in the trace with its evidence. Promotion to live is a separate, audited step.
5. Go live
When the eval suite passes and your team agrees with the agent’s decisions, promote it. Keep approval gates on anything above your thresholds.
Set approval thresholds for refunds and anything irreversible
Add the eval suite to the agent’s release checks
Switch the trigger from replay to live
Review the first 50 runs in the trace viewer
Terminal
Key concepts
A job description with instructions, tools, knowledge and guardrails. Versioned like code.
One execution of an agent or workflow, from trigger to result.
The record of a run: every input, tool call, decision, approval and output.
A condition that pauses a run until a person approves, edits or rejects the action.
Test cases built from real runs that score an agent’s decisions on every change.