A global financial broker has been generating its architecture documentation without a single human writing it by hand since Q1 2026 — an agent running on Bedrock AgentCore produces it straight from the code on every commit.
Manual architecture documentation has a structural problem: it goes stale within weeks because nobody has time to keep it synced with every code change. In microservices systems this is particularly costly — understanding the dependencies between services is exactly what prevents a cascading failure from becoming a major incident, and the person who needs that map the most (the on-call engineer at 3am) is the one with the least time to rebuild it from scratch. AWS published the case of a global interdealer broker that solved this with an autonomous agent running on Amazon Bedrock AgentCore, in production since Q1 2026 — not a proof of concept, but a real system generating 140+ diagrams a week across 20 repositories.
AgentCore is AWS's platform for building, connecting, and operating agents at scale with any framework or model — a serverless runtime that scales automatically without the team managing infrastructure, with built-in tool orchestration. In this case the agent uses the Strands framework (the same one Guatemalia uses for Alleria, this site's AI) with a Bedrock model configured for diagram generation.
The agent doesn't generate the diagram in one shot — it follows a 5-phase cycle: (1) understand, scanning the source code in S3 and identifying components and interfaces, excluding tests and build artifacts; (2) generate Mermaid diagrams (class, sequence, state, component, activity) via Bedrock; (3) validate the Mermaid syntax and automatically regenerate if it detects errors; (4) convert the validated diagrams to SVG; (5) publish the artifacts (SVG, Mermaid source, JSON metadata) to S3.
That validate-and-regenerate cycle is the real difference: AWS reports **95% reliability with this iterative approach, versus 65% with a single API call** — because the agent detects and fixes its own syntax errors instead of shipping a broken diagram the first time something doesn't line up.
The full pipeline connects CodeCommit (triggers the flow on every commit) → CodePipeline (orchestrates the stages) → CodeBuild (installs dependencies and invokes the agent) → AgentCore (runs the Strands agent) → S3 (stores the artifacts and serves as the vector store's backend) → Bedrock Knowledge Bases (indexes the metadata and Mermaid code for semantic search, using Titan Text Embeddings v2). CloudWatch monitors pipeline and invocation failures.
The Knowledge Base uses hierarchical chunking — 1,500-token parent chunks for full diagram context, 300-token child chunks for entity-level retrieval — indexing only the `metadata/` and `mermaid/` prefixes, without touching the SVG binaries. This enables questions like "what reconnection strategy does the system use?" and getting back the relevant activity diagram with its description, without anyone having to go find it by hand.
For a mid-sized repository (~1,500 files), AWS calculates ~$0.24 of inference cost per generation (29,000 input tokens + 10,000 output tokens) plus ~$0.04 of CodePipeline/CodeBuild/ingestion — **roughly $0.28 total per run**. Scaled to real portfolios: 5 repos come out to ~$5.60/month, 20 repos to ~$22.40/month, 100 repos to ~$112/month. AWS estimates an organization with 20 repositories recovers between $2,000 and $8,000 a year in saved developer time — an ROI that holds up because the marginal cost per diagram is cents, not a senior engineer's hours.
The reported real-world case (20 repositories, 7 diagram types each, zero manual overhead where it used to take 2-4 hours per repository) after six months in production: delivery times down from 10 days to 3 days, message throughput doubled, mean time to recovery from incidents 20% lower, production incidents down 30%, audit prep down from 2 weeks to 2 days, new-developer onboarding down from 4 weeks to 1 week, and 40% cost savings versus single-shot calls without the validation cycle.
<div class="highlight"> What makes these numbers credible rather than marketing: they're a direct consequence of solving the original problem (stale documentation = slow onboarding + incidents that take longer to diagnose), not a generic promise of "AI productivity". </div>
If your company maintains microservices and the architecture documentation lives in the heads of two or three senior people, this pattern — agent + CI/CD pipeline + semantic Knowledge Base — is replicable without depending on .NET or on this specific implementation: the same "scan code, generate iteratively validated diagrams, index the metadata for search" approach applies to any stack. The real technical requirement (a "300-400" level per AWS) is having CI/CD already running and access to Bedrock with a Claude model and Titan embeddings enabled in the region — you don't need to build the agent from scratch if you already have the pipeline infrastructure.
Carlos Montiel is an enterprise AI solutions architect. He implements LLMs, Agents, RAG and orchestrators for companies across Guatemala and Latin America. Get in touch for a consultation.
Contact Carlos Montiel