> ## 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**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocol.md) module.

AI Agent

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

> [card] [emit()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/TraceSinkProtocol-emit.md)
>
> Emit an action event.

> [card] [flush()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/TraceSinkProtocol-flush.md)
>
> Flush any buffered events.

> [card] [close()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/TraceSinkProtocol-close.md)
>
> Close the sink and release resources.

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/trace/protocol.py#L89)
>
> `praisonaiagents/trace/protocol.py` at line 89


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.