> ## 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.

# Trace Sink Protocol • AI Agent SDK

> TraceSinkProtocol: Protocol for trace event sinks.

# TraceSinkProtocol

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

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

Protocol for trace event sinks.

Implementations receive action events and handle them
(e.g., print to stdout, write to file, send to server).

Naming follows AGENTS.md convention: XProtocol for interfaces.

## Methods

<CardGroup cols={2}>
  <Card title="emit()" icon="function" href="../functions/TraceSinkProtocol-emit">
    Emit an action event.
  </Card>

  <Card title="flush()" icon="function" href="../functions/TraceSinkProtocol-flush">
    Flush any buffered events.
  </Card>

  <Card title="close()" icon="function" href="../functions/TraceSinkProtocol-close">
    Close the sink 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/trace/protocol.py#L89">
  `praisonaiagents/trace/protocol.py` at line 89
</Card>
