Observability

Get full visibility into how your Agent is performing.

Agents built on Line have observability into every deployment and call made.

Deployment

Each Agent deployment generates unique a deployment id. You can view the logs generated by a given deployment in the console.

Sample Deployment Logs

Call Logs

You can click into a call and view any logging statements generated by your reasoning code.

Sample Call Logs

Transcripts

Each call has a transcript with independently separated transcribed audio and text to be generated. When you export these transcripts with the API or CLI, these include more granular turn level timestamps.

Sample Call Transcripts

Loggable Events

In some scenarios you’ll want to record events that occurred within your code without necessarily directly tying them to a Tool Call. In order to accommodate for this, we introduce the ability to log events generally.

SDK

In the context of the SDK, we can make any EventType a loggable event by registering it with the user bridge. We can do this in a few different ways, and the serialization will occur automatically depending on whether you’re using Pydantic BaseModel, DataClass, or neither.

register_observability_event(bridge, harness, MyBaseModelEvent) # Uses class name + model_dump()
register_observability_event(bridge, harness, MyDataclassEvent) # Uses class name + asdict()
register_observability_event(bridge, harness, MyCustomEvent) # Uses to_log_event() method

Post registration, the events will automatically be logged over the websocket when they’re broadcast.

Websocket

If you’re not using the SDK and instead just relying on the bare websocket, logging events will look like this:

{
type: "log_event",
event: "event_name",
metadata: {
"key": "value
}
}

Playground

You can view these events in the Playground under the Transcript tab of the call.

Loggable Metrics

You can also record general metrics at different points in your workflow.

SDK

In the context of the SDK, we can log a metric by broadcasting the LogMetric event. Here’s a snippet from the form filling template that exhibits this:

# Record the answer in form manager
success = self.form_manager.record_answer(answer)
if success:
# Log metric for the answered question
if current_question:
metric_name = current_question["id"]
yield LogMetric(name=metric_name, value=answer)
logger.info(f"📊 Logged metric: {metric_name}={answer}")

The user bridge is subscribed to the LogMetric event by default, and it will log it over the websocket by default when it sees that LogMetric has been broadcast.

Websocket

If you’re not using the SDK and instead just relying on the bare websocket, logging metrics will look like this:

{
type: "log_metric",
name: "metric_name",
value: "metric_value"
}

Playground

You can view these events in the Playground under the Transcript tab of the call.

Loggable Metrics in the Playground

Call Recordings

Call recordings can be downloaded from the playground.

Sample Call Recordings

Webhooks

A webhook can be sent to a configurable endpoint when a call starts, completes or fails. Each payload includes the full transcript of the conversation.

Sample Call Webhooks

In your webhook handler, be sure to verify that all incoming requests have an x-webhook-secret header set to this secret value, to verify that the requests are coming from Cartesia. A sample payload is listed below.

1{
2 type: "call_completed | call_failed | call_started",
3 request_id: "MZ4958bfe4940bf0ef6cc92f8c6cfa1a1f",
4 agent_id: "agent_demo",
5 webhook_id: "agent_webhook_P3MgdLf1cpaucZJ7xWehCC",
6 body: [
7 {
8 end_timestamp: 10.387875000000001,
9 role: "assistant",
10 start_timestamp: 1.175,
11 text: "Hi there! I'm Savannah, a voice agent built on Cartesia's new Voice Agents platform. Who do I have the pleasure of speaking with today?",
12 tts_ttfb: 0.20372509956359863,
13 }
14 ],
15 timestamp: "2025-06-24T23:36:40.360473878Z",
16}