FROM CONCEPTS TO A WORKING SYSTEM

Understand the whole agent system.

Follow the request, identify who owns each responsibility, and see what changes when a task needs tools, approvals, or recovery.

01 / LEARNING PATH

Six questions, one connected system.

Start with the prerequisites, read the linked guides, then check whether you can explain the boundary in your own words.

  1. Choose the right kind of agent

    Before you begin: Start here; no agent experience required.

    You will be able to: Explain when you need a tool-using workflow and who should own its orchestration.

  2. Separate resources and their lifetimes

    Before you begin: Understand runtime ownership from step 1.

    You will be able to: Distinguish configuration, conversation, one turn of work, and the machine executing commands.

  3. Connect tools across trust boundaries

    Before you begin: Know which application owns the session.

    You will be able to: Choose functions, MCP, or environment capabilities and put credentials in the correct place.

  4. Run one complete request

    Before you begin: Read the function-call contract; API access is needed only to execute the examples.

    You will be able to: Create a session, handle a tool request, return a result, and recognize the root turn outcome.

  5. Make work safe and recoverable

    Before you begin: Understand the successful tool loop from step 4.

    You will be able to: Add approvals, durable delivery, and recovery without repeating a business action.

  6. Measure whether the agent is good enough

    Before you begin: Define the user outcome and unacceptable actions.

    You will be able to: Compare configurations using task success, unsafe actions, latency, and total cost.

02 / ARCHITECTURE EXPLORER

One harness. Different execution choices.

Switch the environment, then inspect responsibilities, stored data, and credential boundaries. Optional components are choices for your workload, not an installation checklist.

Use application functions or service-origin remote MCP without a workspace. Built-in shell and environment-local capabilities are absent.

Product interface⇄Application server⇄Managed harness

Select a component to trace its connections. The highlighted component is selected; its connections are listed below.

Your application

Identity, product behavior, and delivery

OpenAI-managed

Harness and durable agent resources

Your services & providers

Business tools, data, and optional compute

Application server

Authenticate users, submit input, handle function calls, and return results.

  • Product interface Application serverTask input →; authorized progress and results ←
  • Application server Managed harnessSession input and tool results →; progress and required actions ←
  • Inbox & worker Application serverRecheck session and dispatch pending work
  • Application server Function handlersValidated function call →; business result ←
Explore this component

Reference: OpenAI Agents API architecture ↗

03 / A CONNECTED CASE STUDY

Build out an order assistant, one requirement at a time.

Start with the downloadable read-only example, then follow the architecture decisions for policy answers, approved refunds, durable delivery, and evaluation. These are illustrated workflows; the explorer does not execute orders or payments.

Stage 1 of 5: Read an order

“Where is ORDER-100?”

  1. User
  2. App
  3. Harness
  4. lookup_order
  5. Order database

What changes

One ownership-scoped function

The answer depends on customer data, so a model-only answer is insufficient. A read-only function can look up the authorized order without a sandbox.

The boundary to preserve

The model supplies an order ID. The server supplies identity and returns only the permitted status fields.

Prove it works

A request for another customer's order returns no order data.

04 / TASK LIFECYCLE LAB

The same task can end in very different ways.

Select a scenario and walk through it. Compare the user-visible status, your application's responsibility, and the actual API signal. This is an explanatory trace, not a live session.

Successful lookup · Step 1 of 4

Accept an authorized task

User interface

Submitting the order request.

Application responsibility

Authenticate the user and store the job-to-session association.

API signal / observation

Create a session with initial input; watch its events.

Keep the distinction: Root completion plus valid tool output establishes this task's result; idle alone does not.

Read the implementation guide

References: Events and items ↗ · Sandbox lifecycle ↗ · Function results ↗

Turn the model into a working integration.

Run a local example, or use the encyclopedia to explore a specific boundary.

Build the order example Browse all topics