Skip to content

docs: refresh the README for the v2 API#215

Merged
seanbrar merged 1 commit into
mainfrom
docs/readme-v2-refresh
Jun 17, 2026
Merged

docs: refresh the README for the v2 API#215
seanbrar merged 1 commit into
mainfrom
docs/readme-v2-refresh

Conversation

@seanbrar

@seanbrar seanbrar commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Summary

The README landing-page examples still used the v1 ResultEnvelope surface (result["answers"][0], response_schema, defer_many(), "text-only" local) and would not run on v2. This aligns the README with the shipped v2 API and surfaces the new agent-loop capabilities ahead of the 2.0 RC.

  • run() returns Output (result.text); run_many() / collect_deferred() return OutputCollection (.answers). Replaced dict-subscript access throughout.
  • Structured-output kwarg is output=, not response_schema.
  • Removed the nonexistent defer_many() from the entry-point table.
  • Noted local multimodal input (text/image/audio) and optional model.
  • Added a Multi-Turn Threads and Agent Loops section (interact() / Session) and links to the agent-loop and 2.0 migration guides.

Related issue

None

Test plan

  • Validated every example against the real v2 surface in mock mode (run, run_many, Session.interact with continuation): all attributes/methods exist and the shapes are correct.
  • just lint passes (ruff format --check, ruff check, rumdl check . - no issues across 31 files).
  • Doc links (/agent-loop/, /migrating-to-v2/) verified against mkdocs.yml nav.

No code changed, so no unit tests were added (non-behavioral docs change).

Notes

None


  • PR title follows conventional commits
  • just check passes
  • Tests cover the meaningful cases, not just the happy path
  • Docs updated (if this changes public API or user-facing behavior)

The landing-page examples still used the v1 ResultEnvelope surface and
would not run on v2. Align them with the shipped API:

- run() returns Output (result.text); run_many()/collect_deferred()
  return OutputCollection (.answers); drop dict-subscript access.
- Structured output kwarg is output=, not response_schema.
- Drop the nonexistent defer_many() from the entry-point table.
- Note local multimodal (text/image/audio) and optional model.

Add a "Multi-Turn Threads and Agent Loops" section covering interact()
and Session, plus links to the agent-loop and 2.0 migration guides.
@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@seanbrar seanbrar merged commit 804469b into main Jun 17, 2026
10 checks passed
@seanbrar seanbrar deleted the docs/readme-v2-refresh branch June 17, 2026 09:32
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