If by “chain of thought” you mean an auditable record of how the LLM system arrived at an outcome, I would not recommend capturing the model’s private chain-of-thought verbatim. Instead, capture the observable decision process: model calls, prompts/context, tool calls, tool results, structured decisions, outputs, latency, token usage, and evaluation scores.
My pick: Langfuse
langfuse.com is probably the best fit if your goal is a detailed LLM/agent audit trail.
It gives you hierarchical traces where you can see:
- Each individual model invocation
- Inputs/outputs and model metadata
- Tool/function calls and their arguments/results
- Retrieval steps
- Agent/control-flow spans
- Token usage, latency, and cost
- Evaluation/feedback attached to individual steps
Langfuse explicitly recommends recording each model invocation separately in an agent loop rather than collapsing the entire loop into one generation, which makes it much easier to reconstruct what happened when something goes wrong.
It also supports OpenTelemetry, so you can combine LLM traces with conventional application telemetry rather than creating a completely separate observability stack.
What I'd log
Instead of:
Private chain of thought: “I think X because…”
I'd structure the audit record roughly as:
Request
├─ Input / relevant context
├─ Model call #1
│ ├─ Model + parameters
│ ├─ Prompt/context
│ └─ Output / structured decision
├─ Tool call: search_customer
│ ├─ Arguments
│ └─ Result
├─ Model call #2
│ ├─ Context including tool result
│ └─ Structured decision
└─ Final response
For decisions where auditability matters, have the model produce explicit structured decision fields such as:
{
"decision": "deny",
"policy": "POLICY_17",
"evidence": ["account_age", "transaction_pattern"],
"confidence": 0.91
}
That gives you a much more reliable audit artifact than trying to preserve hidden reasoning.
Other good choices
- LangSmith — especially compelling if you're already using LangChain/LangGraph; it supports OpenTelemetry tracing as well.
- OpenTelemetry + your existing observability stack — best if you want vendor-neutral infrastructure.
- Arize / Phoenix — worth considering if evaluation and ML-focused observability are more important than general application tracing.
Bottom line: for a new LLM application where you want to reconstruct agent decisions after the fact, I'd start with Langfuse + OpenTelemetry, and design the audit schema around observable actions and structured decision records, not raw chain-of-thought. Langfuse has integrations for OpenAI, LangChain, Vercel AI SDK and manual instrumentation, so it doesn't require you to redesign the application.
Instead of:
Private chain of thought: “I think X because…”
I'd structure the audit record roughly as:
Request
├─ Input / relevant context
├─ Model call #1
│ ├─ Model + parameters
│ ├─ Prompt/context
│ └─ Output / structured decision
├─ Tool call: search_customer
│ ├─ Arguments
│ └─ Result
├─ Model call #2
│ ├─ Context including tool result
│ └─ Structured decision
└─ Final response
For decisions where auditability matters, have the model produce explicit structured decision fields such as:
{
"decision": "deny",
"policy": "POLICY_17",
"evidence": ["account_age", "transaction_pattern"],
"confidence": 0.91
}
That gives you a much more reliable audit artifact than trying to preserve hidden reasoning.
Other good choices