{"slug": "how-i-built-relay-an-ast-based-latency-auditor-for-python-ai-agents", "title": "How I built Relay: An AST-based latency auditor for Python AI agents", "summary": "Arclat, a studio focused on developer tools for AI agent teams, has released Relay, an AST-based latency auditor that scans Python AI agent codebases to identify async anti-patterns such as missing awaits, sequential LLM calls that could be parallelized, and blocking I/O inside async functions. The tool suggests fixes and runs as an MCP server, integrating directly with Claude Code to eliminate log files and context switching.", "body_md": "I kept running into the same problem building AI agents.\n\nThey were slow and I had no idea why.\n\nNo obvious errors, logs looked fine, but requests were taking\n\nway longer than they should. Turns out the codebase was full\n\nof async anti-patterns. Missing awaits, sequential LLM calls\n\nthat could've been parallel, blocking I/O hiding inside async\n\nfunctions.\n\nSo I built Relay.\n\nIt uses AST analysis to scan your agent codebase and find\n\nexactly these spots. Not just flagging them, it suggests\n\nfixes too. And since it runs as an MCP server, it works\n\ndirectly inside Claude Code. No log files, no context switching.\n\n*pip install relay-arclat*\n\nor check it out [here](https://relay.arclat.com)\n\nbuilt by Arclat, a studio making developer tools for AI agent teams.", "url": "https://wpnews.pro/news/how-i-built-relay-an-ast-based-latency-auditor-for-python-ai-agents", "canonical_source": "https://dev.to/abdur_rafay_ar/how-i-built-relay-an-ast-based-latency-auditor-for-python-ai-agents-2jaj", "published_at": "2026-08-02 12:27:16+00:00", "updated_at": "2026-08-02 13:13:32.565558+00:00", "lang": "en", "topics": ["developer-tools", "ai-agents", "artificial-intelligence"], "entities": ["Arclat", "Relay", "Claude Code"], "alternates": {"html": "https://wpnews.pro/news/how-i-built-relay-an-ast-based-latency-auditor-for-python-ai-agents", "markdown": "https://wpnews.pro/news/how-i-built-relay-an-ast-based-latency-auditor-for-python-ai-agents.md", "text": "https://wpnews.pro/news/how-i-built-relay-an-ast-based-latency-auditor-for-python-ai-agents.txt", "jsonld": "https://wpnews.pro/news/how-i-built-relay-an-ast-based-latency-auditor-for-python-ai-agents.jsonld"}}