Self-Directed System · Production AI Agent Runtime · Case Study 01
Re-architecting an AI agent when context growth stopped scaling
A production resume agent crossed its 90-second request boundary as context grew to 99 files and 38,924 provider input tokens. The failure looked like model latency, but measurement showed the request lifecycle and context architecture had stopped scaling.
Context EngineeringHybrid RetrievalRuntime Architecture
−98.22%Context Assembly
−99.29%HTTP Lifetime
−77.13%Warm-Cache Known Cost
100%Requirement Coverage Preserved
01 / Problem & Context
What had to become true
The challenge
A production resume agent crossed its 90-second request boundary as context grew to 99 files and 38,924 provider input tokens. The failure looked like model latency, but measurement showed the request lifecycle and context architecture had stopped scaling.
My role
I owned the problem framing, system/product decisions, implementation direction, validation, and iteration represented in this case study. The emphasis is on the decisions that changed the system—not a feature inventory.
02 / Decisions & Tradeoffs
Architecture follows the constraint
Key decisions
- Treat timeout extension as measurement accommodation, not the architectural fix.
- Move retrieval work out of the synchronous request path and into persistent hybrid retrieval.
- Use task-aware context budgets instead of loading broadly “just in case.”
- Gate optimization on quality: faster and cheaper was unacceptable if requirement coverage regressed.
Working loop
PROBLEM → INVESTIGATE → ARCHITECT → BUILD → VALIDATE → ITERATE
The implementation was treated as a measured loop: diagnose the actual constraint, make the smallest architectural change that resolves it, then verify behavior and quality before moving forward.
03 / System Design & Build
What I built
- Persistent hybrid retrieval indexes durable evidence before request time.
- Task-aware retrieval assembles only the context required for the current job.
- Prompt caching reduces repeated provider input where stable context can be reused.
- Durable async execution separates long-running work from HTTP request lifetime.
- Provider-authoritative token audits and requirement-level quality gates block unsafe phase advancement.
04 / Validation & Outcomes
Evidence over claims
Validation
- Context assembly reduced 98.22%.
- HTTP request lifetime reduced 99.29%.
- Request-time file parsing reduced from 99 files to 0.
- Warm-cache known cost reduced 77.13%.
- 100% requirement coverage and 100% Critical Fact Recall preserved.
What changed
The key optimization target was the runtime, not merely the prompt. A faster system was only a successful system if the evidence contract and decision quality remained intact.
05 / Skills & Positioning
What this project demonstrates
Context Engineering · Hybrid Retrieval · Runtime ArchitectureThis case sits inside a broader portfolio spanning AI systems and agents, full-stack products and revenue infrastructure, design engineering, and creative AI leadership.
Portfolio Map
Explore the full system of work
Each project is a different proof point. The current project is highlighted so the portfolio reads as one connected capability map rather than a collection of isolated case studies.