Skip to main content
No framework — your process() method is the agent loop. The Agent SDK supplies the durable parts (history, retries, the follow-up timer); the LLM is one call on the pre-authenticated Telnyx API binding, which speaks the this.messages.toOpenAI() payload directly — no API key to manage. Prefer another provider? Any OpenAI-compatible endpoint works over fetch, with its key in a secret. Each customer gets their own Conversation actor, keyed by phone number. src/conversation.ts — the actor:
src/index.ts — the function that routes inbound webhooks to the right actor:
Verify Telnyx webhook signatures before processing — see receiving webhooks. The examples above omit verification for brevity; production code must check the telnyx-signature-ed25519 header.
telnyx.toml:
That’s the whole deployment — the [telnyx] binding carries auth, so there is no API key to provision. Prefer a framework running the loop instead? See the LangGraph version of this same agent.
Task delivery is at-least-once: a crash after messages.add() or messages.send() succeeds retries the whole process() method. For production, guard outbound side effects — e.g. check state before sending, or use a stable message ID to deduplicate.