Speko Docs

@spekoai/cli

Build and operate voice agents from the terminal, including from a coding agent.

speko-cli covers the Speko API from a shell: sign in, create agents, place calls, read transcripts, and prove a prompt change did not break anything. It exists so a coding agent can build on Speko without a person clicking through the console.

Install

npm install -g @spekoai/cli
speko-cli login

Or without installing:

npx @spekoai/cli login

The command is speko-cli, not speko@spekoai/mcp-calls already uses that name.

Teach a coding agent about it

speko-cli init

Writes .claude/skills/speko/SKILL.md, a marked block in AGENTS.md, and .env.example. It never writes a credential into the project, and never overwrites an existing file without --force.

Every command also takes --help, and asking never performs the action — so an agent can explore the surface without side effects.

Commands

CommandWhat it does
login / logout / whoamiSign this device in, out, and check who it is
auth list / auth revokeSee and revoke every signed-in terminal
initWrite Speko guidance for coding agents into the repo
call --to <e164>Place a call, wait for it, print the transcript
logs <session_id>Call events, --follow to stream
doctorWhy calls are failing: credit, providers, scopes, last failure
explain <CODE>What an error code means, and whether retrying helps
bench [stage]Measured provider scores — the numbers routing decides on
evalGenerate a test suite for an agent, run it, report regressions
mcpPoint an MCP client at Speko

Plus every operation in the OpenAPI document, generated rather than hand-written:

speko-cli agents                    # list a group's operations
speko-cli agents list               # every agent in the workspace
speko-cli agents get <agent_id>
speko-cli agents create --data '{"name":"Front desk"}'

Groups come from the spec's tags: agents, call-control, providers, sms, telephony, voice, webhooks. The canonical name is the operationId, kebab-cased (listAgentslist-agents); list, get, create, update and delete are aliases where a group makes them unambiguous.

Path parameters are positional in URL order, query parameters are --flags, and a request body comes from --data JSON, --file PATH, or stdin. Add --json to any command for machine-readable output.

The development loop

speko-cli call --to +15551234567 --agent <agent_id>   # place it, wait, print the transcript
speko-cli logs <session_id> --follow                  # events as they arrive
speko-cli eval run --agent <agent_id>                 # prove the change is safe

call prints the session id before it starts waiting, so the id survives a timeout or a Ctrl-C. --no-wait returns immediately. A call that ends failed exits 1, so a script placing calls in a loop can notice.

The transcript is the only way to verify a prompt change altered behaviour — a diff cannot show that an agent stopped confirming before it booked.

What the CLI will not do

Some acts belong to a person, so the CLI prints the console URL instead of doing them:

OperationWhy
telephony submit-phone-number-kybAsserts you are authorized to bind the business
telephony create-phone-numberSpends money and starts a recurring charge
telephony delete-phone-numberReturns the number to the carrier permanently

There is no command for API keys at all. A key is a long-lived organization credential destined for production, so it is issued in the console by a person.

agents delete-agent and sms redact-sms-conversation are destructive and deliberately stay: the first is how anyone iterating discards a test agent, and the second is plausibly how a data-deletion request gets serviced, which wants to be scriptable rather than clicked.

Environment

VariableDefault
SPEKO_API_URLhttps://api.speko.dev
SPEKO_DASHBOARD_URLhttps://platform.speko.ai
XDG_CONFIG_HOME~/.config

Source: github.com/SpekoAI/cli

On this page