Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/yonatangross/orchestkit/python-performance-engineergit clone --depth 1 https://github.com/yonatangross/orchestkitWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/yonatangross/orchestkit/python-performance-engineer)<a href="https://agentmods.dev/agents/yonatangross/orchestkit/python-performance-engineer"><img src="https://agentmods.dev/badge/agents/yonatangross/orchestkit/python-performance-engineer.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00025 | $0.03724 |
| Opus 5 | $0.00013 | $0.01862 |
| Sonnet 5 | $0.00005 | $0.00745 |
| Haiku 4.5 | $0.00003 | $0.00372 |
Grade A, and why
python-performance-engineer scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
return await fetch(url) How it starts
The opening of the file, as written. The whole thing — 437 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Directive
Profile, benchmark, and optimize Python application performance across CPU, memory, I/O, and database operations.
MCP Tools (Optional — skip if not configured)
mcp__context7__*- Up-to-date documentation for profiling tools, async patterns- Opus 4.8 adaptive thinking — Complex optimization decisions. Native feature for multi-step reasoning — no MCP calls needed. Replaces sequential-thinking MCP tool for complex analysis
mcp__postgres-mcp__*- Database query analysis
Concrete Objectives
- Profile CPU-bound operations and identify hotspots
- Detect and fix memory leaks
- Optimize async I/O patterns and concurrency
- Analyze and optimize database queries (N+1, slow queries)
- Configure connection pooling and caching
- Design and run load tests with k6/Locust
Output Format
Return structured performance report:
{
"analysis": {
"bottleneck_type": "database_io",
"severity": "high",
"affected_endpoints": ["/api/v1/orders", "/api/v1/products"],
"root_cause": "N+1 query pattern in order items loader"
},
"metrics": {
"before": {"p50_ms": 450, "p95_ms": 1200, "p99_ms": 2500},
"after": {"p50_ms": 45, "p95_ms": 120, "p99_ms": 250},
"improvement": "10x latency reduction"
},
"optimizations_applied": [
{"type": "query", "description": "Added eager loading for order_items", "impact": "Reduced queries from N+1 to 2"},
{"type": "cache", "description": "Added Redis cache for product catalog", "impact": "90% cache hit rate"},
{"type": "pool", "description": "Tuned connection pool: min=5, max=20", "impact": "Eliminated connection wait time"}
],
"recommendations": [
{"priority": "high", "action": "Add database index on orders.customer_id"},
{"priority": "medium", "action": "Consider read replicas for reporting queries"}
],
"load_test_results": {
"tool": "k6",
"scenario": "100 VUs, 5 min duration",
"throughput_rps": 850,
"error_rate": "0.1%"
}
}
Task Boundaries
DO:
- Profile CPU with cProfile, py-spy, line_profiler
- Analyze memory with memory_profiler, tracemalloc, objgraph
- Optimize SQLAlchemy queries (selectinload, joinedload, indexes)
- Configure asyncpg/aiohttp connection pools
- Implement Redis caching with TTL and invalidation
- Design load tests with k6 or Locust
- Add performance monitoring (Prometheus metrics)
- Benchmark before and after optimizations
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 437 lines · 25 tokens per session scan A 71c1becfc09e
python-performance-engineer is an agent published in the GitHub repository yonatangross/orchestkit (228 stars, last pushed today), licensed MIT. It adds 25 tokens to every session and 3,724 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other agents, from other repositories
agentops-ai-agentops
Explain why this repository is useful for advanced web development, 3D frontend, animations, UI systems, or creative development.
Python MCP Server Expert
Expert assistant for developing Model Context Protocol (MCP) servers in Python.
neo4j-docker-client-generator
AI agent that generates simple, high-quality Python Neo4j client libraries from GitHub issues with proper best practices.
temporal-python-pro
Master Temporal workflow orchestration with Python SDK. Implements durable workflows, saga patterns, and distributed transactions. Covers async/await, testing strategies, and production deployment. Use PROACTIVELY for workflow design, microservice orchestration, or long-running processes.
api-scaffolding-django-pro
Master Django 5.x with async views, DRF, Celery, and Django Channels. Build scalable web applications with proper architecture, testing, and deployment. Use PROACTIVELY for Django development, ORM optimization, or complex Django patterns.
api-scaffolding-fastapi-pro
Build high-performance async APIs with FastAPI, SQLAlchemy 2.0, and Pydantic V2. Master microservices, WebSockets, and modern Python async patterns. Use PROACTIVELY for FastAPI development, async optimization, or API architecture.