Skip to main content
Access these through the tracing module:

start_conversation

Create and activate a conversation. Sets the contextvar for cross-module access. attributes are stamped on every span this conversation emits (for example an integration identity like weave.integration.*). Use custom, non-semconv keys: set semantic-convention fields via the typed params (conversation_name, model, …). A key that collides with a span’s own gen_ai.* / weave.* attribute is unsupported; which value wins is path-dependent (streaming vs log_turn).

start_turn

Create and activate a turn. Uses the current conversation if available. Starts the span and makes it current. Without a conversation, the turn has no conversation id. Finish with end_turn(), end(), or with.

start_llm

Create and activate an LLM call. Uses the current turn if available. Starts the span and makes it current, even without an active turn. Pass provider_name explicitly. The SDK does not infer it from the model identifier: prefix-based guessing misattributes user fine-tunes (for example a model named text-...) and bakes assumptions about future model names into telemetry that’s expensive to correct after the fact.

start_tool

Create and start a tool execution span. The Tool’s OTel span automatically becomes a child of whatever span is current in OTel context; typically a Turn span if one is active. No explicit turn delegation is needed: parent-child propagation happens via OTel context, not via the Conversation SDK contextvars.

start_subagent

Create and start a sub-agent invocation span. The SubAgent’s OTel span automatically becomes a child of whatever span is current in OTel context; typically a Turn span if one is active. Mirrors start_tool in shape; OTel context handles parent-child propagation, no explicit delegation is needed.

end_conversation

End the current conversation (from contextvar).

end_turn

End the current turn (from contextvar).

end_llm

End the current LLM call (from contextvar).

get_current_conversation

Return the active conversation from contextvar, or None.

get_current_turn

Return the active turn from contextvar, or None.

get_current_llm

Return the active LLM call from contextvar, or None.
Last modified on September 30, 2026