set_test_context
Set user, session, and agent identities for Langfuse attribution testing to simulate different contexts in traces.
Instructions
Set test context values for Langfuse attribution demos.
Changes here affect what user_id, session_id, and metadata are sent to Langfuse traces. Use this to test filtering by different users or sessions in the Langfuse dashboard.
Args: user_id: User identity (e.g., "alice", "bob"). org_id: Organization identity (e.g., "acme", "globex"). session_id: Session identifier for grouping traces. agent_id: Agent identity (e.g., "claude", "gpt4").
Returns: Updated context state and example of Langfuse attributes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| org_id | No | ||
| user_id | No | ||
| agent_id | No | ||
| session_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||