MODULE 05 / 08
Autonomous Executive Agent: Fault-Tolerant Action Layer
Master the Action layer—build a fault-tolerant LangGraph agent that plans parallel tools, retries flaky APIs, interrupts for human approval, and resumes from crash-surviving checkpoints for high-stakes bookings and scheduling.
LangGraph state machines + checkpointers for long-running agency: QLoRA tool calling, parallel tools, HITL interrupts, and Postgres lineage.
YOU'LL BUILD
A Hotel Booking Assistant
Production goals
- G01Implement persistent agency that survives server crashes via checkpointed state.
- G02Manage high-stakes tool calling with human-in-the-loop interrupts before reservation.
- G03Execute multi-step booking/scheduling workflows with parallel tools and fault-tolerant retries.
You'll master techniques:
- T01QLoRA fine-tuning for high-precision tool calling.
- T02Parallel tool execution for complex multi-step tasks.
- T03Adapter-based training for JSON reliability.
- T04Interrupt-driven workflows (Human-in-the-loop).
- T05Fault-tolerant retry logic for API failures.

The Project Kit
The Action-Layer Agent Graph
A modular Python codebase structured for high-stakes booking and scheduling:
- LangGraph Orchestration: Intent → parallel tools → HITL → reserve state machine with thread_id checkpoints after every node.
- Parallel Tool Fan-Out: Hotel search, calendar checks, travel policy validation, and Tavily destination research via ThreadPoolExecutor.
- HITL Interrupts: High-stakes bookings pause for human approval before reservation; resume from the same checkpointed thread.
- Fault-Tolerant Retries: Transient API failures are retried with audit-logged status instead of silent agent loops.
- QLoRA / PEFT Contracts: Tool-calling SFT hooks and runtime JSON schema guards for reliable structured outputs.
The Full-Stack Serving Layer
An entire system to book, approve, and recover agency state:
- FastAPI Microservice: / /health /metadata /simulate POST /book POST /approve GET /checkpoint/{thread_id} with CORS and App Runner-ready Docker Compose.
- MakCorps + Local Inventory: Free hotel API when credentials are set; local inventory fallback so demos and smoke tests always run.
- Tavily Research: Live destination briefs when TAVILY_API_KEY is set; offline brief otherwise.
- Postgres-Ready Lineage: Booking events to PostgreSQL with JSONL fallback for crash-surviving audit trails.
- Deploy Scripts: UV + Docker Compose helpers without rebuilding the image for every booking request.
1curl -X POST http://127.0.0.1:8000/book -H "Content-Type: application/json" -d '{"user_id":"exec-001","destination":"Tokyo","check_in":"2026-07-10","check_out":"2026-07-12","guests":1,"budget_per_night":300,"require_human_confirmation":true}'Portfolio-Ready Documentation
- README.md + TUTORIAL.md / TUTORIAL_FULL.md: System architecture + agency pipeline diagrams and production goals designed for GitHub showcase.
- Smoke Tests: Compile + route checks that assert HITL interrupt and approved booking completion.
1uv run bash scripts/test.shTutorial Summary
The Project Kit
The Action-Layer Agent Graph
A modular Python codebase structured for high-stakes booking and scheduling:
- LangGraph Orchestration: Intent → parallel tools → HITL → reserve state machine with thread_id checkpoints after every node.
- Parallel Tool Fan-Out: Hotel search, calendar checks, travel policy validation, and Tavily destination research via ThreadPoolExecutor.
- HITL Interrupts: High-stakes bookings pause for human approval before reservation; resume from the same checkpointed thread.
- Fault-Tolerant Retries: Transient API failures are retried with audit-logged status instead of silent agent loops.
- QLoRA / PEFT Contracts: Tool-calling SFT hooks and runtime JSON schema guards for reliable structured outputs.
The Full-Stack Serving Layer
An entire system to book, approve, and recover agency state:
- FastAPI Microservice: / /health /metadata /simulate POST /book POST /approve GET /checkpoint/{thread_id} with CORS and App Runner-ready Docker Compose.
- MakCorps + Local Inventory: Free hotel API when credentials are set; local inventory fallback so demos and smoke tests always run.
- Tavily Research: Live destination briefs when TAVILY_API_KEY is set; offline brief otherwise.
- Postgres-Ready Lineage: Booking events to PostgreSQL with JSONL fallback for crash-surviving audit trails.
- Deploy Scripts: UV + Docker Compose helpers without rebuilding the image for every booking request.
1curl -X POST http://127.0.0.1:8000/book -H "Content-Type: application/json" -d '{"user_id":"exec-001","destination":"Tokyo","check_in":"2026-07-10","check_out":"2026-07-12","guests":1,"budget_per_night":300,"require_human_confirmation":true}'Portfolio-Ready Documentation
- README.md + TUTORIAL.md / TUTORIAL_FULL.md: System architecture + agency pipeline diagrams and production goals designed for GitHub showcase.
- Smoke Tests: Compile + route checks that assert HITL interrupt and approved booking completion.
1uv run bash scripts/test.sh
