> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Observability Adapter • AI Agent SDK

> ObservabilityAdapter: Protocol for observability adapters.

# ObservabilityAdapter

> Defined in the [**obs**](../modules/obs) module.

<Badge color="blue">AI Agent</Badge>

Protocol for observability adapters.

## Methods

<CardGroup cols={2}>
  <Card title="on_trace_start()" icon="function" href="../functions/ObservabilityAdapter-on_trace_start">
    Called when a trace starts.
  </Card>

  <Card title="on_trace_end()" icon="function" href="../functions/ObservabilityAdapter-on_trace_end">
    Called when a trace ends.
  </Card>

  <Card title="on_span_start()" icon="function" href="../functions/ObservabilityAdapter-on_span_start">
    Called when a span starts.
  </Card>

  <Card title="on_span_end()" icon="function" href="../functions/ObservabilityAdapter-on_span_end">
    Called when a span ends.
  </Card>

  <Card title="on_llm_call()" icon="function" href="../functions/ObservabilityAdapter-on_llm_call">
    Called when an LLM call is made.
  </Card>

  <Card title="on_tool_call()" icon="function" href="../functions/ObservabilityAdapter-on_tool_call">
    Called when a tool is invoked.
  </Card>

  <Card title="flush()" icon="function" href="../functions/ObservabilityAdapter-flush">
    Flush any pending data.
  </Card>

  <Card title="close()" icon="function" href="../functions/ObservabilityAdapter-close">
    Close the adapter and release resources.
  </Card>
</CardGroup>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/obs/__init__.py#L57">
  `praisonaiagents/obs/__init__.py` at line 57
</Card>
