jordandesigns.ioCloud & Platform Engineering
AWS · AI

Multi-Agent AI Coding Orchestrator

A fully asynchronous multi-agent system that routes natural-language coding tasks to specialist agents, designed around API Gateway's timeout instead of against it.

AWS
Role
AI Infra
Cloud
AWS
Pattern
Async agents
Model
Anthropic
ArchitectureOpen full size ↗
Architecture diagram for Multi-Agent AI Coding Orchestrator
How it flows
ClientNL coding task
→
Orchestrator λ202 + job ID
→
Coder λagentic loop
Anthropictool use
→
DynamoDB24h TTL
→
Status λpoll job
Async by design, return a job ID in under 2s, run the agentic loop in the background

Problem

Agentic loops that make sequential model tool-use calls routinely run longer than API Gateway's hard 29-second integration timeout, which breaks any synchronous request/response design.

The system had to return fast, run the loop reliably in the background, and keep blast radius contained between agents.

Approach

  • The orchestrator returns 202 with a job ID in under two seconds, then the coder Lambda processes the agentic loop independently, writing results to DynamoDB with a 24-hour TTL.
  • ARN-scoped least-privilege IAM isolates blast radius: the orchestrator can invoke only the coder Lambda, status can only read DynamoDB, and the coder cannot invoke any Lambda at all.
  • The write_code, explain_code, and debug_code tools are deterministic Python functions returning structured scaffolds and AST metadata, grounding the loop in real code analysis instead of recursive LLM self-talk.

Architecture

Three separately sized Lambda packages, Secrets Manager for the Anthropic key, and CloudWatch log groups with 14-day retention, all provisioned in Terraform.

Outcome

A resilient async pattern that turns a platform constraint (the 29-second timeout) into the architecture, with grounded tools and tightly scoped permissions per agent.

Live run receipt

Submit
202 and a job ID returned in under two seconds
Run
Coder Lambda executes the agentic tool-use loop asynchronously
Store
Results land in DynamoDB with a 24-hour TTL
IAM
Orchestrator can invoke only the coder, the coder can invoke nothing
Pattern
Async agentic pipeline

Built with

LambdaAPI GatewayDynamoDBAnthropic SDKTerraformPythonIAMSecrets Manager

Want something like this for your cloud?