Skip to main content

praisonaiagents.trace

Core SDK 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”, ) )

Overview

This module provides components for trace.