- class langgraph_agent_toolkit.core.observability.langsmith.LangsmithObservability(remote_first=False)[source][source]
Bases:
BaseObservabilityPlatformLangsmith implementation of observability platform.
Initialize LangsmithObservability.
- Parameters:
remote_first (bool) – If True, prioritize remote prompts over local ones.
- __init__(remote_first=False)[source][source]
Initialize LangsmithObservability.
- Parameters:
remote_first (bool) – If True, prioritize remote prompts over local ones.
- get_callback_handler(**kwargs)[source][source]
Get the callback handler - LangSmith uses automatic tracing.
- Return type:
None
- record_feedback(run_id, key, score, **kwargs)[source][source]
Record feedback for a run to LangSmith.
- push_prompt(name, prompt_template, metadata=None, force_create_new_version=True)[source][source]
Push a prompt to LangSmith.
- Parameters:
- Return type:
None
- pull_prompt(name, template_format='f-string', **kwargs)[source][source]
Pull a prompt from LangSmith.
- delete_prompt(name)[source][source]
Delete a prompt from LangSmith.
- Parameters:
name (str) – Name of the prompt to delete
- Return type:
None
- trace_context(run_id, **kwargs)[source]
Create a trace context for the execution.
Override in subclasses for platform-specific implementation.
- Parameters:
run_id (str) – The run ID to use as trace ID
**kwargs – Additional context parameters (user_id, input, etc.)
- Yields:
None (or platform-specific context object)