Performance

Performance examples benchmark runtime and memory impact for agents and teams.

PerformanceEval runs the callable separately for each enabled metric: warm-ups first, then runtime measurements, then memory measurements. num_iterations applies to each metric, and the default is 10 additional warm-up calls. Model retries, tools, delegation, and memory extraction can add provider requests beyond the callable count.

Memory measurements use Python’s tracemalloc; they do not measure process RSS, GPU memory, database-server memory, or remote model memory. Record dependency versions, database state, and model settings when comparing results.

ExampleDescription
Async Function Performance EvaluationDemonstrates performance evaluation for an asynchronous function.
Db LoggingDemonstrates storing performance evaluation results in PostgreSQL.
Instantiate AgentDemonstrates measuring agent instantiation performance.
Instantiate Agent With ToolDemonstrates measuring instantiation performance for a tooled agent.
Instantiate TeamDemonstrates measuring team instantiation performance.
Memory Update Performance EvaluationDemonstrates measuring performance when memory updates are enabled.
Response With StorageDemonstrates measuring performance when storage-backed history is enabled.
Simple Response Performance EvaluationDemonstrates baseline response performance for a single prompt.
Team Response With Memory SimpleMeasures Team memory after applying the documented async-stream consumption fix.
Team Response With Memory Multi UserDemonstrates concurrent team performance across multiple users with memory.
Team Response With Memory And ReasoningMeasures a reasoning-enabled Team after fixing stream consumption; enable debug output for allocation details.
ComparisonThese benchmarks compare agent instantiation patterns across non-Agno frameworks.