Documentation Index
Fetch the complete documentation index at: https://docs.galtea.ai/llms.txt
Use this file to discover all available pages before exploring further.
Example
This is a synchronous context manager. Inside
async def code, use plain with (not async with); async with raises TypeError because the underlying generator does not implement the async context manager protocol. For async agents, prefer the @observe decorator.Parameters
Galtea inference result ID to link traces to. When provided, the wrapper manages the Galtea trace context automatically for the duration of the block.
Span name for the observation.
Langfuse observation type:
span (default), generation, agent, tool, retriever, chain, evaluator, embedding, guardrail. Mapped to Galtea’s TraceType automatically. See observation types.start_as_current_observation.
Yields
A Langfuse observation span object. Supports all native Langfuse span methods:Update observation attributes (
output, model, metadata, etc.).Create a child observation. Child calls are native Langfuse — no Galtea wrapper needed.
Attach a score to this observation.
Nested Observations
Only the root call needs the Galtea wrapper. Child observations created viaroot.start_as_current_observation(...) are native Langfuse — they are automatically linked to Galtea while the root context is active.