# Build your agent (/docs/agent/overview)

---
type: Document
title: "Build your agent"
description: "What this room is for: after the counting method gives you a plan, these pages guide your coding agent to understand the work, choose the shape, design the experience, write the spec, govern it, build a basic text-only worker on the OpenAI Agents SDK, grade it, wrap it in FastAPI, ship it in a container to Vercel, test it end to end, and know where the record and the book continue. Every page is taken from The AI Agent Factory; only the Vercel steps come from Vercel's own docs."
status: stable
order: 1
generated: { by: "process:claude-code", at: 2026-10-12T07:57:06Z }
verified:
  - { by: "human:rrizwan98", at: 2026-09-04T10:50:00Z }
  - { by: "human:rrizwan98", at: 2026-09-09T07:47:26Z }
  - { by: "human:rrizwan98", at: 2026-10-12T07:57:06Z }
sources:
  - id: af-28
    title: "Is This an Agent Problem? The AI Agent Factory, Panaversity, 2026"
    resource: https://agentfactory.panaversity.org/docs/is-this-an-agent-problem
  - id: af-30
    title: "From One-Off to Worker. The AI Agent Factory, Panaversity, 2026"
    resource: https://agentfactory.panaversity.org/docs/from-one-off-to-worker
  - id: af-39
    title: "Build AI Agents with the OpenAI Agents SDK: A 90-Minute Crash Course. The AI Agent Factory, Panaversity, 2026"
    resource: https://agentfactory.panaversity.org/docs/build-agents-crash-course
  - id: af-50
    title: "Deploy Your Agent Harness to the Cloud: A Crash Course. The AI Agent Factory, Panaversity, 2026"
    resource: https://agentfactory.panaversity.org/docs/deploying-agents-crash-course
ksor:
  audience: [public]
  owner: human:rrizwan98
  approval: { by: "human:rrizwan98", at: 2026-10-12T07:57:06Z }
trust_tier: human-reviewed
build_id: sha256:4d4bff09bd0a1dcff0a0a50f20f7ef514fc471e2b1f9e81e0e7b6150b93c0793
dirty: true
---

The [method](../method/overview.md) ends with a step table: which steps of
your work are AI, which are decisions, which are typing, and two numbers.
This room is what comes after the table. It takes one row of it and turns
it into a worker you can call from anywhere: a basic agent, built by your
coding agent, one page at a time. It is written for any workflow in any
business, because the pages teach how to read the work, not one example of
it.

## What you get

A text-only agent on the OpenAI Agents SDK, in Python, wrapped in a FastAPI
harness with two endpoints, built into a container image, deployed to
Vercel, and proven at each of those three places with the book's own
done-when checks. Text in, text out. It has one agent, typed function tools,
a session so it remembers the conversation, a guardrail that can stop a turn,
a human approval gate on any tool that changes something, streaming so a
person never watches a blank screen, and a trace of every run from day one.
It runs on the SDK's default model with the key you give it.

Around the code, the room gives you the decisions the code depends on: a
delegation map that says who owns each step and why, the shape the worker
should have, the surface a person trusts, a one-page governance record, a
spec, an eval suite that grades the rate rather than the run, and a way to
diagnose the worker when it disappoints you.

What it is not, on purpose: no voice, no calling, no realtime channel, and no
code execution. The book's crash course goes further, into handoffs to
specialist agents, model routing and sandboxes, [^af-39] and its deployment
course adds a database, file storage and an isolated place to run generated
code. [^af-50] The room now says where each of those begins: the shape page
names the patterns beyond a single agent, and the record page describes the
tables and the wire a worker grows into. The book's own design makes this
possible: the harness boots with only the model key set, and every other
backend is off until its key exists. [^af-50]

## Who it is for

Someone with a working plan from the method, a coding agent (the book's
companion names Claude Code, OpenCode or similar), a Python toolchain, and an
model key of their own: OpenAI's by default, or Gemini, Claude or Grok as [use another model](use-another-model.md) shows. You paste each page to your coding agent in
order and read what comes back; the coding agent writes and runs the code.
One thing to budget for, in the book's words: a durable worker runs on the
API, where every model call is metered and paid for. [^af-30] The build page
says how to scope and cap the key.

## The twenty-two pages, in order

| # | Page | What it settles |
| --- | --- | --- |
| 1 | This page | What the room builds and what it leaves out |
| 2 | [Is this an agent problem?](is-this-an-agent-problem.md) | The three gates: AI or tool, agent or chatbot, ready or not |
| 3 | [Understand the work](understand-the-work.md) | Five components, the window test, the delegation map: who owns each step and why |
| 4 | [From plan to worker](from-plan-to-worker.md) | The four promotions from a proven by-hand run to a worker |
| 5 | [Choose the shape](choose-the-shape.md) | Five questions, five patterns, and when a single agent is right |
| 6 | [Design the experience](design-the-experience.md) | Trust, the autonomy dial, recovery, the machine surface, and what makes a worker natural |
| 7 | [Write the spec](write-the-spec.md) | The constitution and the four artifacts, research, spec, plan and tasks, in `specs/`; behaviour only, tightened by interview |
| 8 | [Govern it](govern-it.md) | Four questions, a defined gate, data tiers, the one-page record |
| 9 | [Tests first](tests-first.md) | Red, green, refactor on one slice; deep modules |
| 10 | [Build the text agent](build-the-text-agent.md) | Agent, runner, tools, sessions, guardrails, approval, streaming, tracing |
| 11 | [Loop and harness](loop-and-harness.md) | Three stops, five verbs, allow / ask / deny, the progress file |
| 12 | [Evals before shipping](evals-before-shipping.md) | The golden set, the calibrated judge, the baseline, the unscripted set |
| 13 | [Diagnose misbehaviour](diagnose-misbehaviour.md) | Four causes by timing, the cheapest fix first, where the fix lives |
| 14 | [FastAPI, Docker, Vercel](fastapi-docker-vercel.md) | The harness, the image, the deployment |
| 15 | [Test end to end](test-end-to-end.md) | Done-when at the laptop, the container and the live URL |
| 16 | [Give it a record](give-it-a-record.md) | The tables a worker runs against, the audit trail, the MCP wire |
| 17 | [Worked example](worked-example.md) | The book's support agent taken through all of it |
| 18 | [Write a skill](write-a-skill.md) | The description is the trigger, the body is the instructions |
| 19 | [The skill](build-your-agent-skill.md) | The room as a downloadable skill for your coding agent |
| 20 | [Use another model](use-another-model.md) | Gemini, Claude, Grok, DeepSeek or a local model in the same harness |
| 21 | [Demo or production](demo-or-production.md) | The opening round, two depths of the same steps, and the upgrade path |
| 22 | [The worker's page](the-owner-page.md) | Password, upload, Run and a chat in the person's own language, for every worker |

Start at page 2 even if you are sure. Not every job is an AI job, and not
every AI job needs an agent; and a mistake in your plan costs nothing to
fix, while a mistake you only notice after the agent has spent an hour doing
the wrong thing costs you that whole hour. [^af-28]

Pages 3, 5, 6, 8, 13, 16 and 18 are the ones that make the room portable to
any niche: they are methods for reading a workflow, choosing a shape, earning
trust, staying safe, diagnosing a failure, growing into a record and writing
a skill, and none of them assumes a particular business.

## Where every word comes from

Every page in this room is taken from The AI Agent Factory, the Panaversity
book, and cites the chapter it came from at the foot of the page; the code is
the book's, trimmed to what a basic agent needs. The only exception is the
deployment target: the book deploys to a different cloud, so the Vercel steps
on page 14 are taken from Vercel's official documentation and cite each page
with its date. Two pages also carry an owner's attestation: what a test build
made from this record showed, recorded as an attestation in the page's
sources and marked as a test on fictional data, not client work. Nothing here
is invented to fill a gap; where the book and this room differ, the
difference is named on the page.

The SDK moves faster than any book. Every page that names a version or a
default was checked against the installed SDK, openai-agents 0.22.0, on
2026-09-03 and again on 2026-09-09, and the [build page](build-the-text-agent.md)
carries the rule and the probe that re-checks it: install the current
release, run the probe, and let the installed SDK and its live documentation
win over any page here. The pages that pin versions carry a review date in
the record; after it, the record stops serving them until they have been
re-verified and re-stamped.

The words an agent is given are prompts. Its instructions, its constitution,
its spec and every brief pasted to a coding agent are written under the
[AI prompting guide](../prompting/overview.md), which this record carries in
full.

## When the basic worker is not enough

The worker this room builds is a starting point. When it needs memory that
survives a restart, a second agent, a file it must keep, or code it must run,
you have reached the book's next chapters, and the pages here say which:
[give it a record](give-it-a-record.md) for the memory and the tables,
[choose the shape](choose-the-shape.md) for the second agent. If you would
rather talk it through first, the 15-minute call on the
[audit page](../audit/overview.md) is the place to bring your step table and
your deployment URL.

Begin with [is this an agent problem?](is-this-an-agent-problem.md).

[^af-28]: Is This an Agent Problem?, the reminder box and the note on where a mistake costs the most. The AI Agent Factory, Panaversity, 2026.
[^af-30]: From One-Off to Worker, "A running cost appears when you cross". The AI Agent Factory, Panaversity, 2026.
[^af-39]: Build AI Agents with the OpenAI Agents SDK: A 90-Minute Crash Course, course map and the concepts beyond the basic agent. The AI Agent Factory, Panaversity, 2026.
[^af-50]: Deploy Your Agent Harness to the Cloud: A Crash Course, the stack primer's "What you don't need" note and Decision 1. The AI Agent Factory, Panaversity, 2026.
