Your first run
In this tutorial you connect nexus-agents to the coding agent you already use
and give it one goal through the run tool. You will see run decide how to
handle the goal, then carry it out as a live consensus vote, then check the
audit log.
You need:
- Node.js 24 and npm.
- Claude Code or Codex CLI, installed and signed in. nexus-agents seats its voters on these two CLIs.
The vote in step 6 makes real model calls through your CLI subscription.
1. Install nexus-agents
npm install -g nexus-agents nexus-agents --versionYou should see:
nexus-agents v11.1.3A newer version number is fine.
2. Check that a voter CLI is ready
nexus-agents doctorFind the
Checking CLI installations...section. You should see a✓block for Claude or Codex withAuth: CLI auth:✓ Claude CLI Version: 2.1.292 (supported) Auth: CLI auth … ✓ Codex CLI Version: 0.160.0 (supported) Auth: CLI authFurther down you should see:
✓ MCP Server mode: ReadyIf neither Claude nor Codex shows
✓, sign in to one of them (runclaudeorcodex login) and rundoctoragain. Lines for other CLIs, and a finalSummary: N issue(s) found, do not stop this tutorial.3. Connect nexus-agents to your agent
Change to the root of a project you work in, then run:
nexus-agents setupsetupregisters nexus-agents as an MCP server with every supported coding CLI it finds, and prints what it configured. Look for the line that names Claude Code or Codex. It also writes.nexus-agents/nexus-agents.yamlin the project, which turns on the audit log you will check in step 7.Start your coding agent again from the same project directory so that it starts the server with that configuration.
4. Ask
runfor a routing decisionIn your coding agent, type:
Call the nexus-agents
runtool with the goal “Should we use SQLite over JSON files for the outcome store?” andrequiresConsensus: true. Do not setexecute.Without
execute,runonly decides; it calls no model. You should see a result like this one:{ "strategy": "consensus", "reasoning": "pattern \"consensus\" → consensus (manifest consensus; Task requires multi-perspective consensus voting)", "confidence": 0.9, "alternatives": [], "needsShaping": false, "recommendedTool": "consensus_vote", "decisionId": "a0f2bf09-2c36-4de9-a50c-7e34c5ac6371", "note": "Routing decision only (read-only). Invoke the recommendedTool to execute, or re-run with execute: true for inline execution. …" }Read three fields:
strategyis how nexus-agents will handle the goal: here, a consensus vote.recommendedToolis the tool that strategy uses.confidenceis how sure the router is of that choice.
Your
decisionIdwill differ.If your agent says it has no
runtool, the server is not registered. Follow Register the MCP server manually, restart the agent, and repeat this step.5. Run it for real
Now ask:
Call the nexus-agents
runtool again with the same goal,requiresConsensus: trueandexecute: true.This time the full seven-voter panel deliberates through your signed-in CLI, so the call takes longer than step 4.
6. Read the vote
The result now contains the vote. Look for:
decision:approved,rejectedorno_quorum.- Each voter’s role, decision, confidence and rationale.
- The vote counts and the approval percentage.
- A
voteRecordwithpersisted: true, which means the vote was written to the vote ledger.
Any of the three decisions means the run worked.
no_quorummeans too few voters answered; What a vote result means explains each outcome.7. Verify the audit chain
Run
doctoragain and find theauditline underData directory layout. It gives the audit directory for this repository, for example:✓ audit /home/you/project/.nexus-agents/auditAsk your agent:
Call the nexus-agents
verify_audit_chaintool withlogDirset to.nexus-agents/audit.Use the path from your
doctoroutput if it differs. The result has aneventCountand averificationobject. You should see:eventCountgreater than 0: the server recorded your tool calls."ok": trueinsideverification: every event links to the one before it."tamperedCount": 0: no recorded event was altered.
If
verificationcontains"notVerified": "empty"andeventCountis 0, the directory holds no events and nothing was checked. That happens when the server did not load the project’s configuration: check that you ransetupand started your agent from the same project directory.
What you did
You installed nexus-agents, connected it to your agent, saw run choose a
strategy for a goal without spending anything, ran that strategy as a live
vote, and checked the audit log.