Skip to main content
If you built a custom code-first agent using the Line SDK, then your agent’s prompt, model, voice, and tools all have direct equivalents on Managed Agents. What changes is that you simply configure these via UI or API instead of deploying custom code. This guide helps you map each piece.
Cartesia stops hosting Line SDK agents on December 1, 2026. This covers code-first agents you deploy as Python. Your Line agents keep running until then, so you can build the managed version, test it, and switch traffic when you’re ready.
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

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.
For a limited time (until October 1, 2026), LLM usage is free.

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.
If one of these blocks your migration, or you need something that isn’t listed here, let us know at support@cartesia.ai.

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. Set self_hosted_deployment_url on the agent:
To disconnect the agent from your code, send 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
The same agent as a configuration:
The configuration examples in the rest of this guide are 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 Running the agent

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 with claude-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 the pre_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.
The same tool on Managed Agents:
Field for field: 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.
And on Managed Agents:
See system tools for the settings each slot takes.

Client tools

In Line, an agent reached into your app by yielding a custom event from a passthrough tool:
That becomes a client tool, created with the same POST /v1/agents/tools endpoint:
Cartesia sends a 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’s config.tools, which replaces the whole list on every update:
System tools are separate, on 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’s config 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.
Two things to check in your client:
  • stream_id is gone. One connection is one call.
  • Turn fields were renamed. was_interrupted to interrupted, start_timestamp and end_timestamp to start_time and end_time, and id to turn.
The WebSocket API documents every event in full.

Tell us what you built

If your Line agents run custom logic with no equivalent on Managed Agents, email support@cartesia.ai and tell us what you built. We’ll help you port it over.