Skip to main content
Back to Guides & Cookbooks
Cookbook

Build Your First Agent

A step-by-step walkthrough. You'll create an agent, give it knowledge, set rules, test it, and check the audit log. Takes about 10 minutes.

Prerequisites

  • — A Cadreen account (free tier works)
  • — An API key or dashboard access
  • — A task you want the agent to handle

What you'll do

Five steps. Click each one to see what happens.

CreateName and purposeLearnSeed knowledgeGovernSet rulesTestSend a messageAuditCheck the log
1

Create an agent

Give it a name and a purpose. The system sets up knowledge storage, governance, and messaging automatically.

You can create an agent from the dashboard or the API. Here, we'll use the dashboard.

  1. Go to Agents
  2. Click Create agent
  3. Enter a name (e.g., “Support Agent”)
  4. Enter a purpose (e.g., “Handles customer support questions”)
  5. Click Create

The agent is now live. It has no knowledge yet, but it's ready to learn.

POST/api/v1/cadreen/agents
2

Add knowledge

Knowledge is what an agent remembers. It accumulates from missions, but you can also seed it manually.

After each mission, the agent writes what it learned into knowledge. But you can also add knowledge manually to give it a head start.

Go to your agent's Knowledge tab. You'll see an empty list. Knowledge gets added automatically as the agent works. You can also search existing workspace knowledge to see what other agents have learned.

Note
Knowledge is scoped to your workspace by default. If you want to share it with partner workspaces, set visibility to “federation” in the API.
GET/api/v1/cadreen/agents/{id}/knowledge
3

Set governance rules

Policies control what an agent can and cannot do. The default is permissive: audit everything, block nothing.

Go to your agent's Governance tab. You'll see the default policy: audit everything, block nothing. This means the agent can do anything, but everything it does is logged.

To add restrictions, create a new policy. For example, to require human approval before sending emails:

Require approval for emails
curl -X POST https://accomplishanything.today/api/v1/cadreen/agents/AGENT_ID/governance \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Email approval", "scope": "workspace", "rules": {"requireApproval": ["send_email"]}}'

Now the agent will pause and ask for permission before sending any email. You'll see the approval request in the dashboard.

POST/api/v1/cadreen/agents/{id}/governance
4

Test with a conversation

Send the agent a message and see how it responds. Watch the audit log to see what it did.

Go to your agent's Messages tab. Type a test message — something in the agent's domain. For a support agent, try “How do I reset my password?”

The agent will respond. Watch the Executions tab to see what tools it called, what knowledge it used, and what it decided. This is the audit trail — every action is logged.

Note
If the agent doesn't have enough knowledge to answer, it will say so. That's a feature, not a bug. It means the agent is being honest about what it knows.
5

Check the audit log

Everything the agent did is logged. You can see every action, every decision, every message.

Go to your agent's Executions tab. You'll see a list of everything the agent has done. Each entry shows:

  • What the agent did (the action)
  • What tools it called
  • What knowledge it used
  • What it decided and why
  • When it happened

This is the full audit trail. You can use it to understand the agent's behavior, debug issues, or prove compliance.

What you built

You now have an agent that handles support questions. It has its own knowledge, its own rules, and a full audit trail. As it works, it learns — and those learnings are shared with other agents in your workspace.

Next steps