Nothing moves without going through your rules.
LeafCraft is one layer under every agent you buy, every agent you build and every person on the team. This page explains what that layer does, step by step, from the moment work arrives to the moment it is recorded.
- 01Work arrivesWebhookKafkaSlackClaim C-20418North region · 10:41:01
API, webhook, schedule, message or queue
- 02Facts first
- Scheme S-118
- Invoice INV-7731
- Dispatch quantities
Your code pulls what the task needs
- 03A role actsClaims agent"Approve. Matches the scheme and the invoice."
Agent or person, within its limits
- 04Rules decideAbove the agent's limitNext agentA person signs offStop
Next agent, sign-off, escalation or stop
- 05Recorded
- Who
- Priya Nair
- Why
- Scheme confirmed with the regional team.
- How long
- 3 h 31 m
- Cost
- 1.84 of 4.00
Who, what, why, how long, what it cost
The layer
Agents never talk to each other directly.
In most agent setups, one agent calls the next. Once that happens, nobody can say for sure which rule applied or who signed off. LeafCraft puts one layer in the middle. Agents, people and systems each do their part, and every hand-off between them passes through that layer.
Roles
Every team has roles. Any role can be an AI agent or a person.
A process in LeafCraft is a team. Someone does the work, someone decides, someone checks. You decide which of those roles an agent fills and which a person fills, and you can change the mix as the record shows what works.
- The same six things in every job descriptionResponsibilities, decision rights, handoffs, escalation, limits and checks.
- One named owner per decisionNever "the system".
- No one checks their own workAgent or person.
A run
What happens every time work comes in.
- 01Work arrivesWebhookKafkaSlackClaim C-20418North region · 10:41:01
API, webhook, schedule, message or queue
- 02Facts first
- Scheme S-118
- Invoice INV-7731
- Dispatch quantities
Your code pulls what the task needs
- 03A role actsClaims agent"Approve. Matches the scheme and the invoice."
Agent or person, within its limits
- 04Rules decideAbove the agent's limitNext agentA person signs offStop
Next agent, sign-off, escalation or stop
- 05Recorded
- Who
- Priya Nair
- Why
- Scheme confirmed with the regional team.
- How long
- 3 h 31 m
- Cost
- 1.84 of 4.00
Who, what, why, how long, what it cost
- Work arrivesFrom an API call, a webhook, a schedule, a message in Slack or email, or an event from a queue such as Kafka or SQS. The layer opens a run and records the time and the source.
- Facts come firstBefore any model is asked, your own code can pull in the facts the task needs from your systems. The agent starts with the facts, not with a guess.
- A role does its partAn agent uses only the tools its role allows and hands back an answer in the shape you defined. A person gets the request where they already work.
- Your rules choose the next stepThe route is a plain condition checked by code, the same way every time. The next agent, a person for sign-off, an escalation, or a stop. A model cannot overrule it.
- The step is recordedWho did it, what went in, what came out, the reason given, how long it took and what it cost. Then the next step begins.
What never happens
- No step runs outside the rulesA tool that is not on the role's list is refused before it runs.
- No silent approvalIf the named person does not reply in time, the work moves to the backup you named. It never moves on silence.
- No endless retryA step that keeps failing is stopped and handed to a person.
- No surprise costA task that would exceed its limit stops and asks the owner before the model is called.
Rules
Written once. Applied on every step.
Rules are set at three levels, so a new agent inherits the right rules on the day it joins.
Access per role
Every agent gets its own login, never a shared one. It reaches only the systems, actions and data its role needs. Access is removed the day a role or an agent ends.
Checks on every run
Maker and checker are never the same. A judge grades every run, and the ready-made templates end every flow with an audit agent.
- Refunds above 50K need a person
- No agent sees payroll
- Approves alone up to 200K
- Asks Priya Nair above that
- Never changes a scheme
People
Your people stay where they already work.
When a rule says a person must decide, the request reaches only the people you named, in Slack, Microsoft Teams, WhatsApp (coming), Telegram, email or the built-in inbox. They approve, send back or reject, and give a reason. Their reply moves the work on, under the same rules as an agent's.
Work moves both ways
An agent can pass a decision to a person. A person can pass one back to an agent. Whoever passes it says why, and both notes are kept side by side.
Escalation by complexity and impact
If the right person does not reply in the time you set, the work moves up the path. Nothing is paid, sent or changed while it waits.
- 03Senior leadersAbove 2.5M
The largest or riskiest calls. Nothing is lost on the way up.
- 02ManagerUp to 2.5M
Higher value or more complex, as your rule sets out.
Reply within 4 hours · silence is never a yes - 01Team memberUp to 200K
The named person for this kind of case. Routine exceptions stop here.
Above this limit · passed up with the reason
Authority
Earned from the record, one task at a time.
An agent earns its place like a new employee. At first it advises and a person decides. As the record shows clean work, its limit widens: it decides alone up to a set amount, and above that it recommends and a person decides. When the record shows mistakes, the limit narrows again.
A limit changes only because of the record, and every change is recorded with the reason. A vendor update never widens it.
Cost
Known before the work runs.
Before a task runs, its cost is estimated. If it would go over the limit, it stops and asks the owner. Limits are set per task, per agent and per agent type, and each model call is checked against them before it is made.
You pick a model per agent, and switching is a config change. LeafCraft sells no models and no compute, so there is no markup. The meter sits on your side.
The record
Every task and decision, with both reasons, kept by you.
Every agent, model, tool and hand-off is recorded from the first run, with nothing to set up and no tracking code to add. Every approval and rejection by a person is logged with who, when and the reason given, right next to the agent's steps.
The record sits in your own Redis or Postgres, in your environment, for as long as you set. It is unchanged after it is written and open to your auditors. Rules and records export in open formats on demand. It is a record of the work, not surveillance of people.
Bringing an agent you already have
It starts strict. It earns freedom from the record.
- Add it in StudioPick its platform from the list of 40+, or connect it over A2A, MCP or a plain web address.
- Give it its own loginIts keys go into your vault. LeafCraft tests the connection when you save it.
- Set its limitsWhich addresses it may reach, which fields it is sent and how large a reply may be. Replies from outside agents are read as data, not orders.
- Place it on the teamIts role, what it must hand back, which step calls it and who checks its work.
- Give it a budgetLimits per task and per month. If its platform does not report costs, LeafCraft estimates them.
- Let it runEvery call is recorded. If it keeps failing, it is cut off until someone releases it.
Where it runs
In your environment, on your database, with your keys.
One command deploys to AWS, Azure or Google Cloud inside your own account, or run it with Docker or Kubernetes in your VPC or data centre. With local models through Ollama or vLLM, nothing needs to leave the building.
Discover every agent
You can't govern what you can't see.
LeafCraft connects to your ecosystem and finds every agent you run: the ones vendors shipped inside your software and the ones your teams built. Then each one gets an owner, comes under your rules, or is removed.
See it run on one of your processes.
Bring one process. We'll map the roles, the rules, the cost limits and the record with you, in a 30 minute call.