Skip to content

Observability

Talon integrates with Langfuse for production observability. Every agent run, sub-agent invocation, MCP tool call, and context rotation is traced and exportable.

  1. Create a Langfuse account (cloud or self-hosted)
  2. Create a project and copy the public/secret key pair
  3. Add the keys to your environment:
.env
LANGFUSE_PUBLIC_KEY=pk-lf-...
LANGFUSE_SECRET_KEY=sk-lf-...
  1. Enable in talond.yaml:
langfuse:
enabled: true
publicKey: ${LANGFUSE_PUBLIC_KEY}
secretKey: ${LANGFUSE_SECRET_KEY}

When Langfuse is disabled, Talon loads no Langfuse libraries and makes no network calls. If initialization fails while enabled is true, Talon logs a warning and runs without tracing. Check the daemon log if traces do not arrive.

FieldTypeDefaultDescription
enabledbooleanfalseEnable tracing
publicKeystring—Langfuse public key (required when enabled)
secretKeystring—Langfuse secret key (required when enabled)
baseUrlstringhttps://cloud.langfuse.comLangfuse instance URL (for self-hosted)
environmentstringproductionEnvironment tag on all traces
releasestring—Version tag
ownerstring—Owner tag
exportModebatched | immediatebatchedbatched buffers events for efficiency; immediate flushes on every event
flushAtinteger20Batch size before auto-flush
flushIntervalSecondsinteger5Max seconds between flushes

Each trace corresponds to one agent run (one queue item processed). Within a trace, Langfuse shows:

SpanDescription
Agent runTop-level trace — persona, thread, provider, model, duration
GenerationEach LLM call with input/output tokens, cost, model ID
Tool callEach tool invocation — host tools, MCP tools, sub-agents
Context assemblySystem prompt construction including memory retrieval
Sub-agentNested traces for sub-agent invocations (session-summarizer, memory-groomer, etc.)
Context rotationSession rotation events with before/after token counts

Token usage (input, output, cache read, cache write) and cost are attached to each generation span when the provider reports them.

Traces from browser voice sessions carry no content. This covers the agent run, provider tool events, the host-tools bridge and nested sub-agent spans.

  • Transcripts, prompts, tool arguments, tool results and free-form errors are not sent to Langfuse.
  • Correlation identifiers are limited to 256 characters. Allowlisted metadata is limited to 4096 UTF-8 bytes.
  • Native AI SDK telemetry is disabled for runs that voice starts.
  • A failure to set up, update or export an observation does not change or retry the underlying work.

When a voice backend run fails, the user sees a generic error. The failed run’s error field holds only allowlisted category, code, HTTP status and stage metadata. Provider messages, response bodies, headers and URLs are excluded.

The local SQLite database and the daemon logs can still contain bounded sensitive text.

Filter traces by persona name to see which agents cost the most. Compare input vs. cache-read tokens to gauge prompt cache efficiency.

Look for context rotation spans. If they fire too often, increase thresholdRatio. If they never fire, your conversations might be short enough that rotation isn’t needed.

Sub-agent invocations appear as nested traces. If session-summarizer or memory-groomer runs are expensive, consider adjusting their scheduling or switching them to a cheaper model.

Each span shows wall-clock duration. Use this to identify whether latency comes from the LLM call, tool execution, or context assembly.

For air-gapped or on-premises deployments, point baseUrl to your Langfuse instance:

langfuse:
enabled: true
publicKey: ${LANGFUSE_PUBLIC_KEY}
secretKey: ${LANGFUSE_SECRET_KEY}
baseUrl: https://langfuse.internal.example.com