Autopilot: a constitution and a ledger
AI agents can already find leads, write emails and read replies. Almost nobody lets them send, because the limits live in a prompt, and a prompt can be talked out of anything. OpenLeads puts the limits in a file the engine checks underneath every send, whoever asked for it, and keeps a record of what happened that can't be quietly rewritten.
openleads constitution init # write a starter constitution.toml to edit
openleads constitution # what's in force, and today's budget
openleads ledger # the latest sends, holds and agent actions
openleads ledger verify # check the hash chain from the first entryIn the app it's Settings → Autopilot.
#The constitution
~/.openleads/constitution.toml (or $OPENLEADS_HOME/constitution.toml):
[budget]
emails_per_day = 40 # every email sent, from everyone, together
[who]
fit_grade_at_least = "B" # A, B, C or D
countries = ["US", "CA", "GB"] # two-letter codes; an unknown country is held
[what]
never_say = ["guarantee", "risk-free", "act now"]
[escalate]
replies_mentioning = ["price", "contract", "legal", "complaint"]
[autonomy]
start = "propose" # or "send" to trust it from the first day
earn_after = { sends = 200, bounce_rate_below = 0.02, complaints = 0 }
lose_on = { complaints = 1 }
[agents]
default = ["read", "find", "draft", "workspace", "send"]
researcher = ["read", "find"] # openleads mcp --as researcherEvery rule is optional. What each one does:
| Rule | What it holds |
|---|---|
[budget] emails_per_day | Real sends past this many today, counting you, schedules, workflows and agents together. It sits on top of warm-up; whichever is lower wins. |
[who] fit_grade_at_least | First emails to people whose fit grade (Settings → ICP scoring) is below it. |
[who] countries | First emails to people outside these countries, or whose country isn't known. |
[what] never_say | Any email whose subject or body has one of these phrases, as whole words, in any case. |
[escalate] replies_mentioning | A reply with one of these words goes to a person: it shows on Today as needing you, and nothing more is sent to that contact until you mark the reply handled. |
[autonomy] | Whether first emails from schedules, workflows and sequences wait in Today for your approval. They do until the record is earned, then they don't until a complaint. See Earned autonomy. |
[agents] | Which kinds of MCP tool an AI agent may use, per agent. See What an agent may use. |
"First emails" means people who haven't replied and aren't customers. Once someone writes back, [who] no longer applies to them; [what], [escalate] and the budget always do.
Held emails say why, in the send results, on the contact's timeline and on Today ("2 emails were held by your constitution").
#A mistake stops sending
A file that doesn't read (a typo in a key, a grade of "E", a country it doesn't know) holds every email, previews included, until it's fixed. Today says so, and openleads constitution names the line. That's deliberate: a typo that quietly removed a limit would be worse than one that stops everything.
#Earned autonomy
Nobody should hand an agent the send button on day one, and nobody wants to approve every email forever. [autonomy] sits between the two:
- It starts by proposing. First emails from schedules, workflows and sequences wait in Today for you to approve, edit or skip.
- The record earns the rest. Once every real send since then adds up to
earn_after(200 sends, under 2% bounced, no complaints by default), they go out on their own, still inside the budget and every other rule. - A complaint takes it back.
lose_oncomplaints (one by default) put first emails back in your approval queue, and the record starts again from zero.
A complaint is a reply whose new text calls the email spam, unsolicited or harassment, or says the person never signed up or consented. It's caught when replies are read (IMAP), even if the same reply also unsubscribes, and the person is never emailed again. A person's reply counts; a bounce that says "rejected as spam" doesn't, and neither does "found you in my spam folder". Sends and complaints are counted from the ledger, not the contact list, so erasing the person who complained blanks who it was but keeps that it happened.
Every change of level is a ledger entry ("earned: sends on its own (212 sends, 0.5% bounced, no complaints)", "lost: 1 complaint"), Today says when it changes, and Settings → Autopilot shows how far the record is from earning it.
Two things it doesn't loosen: approve_first_emails = on in Settings still holds every first email (the constitution can tighten what you set, never loosen it), and an agent's approve_draft still only sends a draft that's waiting, after the same checks. A constitution with a mistake in it proposes.
#What an agent may use
Capabilities, not trust. [agents] gives each AI agent a list of what it may do:
| Capability | Tools |
|---|---|
read | Look at contacts, companies, tasks, the pipeline, Today, signals and the constitution. Always allowed. |
find | find_leads, find_email, verify_email: the network, and your API credits. |
draft | draft_email: write an email without sending it. |
workspace | Save contacts, tag, move stages, notes, tasks, deals, skip a draft, snooze. |
send | approve_draft, enroll_in_sequence, run_workflow: anything that can send. |
An agent that gives no name uses default. Start one with openleads mcp --as researcher in the MCP client's settings and it uses researcher, and the ledger records it as agent (researcher). A name the file doesn't list, a missing default, or a file with a mistake leaves the agent able to read and nothing more. Without an [agents] section an agent may use every tool.
Tools outside the list aren't shown to the agent at all, so it plans without them, and a call to one anyway is refused with a message saying which capability it needs and recorded in the ledger as refused.
The name is chosen in the MCP client's config, not proven by a token: it separates your own agents from each other, and a program that can edit that config or the constitution can change it. See below.
#Agents can read it
The get_constitution MCP tool gives an agent the rules in plain words, today's budget, where autonomy stands, what it may use and the ledger's state, so it can plan within them instead of finding out by being held. approve_draft and every other send path still check underneath.
#The ledger
Every real send, every hold, every failed send, every MCP tool call that changes something and every Glass Box erase is appended to the ledger, with who asked. So is the text of constitution.toml, whenever it changed since the last send:
| Actor | Means |
|---|---|
you | the CLI, the app, or the chat |
agent | an MCP client such as Claude or Cursor |
schedule | openleads schedule runs |
workflow | a workflow's send step |
Each entry carries the hash of the one before it, the way each git commit carries its parent. openleads ledger verify walks the chain from the first entry and names the first one that was edited, removed or reordered.
What it can't see on its own is entries cut off the end. verify prints the newest hash (the head); note it somewhere else now and then, and a later verify that shows an older head means the end was cut.
#Erasing someone keeps the chain
Personal details sit outside the chain's hash: an entry hashes a fingerprint of its details, not the details themselves. When a person asks to be erased, their details are blanked and the entry stays, with its time, who asked and what happened, so the chain still checks and says how many entries were erased. Email bodies are never kept in the ledger, only a SHA-256 of each one.
#What this does and doesn't protect against
It protects you from an agent acting through OpenLeads: an MCP client, a workflow, a schedule. Whatever it proposes, the send path checks the file.
It doesn't protect you from something that can write to your home folder. An agent with shell access could edit constitution.toml itself. The next send ledgers the changed file's text, so the edit shows, but it isn't prevented. Don't give an agent write access to ~/.openleads.
#Coming next
The roadmap has the rest: a weekly model spend budget, and scopes proven by a token for agents that connect over the network rather than run on your machine. Discussion: RFC #38.