If you had built an agent on the Playground before (without deploying custom code), your agent has already been migrated and should have access to all the new features described here automatically.
What carries over
- Phone numbers. Keep the numbers you have and assign them to a managed agent.
- Pricing. Per-minute voice agents rates are unchanged.
- Call history. Recordings and transcripts stay, and
GET /agents/calls/{call_id}returns them as before. - APIs. Calls, batch calling, phone numbers, and metrics work against managed agents.
What’s new
Line agents ran on your own provider key. Managed Agents don’t need one: pick a model from the LLM catalog and Cartesia runs it, billing token usage as passthrough. There’s no provider account to maintain and no separate bill from the model provider.Coming soon
- Knowledge bases. Attaching documents an agent can retrieve during a call.
- Multiple languages per agent. Agents currently take a single
language.primary. - Call event webhooks. Lifecycle events for a call, delivered to your endpoint.
Self-hosted agent code
Self-hosted agent code keeps working after December 1. Only agents Cartesia hosts need to migrate — if you run the agent server yourself and point Cartesia at its URL, nothing changes. The Line SDK is open source on GitHub and works with self-hosted agents, so you can keep the code you have. Reach out at support@cartesia.ai for guidance on hosting it on your own servers. Setself_hosted_deployment_url on the agent:
self_hosted_deployment_url as null or run cartesia disconnect.
How to migrate
Build the managed agent
Let’s start with a small agent and add features back piece by piece. Here’s a basic Line agent:main.py
PATCH /v1/agents/{agent_id} bodies. Send only the fields you’re changing; the rest of the configuration stays as it is.
Configuration map
Prompt and model
Voice and audio
Tools
Managed Agents do not yet support Line SDK agent-to-agent handoffs with
agent_as_handoff or @handoff_tool. These handoffs route the same conversation to another Line SDK agent; transfer_to_number sends a phone call to a configured phone number instead. Most flows work on a single managed agent. If you need agent-to-agent handoff, you can keep the Line SDK agent self-hosted, and reach out to us so we can understand your use case better.
Running the agent
cartesia deploy, cartesia deployments ls, and cartesia env set manage hosted Line SDK code and its deployments; they do not manage Managed Agent configuration. The right column shows the Managed Agents replacement.
Prompt, model, and greeting
LLMs come from Cartesia’s catalog instead of a provider key of your own. Claude Haiku 4.5 can now be used withclaude-haiku-4.5. You no longer need to specify an API key — Cartesia bills model usage per call. GET /v1/agents/models lists the available IDs with their latency and pricing.
Voice and audio
Line allowed you to override the configured TTS voice in thepre_call_handler. On a managed agent it’s part of the configuration:
language.primary covers both speech recognition and synthesis, replacing the separate tts.language and stt.language settings. keyterms, speed, volume, and emotion are new; see Agent configuration for the full set.
Tools
Webhook tools
http_server_tool becomes a webhook tool: Cartesia calls an HTTPS endpoint and feeds the response back to the agent. Point it at your backend services, a third-party API, or any server endpoint you can reach over HTTPS.
Credentials move off
cartesia env set and onto the tool. Cartesia stores each one as a secret, and secret values are write-only, so a read returns a placeholder rather than the value. For a standard bearer token or basic auth, set api_schema.authentication instead of a header. See Headers and authentication for updating and removing them.
Built-in tools
Line’s built-in tools become system tools: fields on a config instead of code you import.Client tools
In Line, an agent reached into your app by yielding a custom event from a passthrough tool:POST /v1/agents/tools endpoint:
client_tool_call over the WebSocket when the agent uses it, and your app opens the cart:
expects_response is false here, so nothing is sent back. Set it to true and answer with client_tool_result when the agent needs the result.
Attach tools to an agent
Creating a webhook or client tool doesn’t attach it to anything. Add its ID to the agent’sconfig.tools, which replaces the whole list on every update:
config.system_tools.
Versions replace deployments
There’s nothing to build or deploy. Every configuration change is validated and saved as an immutable version, live for new calls right away. A call already in progress finishes on the version it started with. To roll back, read an old version’sconfig and send it through PATCH. That records the rollback as a new version instead of rewriting history.
Connect your clients
The agent WebSocket moved to/v1/agents/websocket/{agent_id}. Authentication is unchanged — X-API-Key from a server, or a short-lived token from the /access-token endpoint’s agent grant from a browser.
stream_idis gone. One connection is one call.- Turn fields were renamed.
was_interruptedtointerrupted,start_timestampandend_timestamptostart_timeandend_time, andidtoturn.