ekanos agents test runs your latest version, published or not, on one team first, so you can read what it did before anyone else gets it.
These commands are for a Source admin. A developer seat gets forbidden (exit 5). They ship in @ekanos/cli 0.11.0; run ekanos upgrade --check to see whether yours has them.
What a test run is
- The latest version, on one team.
ekanos agents test <key> --team <slug>runs the newest version you stored withagents apply. Nothing is published, and no other team sees it. - The team’s own agent, with the team’s own connections. The run is recorded on that team’s copy of the agent, the same way a run from Run now in the app is. It runs as the team member who turned the agent on.
- Every write waits for a person. Whatever your draft’s
policysays, a test run sends every write, and every delegation to another agent, to approval. Reads follow the draft’s policy. - On its own, it can narrow, never widen. Every tool call is still checked against the team’s stored agent. A draft can call fewer tools than the version the team runs, and a tool that only the draft grants is refused; the CLI warns when that can happen. To test a tool the draft adds, pin the team to the draft first.
- It is marked. A test run carries
draftTemplateVersion, the version it ran, inruns listandruns show.
--input.
Before you start
- The agent has been published once, or you test it on a team pinned to the draft (see below). A team turns on only a published version by itself.
-
The test team has it turned on. Use a team you keep for testing, not a customer’s team:
enableruns the agent as the team’s owner unless you pass--as <member-email>for another member who manages agents. That member’s connections are the ones the agent uses. -
Your draft is stored.
ekanos agents apply agents/support-triage --source acme.
Run the draft
--prompt gives the run a request. --input <file.json> passes a JSON payload instead, the way a trigger would; the agent treats it as untrusted data. Give one or both.
--follow, the command prints the run ID and returns. With it, the CLI prints each message and tool call as it lands, and returns when the run ends or stops to wait for an approval, or after 15 minutes. It exits 0 in all three cases, so read the status rather than the exit code.
Test a draft that adds tools, or was never published
ekanos teams agents pin <team> <key> --draft puts one team’s agent on the template’s latest, unpublished version. For an agent the team hasn’t turned on yet, including one that has never been published, use ekanos teams agents enable <team> <key> --draft. The team’s agent then holds the draft, so a test can use any tool the draft grants:
- Only that team has it. Every other team keeps the version it runs, and no team can pin a draft from the app.
- Only a run you start runs it.
agents testandruns startwork. The team’s triggers, schedules, webhooks and hand-offs from other agents don’t start it, so a real ticket never reaches a draft. - Every write still waits for a person, whatever the draft’s policy says. The tool executor refuses to let a draft write on its own.
- New access is confirmed by whoever sets the agent up. A draft that reaches further, such as a new product, drops the testing team’s confirmation until you or a team manager confirms again. Once published, the publish is the confirmation: every following team that had confirmed moves to it, still confirmed, in the publisher’s name.
teams agents listshows it asdraft v3 (testing, unpublished).
ekanos agents publish (or rollback) puts the testing team back to following, so it moves to the published version with every other following team. To stop testing without publishing, pin the team to a published version, or unpin it to follow. For an agent that has never been published, use teams agents disable. Applying a newer draft doesn’t move the team: run pin --draft again to test it.
Read what it did
runs show prints the status, the version, each tool call with its effect and how it was authorized, anything waiting, and the output. --json adds the full record. data is:
agents test --json without --follow returns { host, source, team, runId, agent, draftTemplateVersion }. With --follow, it returns the same shape as runs show, plus started.
Decide what it waits on
approvals list shows what is pending on the team. edit replaces a reply draft’s text with the contents of the file and sends it; it works on reply drafts only. Deciding one that someone else already decided is invalid_state (exit 7). The run picks the decision up and carries on; follow it with runs show.
Your decision is recorded as yours, with the authority of someone who manages the team’s agents.
Reply drafts from a test run are not yet marked as tests in the team’s
approval inbox. Anyone who reviews the test team’s drafts sees them, which is
one more reason to test on a team you keep for it.
Script a leak suite
Becauseruns show --json is stable, you can turn “the agent must never do X” into a script. This one runs adversarial prompts against the draft and fails if the agent:
- called a tool it must never call,
- ran a write without a person approving it,
- put a canary string (planted in another team’s data) or something shaped like a credential in its output or transcript.
leak-suite.sh
- In a test run a write never runs unattended, so
unattendedstays0unless something is wrong. Keep the check: it is the one that proves the guarantee. - A forbidden tool is best kept out of
toolsaltogether. The check catches a draft that grants it by accident. - To check that one team’s agent can’t reach another team’s data, plant the canary in a second test team’s tickets or skills, and run the suite on the first.
toolCallslists the calls that ran. A write that is still waiting is inapprovals, with what the agent proposed inargs; assert on those too if a proposal alone would be a leak.- Every CLI error has its own exit code and an
error.codein the JSON envelope. See JSON output and exit codes.
Then publish
When the runs read right, publish the version you tested:ekanos agents rollback support-triage --to 3 --yes returns them.
See also: Commands reference, Build agents with Claude.