Summary
Integrate langfuse/langfuse (25k+ stars) for LLM observability — tracking token usage, latency, cost, and prompt/response quality across all Claude invocations.
Motivation
Burner has no visibility into which RALPH loops burn the most tokens, which prompts are inefficient, or how response quality varies over time. Langfuse provides a lightweight tracing layer that records every LLM call with metadata, enabling cost optimization and self-improvement feedback.
Proposal
- Add Langfuse JS SDK as a dependency
- Wrap Claude CLI invocations in
src/agent.ts with Langfuse trace spans
- Track: token counts, latency, model used, loop/thread context, success/failure
- Optional: score outputs for self-improvement feedback loops
- Self-hostable or cloud — operator's choice
References
Summary
Integrate langfuse/langfuse (25k+ stars) for LLM observability — tracking token usage, latency, cost, and prompt/response quality across all Claude invocations.
Motivation
Burner has no visibility into which RALPH loops burn the most tokens, which prompts are inefficient, or how response quality varies over time. Langfuse provides a lightweight tracing layer that records every LLM call with metadata, enabling cost optimization and self-improvement feedback.
Proposal
src/agent.tswith Langfuse trace spansReferences