Performance Agents
query-optimizer
Category: performance
Fixes N+1 queries, missing indexes, and blocking database calls in async code.
What it finds:
- N+1 queries — loops that execute a query per iteration. Fixed by converting to a single query with
INclause or eager loading. - Missing indexes — queries filtering on unindexed columns. Fixed by generating a migration that adds the appropriate index.
- Blocking DB calls in async code —
session.execute()withoutawaitin async handlers. Fixed by converting to the async equivalent.
Works with SQLAlchemy (sync and async), Django ORM, Prisma, and raw SQL.
nimbus run --agent query-optimizer
async-converter
Category: performance
Converts blocking synchronous operations to async in async codebases.
What it converts:
requestscalls →httpxasynctime.sleep()→asyncio.sleep()- Synchronous file I/O →
aiofiles - Synchronous subprocess calls →
asyncio.create_subprocess_exec - Synchronous Redis/database calls → their async equivalents
Only converts operations inside async def functions. Does not convert functions that are called from synchronous contexts.
nimbus run --agent async-converter