SDKs
Pick the right package for your stack, from a typed REST client to a full voice agent.
VoiceLayer ships SDKs for TypeScript and Python, and every call works with plain curl too. Each SDK is generated from the same OpenAPI document as the API reference, so it covers every operation with typed requests, responses and errors.
Client libraries
Use a client library when your own code sends and receives messages.
| TypeScript | Python | |
|---|---|---|
| Package | @voicelayer/api | voicelayer |
| Runtime | Node.js 18 or later | Python 3.9 or later |
| Webhook check | verifyWebhook | verify_webhook |
| Event stream | streamEvents | stream_events |
| Guide | TypeScript SDK | Python SDK |
TypeScript:
npm install @voicelayer/apiPython:
pip install voicelayerPublishing soon
sdks/python/voicelayer), as shown.pip install ./voicelayer/sdks/python/voicelayerBoth clients ignore fields and enum values they do not know yet, so a new event type or error code never breaks an older client.
Framework packages
Use a framework package when an AI agent framework should talk on your channels. Each one gives the framework the VoiceLayer channel tools over MCP, and can also answer incoming messages with your agent.
Claude Agent SDK
@voicelayer/agents/claude
OpenAI Agents SDK
@voicelayer/agents/openai
Vercel AI SDK
@voicelayer/agents/ai-sdk
LangChain and LangGraph
@voicelayer/agents/langchain
Python frameworks
voicelayer-agents for Claude, OpenAI Agents and LangGraph
Answer messages from your code
@voicelayer/sdk/direct runs a handler for every message in the conversations your code controls. You write onMessage; the runner reads the event stream, resumes after restarts, and sends your replies safely. See Direct mode.
Voice agents
@voicelayer/sdk defines a voice agent in one TypeScript file: its prompt, models, tools and hooks. VoiceLayer runs the call; your worker runs your code. See Voice agents in code.
npm install @voicelayer/sdkNext steps
- Send your first message in five minutes.
- Authentication and API keys: which key each package needs.