Skip to main content
No flags opens the wizard, which Deploy the First Agent walks through. Any flag is the non-interactive form; --name is the one required flag, and leaving it out fails with one line and a hint. The flag form writes no memory block, where the wizard, for a configuration project, adds one by default. create writes agent.json, instructions.md, README.md, AGENTS.md and .gitignore, and Project Layout shows the files. Run inside a project, create refuses and points at add and at editing agent.json; --force nests a new project there anyway. It ends by printing the next commands, dev, chat --local, deploy, status and logs.

A Code-based Project

--kind code scaffolds a class on the Agent Runtime SDK in place of instructions.md. The other route to a code-based project is export, once a configuration project needs code.

Scaffold

agent.json keeps everything a configuration project has, numbers, channels, tools, memory, limits and secret names, and telnyx-acp add, remove, set and unset keep editing it. Only the agent’s behavior moves into the class.

The Class

The scaffolded src/agent.ts is the SDK’s Agent with the contract the CLI and the channels rely on, and one method to fill in:
receive is what invoke, chat and the browser page call, and receiveVia is what a text or an email arrives through; both record the message once per key and queue the turn, so the caller is acknowledged within the 30-second budget. process runs as a task with minutes to think: it is the one method to change, where the history is handed to a model or a framework; a reply to a text or an email goes back out through deliver. run is the status invoke polls, fetch serves the streams and RPC over HTTP, and authorize admits callers (everyone, in the beta phase). The message log, the state and the schedule are the instance’s own and survive restarts. Bring Your Own Framework is where process hands the history to a model or a framework.

Run It Locally

On a code-based project dev writes .telnyx/, what deploy would ship, and hands over to telnyx-edge dev, the local actor stack in Docker, with the class reloaded on save; the stack keeps running after Ctrl-C, and docker compose -f .telnyx/dev/compose.yaml down stops it. chat --local and invoke … --local reach the class through its receive, and the reply is the one process produces. Texts, email and memory need a deploy.

Deploy

There is no container to build. deploy writes .telnyx/ inside the project, the manifest, the entry that mounts the class, the types and the dependencies, bundles the entry’s module graph locally and ships one file; the platform builds it and rolls it out, typically about ten minutes the first time (deploy waits up to 25). From there the project is operated like any other: status, logs, versions, delete, and add phone to give it a number; a text then arrives through receiveVia and the reply goes back through deliver. A call to that number does not reach this class: the scaffold has no voice layer, so the call is answered and the media stream finds nothing to talk to. A class that takes calls wraps the base in voice() from @telnyx/edge-runtime/voice and implements the turn engine and warmCall, as The Voice Loop and The Call Webhook show; until it does, the number is for texts.