Skip to content

Commit d2bba5e

Browse files
authored
Merge pull request #12 from NicholasGoh/feat/template-docs-langfuse-videos
Feat/template docs langfuse videos
2 parents 81a1941 + d37c4f6 commit d2bba5e

File tree

4 files changed

+54
-0
lines changed

4 files changed

+54
-0
lines changed

docs/getting-started/langfuse.mdx

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,64 @@
22
sidebar_position: 6
33
---
44

5+
import ReactPlayer from 'react-player'
6+
57
# Langfuse
68

79
> Traces, evals, prompt management and metrics to debug and improve your LLM application.
810
911
Learn more [here](https://langfuse.com/)
1012

1113
[![LangFuse](https://img.shields.io/github/stars/langfuse/langfuse?logo=langfuse&label=LangFuse)](https://github.com/langfuse/langfuse)
14+
15+
## Video Demos
16+
17+
Below is an outline of the steps involved in a simple Math Agent. Key elements illustrated include:
18+
19+
- A visual breakdown of each step—e.g., when the agent invokes a tool and when control returns to the agent
20+
- Inputs and outputs at each stage of the process:
21+
- **User to Agent**: The user asks a natural language question — e.g., `What is 1 + 1?`
22+
- **Agent to Tool**: The agent decides to call a calculator tool with structured arguments — e.g., `args: { a: 1, b: 1 }`.
23+
- **Tool to Agent**: The tool executes the operation and returns the result — e.g., `2`.
24+
- **Agent to User**: The agent responds with the final answer in natural language — e.g., `1 + 1 = 2`.
25+
- The full chat history throughout the interaction
26+
- Latency and cost associated with each node
27+
28+
### Step 1: Math Agent (User to Agent → Agent to Tool)
29+
30+
<ReactPlayer playing controls url='/vid/fastapi-mcp-langgraph-template/langfuse/timeline-1-agent.mp4' />
31+
32+
<br />
33+
34+
This section shows:
35+
36+
- **User to Agent**: The user asks a natural language question — e.g., `What is 1 + 1?`
37+
- **Agent to Tool**: The agent decides to call a calculator tool with structured arguments — e.g., `args: { a: 1, b: 1 }`.
38+
- **Full Chat History Throughout the Interaction**: You can inspect earlier user-agent messages. For instance:
39+
40+
```text
41+
User: reply only no
42+
Agent: No.
43+
```
44+
45+
In this example, the agent responded directly without calling any tools.
46+
47+
### Step 2: Tool Call (Tool to Agent)
48+
49+
<ReactPlayer playing controls url='/vid/fastapi-mcp-langgraph-template/langfuse/timeline-2-tool-call.mp4' />
50+
51+
<br />
52+
53+
This section shows:
54+
55+
- **Tool to Agent**: The tool executes the operation and returns the result — e.g., `2`.
56+
57+
### Step 3: Math Agent (Agent to User)
58+
59+
<ReactPlayer playing controls url='/vid/fastapi-mcp-langgraph-template/langfuse/timeline-3-agent.mp4' />
60+
61+
<br />
62+
63+
This section shows:
64+
65+
- **Agent to User**: The agent responds with the final answer in natural language — e.g., `1 + 1 = 2`.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)