trace • AI Agent SDK
Trace Module for PraisonAI Agents.
trace
AI Agent
Trace Module for PraisonAI Agents.
Provides lightweight action tracing for the output="actions" mode. Shows agent lifecycle events, tool calls, and final output without verbose internal details.
Zero Performance Impact:
- All imports are lazy loaded via __getattr__
- NoOpSink is the default (zero overhead when not used)
- Disabled emitter has near-zero overhead
Usage:
from praisonaiagents import Agent
# Simple usage - shows action trace
agent = Agent(instructions="...", output="actions")
agent.start("Do something")
# Advanced - capture to file
from praisonaiagents.trace import ActionTraceConfig
agent = Agent(
instructions="...",
output="actions",
trace=ActionTraceConfig(
sink_type="jsonl",
file_path="trace.jsonl",
)
)Import
from praisonaiagents import traceConstants
| Name | Value |
|---|---|
_LAZY_GROUPS | {'protocol': {'ActionEvent': ('praisonaiagents.trace.protocol', 'ActionEvent'), 'ActionEventType': ('praisonaiagents.trace.protocol', 'ActionEventType'), 'ActionTraceConfig': ('praisonaiagents.trace.p... |