Skip to content

docs: add a usage-level Agents API guide and an examples chapter - #226

Merged
SaladDay merged 2 commits into
mainfrom
docs/api-guide
Sep 29, 2026
Merged

SaladDay merged 2 commits into
mainfrom
docs/api-guide

Conversation

@SaladDay

@SaladDay SaladDay commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Part 2 of 3. Stacked on the new-user-path PR; its first commit is that PR.

Agents API guide (docs/api/public-agent-api.md)

Every public resource is documented with both an official OpenAI SDK example and a plain HTTP example.

Conventions:

  • pagination
  • idempotency, including recovery after a lost response
  • errors
  • x_agents_core (harness, model_provider, harness_config, installation)

Resources:

  • Agents
  • Sessions (the three environment types and their statuses)
  • input: message, steering, cancel
  • the SSE event stream and its event list
  • Turns and Items
  • function tools (requires_action, tool_result, the sessions.stream helper)
  • the three kinds of file: Source Files, workspace files, Artifacts
  • Skills
  • Environment Templates
  • Vaults

The guide ends with a table of limits and differences from OpenAI.

Verified: every SDK call in the guide was run against a mock server with SDK 3.13.0 to confirm its method, path, OpenAI-Beta header and Idempotency-Key (23 calls). The template network shape and the Vault credential shape were checked against the SDK types.

Also in this PR

  • API index: runnable Core API commands for common admin tasks, using the new model-configuration route.
  • Examples chapter (docs/examples.md): maps each Parsar example feature to the API used, the guide section and the source file. Example READMEs link to it.
  • Docs site: examples page registered, API guide retitled, site regenerated.
  • Name guard: a scoped allowlist entry for the examples guide and its generated copy, following the existing Parsar-example entries.

Validation

  • make check-docs passes.
  • check-names passes.
  • The repo-wide link and anchor check reports 0 broken links.
  • core-distribution-manifest tests pass.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

- README: what the project is, a four-step install, the two APIs and a
  documentation table by goal (English and Chinese).
- Installation: the default path first (prerequisites, install, reachability,
  sign-in, next steps); version, sandbox backend, modes, split deployment and
  directory layout move to "Advanced installation".
- Quickstart: three steps from a Project API key to a finished Session.
- User guide: task-oriented, and now the single owner of Environment kinds,
  harness and model choice, and model provider precedence.
- Remove repeated explanations and link to one owner instead: namespaces and
  credentials (API index), Projects and keys and administrator authority and
  isolation (design principles), key rotation steps (operations), backend and
  size changes (configuration), executor credential rotation (self-hosted).
- docs/api/public-agent-api.md becomes the Agents API guide: every public
  resource with official OpenAI SDK and plain HTTP examples, plus
  pagination, idempotency, errors, x_agents_core, streaming events,
  function tools, the three kinds of file, Skills, templates, Vaults and
  the differences from OpenAI. SDK calls were checked against SDK 3.13.0
  for method, path and headers.
- API index: runnable Core API commands for common administrator tasks.
- docs/examples.md: the cases chapter, mapping each feature of the Parsar
  example to its API and guide section; example READMEs link to it.
- Register the examples page and retitle the API guide on the docs site,
  and regenerate the site.
@SaladDay
SaladDay merged commit 5b45089 into main Sep 29, 2026
2 checks passed
@SaladDay
SaladDay deleted the docs/api-guide branch October 7, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant