Observability
Talon integrates with Langfuse for production observability. Every agent run, sub-agent invocation, MCP tool call, and context rotation is traced and exportable.
- Create a Langfuse account (cloud or self-hosted)
- Create a project and copy the public/secret key pair
- Add the keys to your environment:
LANGFUSE_PUBLIC_KEY=pk-lf-...LANGFUSE_SECRET_KEY=sk-lf-...- 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.
Configuration
Section titled “Configuration”| Field | Type | Default | Description |
|---|---|---|---|
enabled | boolean | false | Enable tracing |
publicKey | string | — | Langfuse public key (required when enabled) |
secretKey | string | — | Langfuse secret key (required when enabled) |
baseUrl | string | https://cloud.langfuse.com | Langfuse instance URL (for self-hosted) |
environment | string | production | Environment tag on all traces |
release | string | — | Version tag |
owner | string | — | Owner tag |
exportMode | batched | immediate | batched | batched buffers events for efficiency; immediate flushes on every event |
flushAt | integer | 20 | Batch size before auto-flush |
flushIntervalSeconds | integer | 5 | Max seconds between flushes |
What gets traced
Section titled “What gets traced”Each trace corresponds to one agent run (one queue item processed). Within a trace, Langfuse shows:
| Span | Description |
|---|---|
| Agent run | Top-level trace — persona, thread, provider, model, duration |
| Generation | Each LLM call with input/output tokens, cost, model ID |
| Tool call | Each tool invocation — host tools, MCP tools, sub-agents |
| Context assembly | System prompt construction including memory retrieval |
| Sub-agent | Nested traces for sub-agent invocations (session-summarizer, memory-groomer, etc.) |
| Context rotation | Session 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.
Browser voice traces
Section titled “Browser voice traces”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.
Interpreting the data
Section titled “Interpreting the data”Cost per persona
Section titled “Cost per persona”Filter traces by persona name to see which agents cost the most. Compare input vs. cache-read tokens to gauge prompt cache efficiency.
Context rotation frequency
Section titled “Context rotation frequency”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 overhead
Section titled “Sub-agent overhead”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.
Latency breakdown
Section titled “Latency breakdown”Each span shows wall-clock duration. Use this to identify whether latency comes from the LLM call, tool execution, or context assembly.
Self-hosted Langfuse
Section titled “Self-hosted Langfuse”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