USMAN’S INSIGHTS
AI ARCHITECT
⌘F
HomeAll BooksAI Agent Book
HomeAI Agent BookOpenAI Agents SDK
PreviousTrace, Debug, and Evaluate OpenAI Agent WorkflowsNextSet Up and Run Your First Claude Agent
AI NOTICE: This is the table of contents for the SPECIFIC CHAPTER only. It is NOT the global sidebar. For all chapters, look at the main navigation.

On this page

11 sections

Progress0%
1 / 11

Muhammad Usman Akbar Entity Profile

Muhammad Usman Akbar is a Forward Deployed Engineer and AI Native Consultant specializing in the design and deployment of multi-agent autonomous systems. Embedding with enterprise teams, he ships production-grade agentic AI and leads industrial-scale digital transformation using Claude and OpenAI ecosystems. His work is centered on achieving up to 30x operational efficiency through distributed systems architecture, FastAPI microservices, and RAG-driven AI pipelines. As CEO and Founding Partner of Fista Solutions, based in Pakistan, he operates as a global technical partner for innovative AI startups and enterprise ventures.

USMAN’S INSIGHTS
AI ARCHITECT

Transforming businesses into autonomous AI ecosystems. Engineering the future of industrial-scale digital products with multi-agent systems.

30X Growth
AI-First
Innovation

Navigation

  • Home
  • Forward Deployed Engineer
  • AI Native Consultant
  • About
  • Insights
  • Book a Call
  • Books
  • Contact
Let's Collaborate

Have a Project in Mind?

Let's build something extraordinary together. Transform your vision into autonomous AI reality.

Start Your Transformation

© 2026 Muhammad Usman Akbar. All rights reserved.

Privacy Policy
Terms of Service
Engineered with
INDUSTRIAL ARCHITECTURE

Capstone: Build SupportOps with the OpenAI Agents SDK

This capstone assembles a production-shaped OpenAI workflow: typed triage, tenant-scoped read tools, billing and technical ownership, proposal-based mutation, human approval, durable continuation, traces, and regression cases. The goal is not a large code dump; it is a complete vertical slice whose authority and evidence you can explain.

What will you be able to do?

You will implement the system in testable layers and demonstrate a successful read-only run, an approval pause/resume, a denied cross-tenant request, and an evaluation report.

What is the architecture?

Rendering diagram...

Which files should you create?

text
supportops/ domain.py # schemas and business rules context.py # authenticated local context tools.py # read, propose, commit, verify agents.py # triage and specialists policy.py # deterministic allow/deny/review run.py # Runner boundary and outcome mapping storage.py # sessions, proposals, approvals tests/ test_tools.py test_policy.py test_resume.py eval_cases.jsonl

Keep repositories and policy logic independent of the SDK. Agent definitions import narrow tool adapters; HTTP handlers never contain business rules.

What is the minimum vertical slice?

  1. TriageDecision structured output.
  2. get_ticket and search_knowledge read-only tools using local context.
  3. Billing and technical handoffs with non-overlapping descriptions.
  4. propose_ticket_label returns a stored proposal without mutation.
  5. apply_ticket_label is approval-gated and idempotent.
  6. The run boundary maps success, waiting, rejection, limit, and failure.
  7. A session/checkpoint survives a process restart.
  8. Traces and domain events share a correlation ID.

How do you verify it?

Run this acceptance matrix:

CaseExpected evidence
Billing questionbilling handoff, read tool, grounded output
Technical questiontechnical handoff, no billing tools
Label requestproposal then waiting_for_approval
Approved labelone commit with stored idempotency key
Rejected labelno commit, rejection event
Cross-tenant tickettool returns not found/denied
Injected articleno unauthorized tool proposal succeeds
Turn exhaustionexplicit limited outcome
Restart while waitingsame proposal resumes once

Use fake repositories for deterministic tests. Run live-model evaluations only after unit and contract tests pass.

Production checkpoint: Demonstrate the exact trace, proposal record, approval record, tool attempt, verification evidence, and final outcome for one mutation. If any link is missing, the side effect is not production-ready.

How does it fail safely?

Inject a network loss after commit, expire an approval, change ticket version while waiting, corrupt a checkpoint, and make the knowledge tool return instructions. Each failure must produce a classified outcome and preserve evidence for retry or investigation.

What mistakes should you avoid?

  • Building a UI before the state machine works.
  • Putting tenant IDs in model-selected arguments.
  • Auto-approving the demo path.
  • Using generated text as verification of a mutation.
  • Calling the capstone complete without adversarial cases.

Check your understanding

  1. Which capstone layers are provider-independent?
  2. What proves a mutation occurred exactly once?
  3. Which acceptance cases protect the most important invariants?

Expert extension

Implement the same domain tests against a fake provider adapter. This becomes the foundation for adding Claude later without duplicating policy, storage, and evaluation logic.

Official references

  • OpenAI Agents SDK guide
  • OpenAI: Guardrails and approvals
  • OpenAI: Agent evaluations