Action Context
Useaction_context to send actions with user identity:
Context Parameters
- user_id (optional): Identified user ID
- anonymous_id (required): Anonymous session/request ID
Sending Actions
Within an action context, usectx.send():
Standard Attributes
Usevalue.action.* prefix for standard attributes:
| Attribute | Description |
|---|---|
value.action.name | Action name (set automatically) |
value.action.description | Human-readable description |
value.action.user_id | User ID (set from context) |
value.action.anonymous_id | Anonymous ID (set from context) |
value.action.user_attributes.
Async Usage
Auto-Instrumentation
Automatically capture LLM calls without manual instrumentation:Supported Libraries
| Library | Extra | Install |
|---|---|---|
| Google Generative AI (Gemini) | genai | pip install value-python[genai] |
| LangChain | langchain | pip install value-python[langchain] |