the examples call methods the client has

Twelve ids came from the document's own old->new map; the rest are generated
method spellings the map does not carry, read off the regenerated client.
Neither set follows a search-and-replace: the document renamed 2014 operations
and 21 of those do not reduce to dropping `_v1_` — /tasks and /meet became
`*_app` and `*_app_assets` when the SPA and the API stopped sharing a name,
and `get_v1_team_transactor_api_v1_statistics` drops only the first, the
second being part of the path.

Checked, not assumed: every `.get_*`/`.post_*` an example calls resolves
against the 7519 methods the client exposes.
This commit is contained in:
2026-08-14 11:03:53 -07:00
parent d1fa0676d1
commit 582b00d53a
6 changed files with 21 additions and 21 deletions
+6 -6
View File
@@ -1,8 +1,8 @@
"""agent — define one, run it, read the run back.
POST /v1/agents post_v1_agents
POST /v1/agents/{ref}/run post_v1_agents_by_ref_run
GET /v1/agents/{ref}/runs get_v1_agents_ref_runs
POST /v1/agents post_agents
POST /v1/agents/{ref}/run post_agents_by_ref_run
GET /v1/agents/{ref}/runs get_agents_by_ref_runs
``ref`` is the agent's public id (``agent_...``) OR its org-unique name, which
is why the run and the read below can both use the name we just created without
@@ -29,7 +29,7 @@ def main() -> None:
with client() as api:
agents = AgentsApi(api)
created = agents.post_v1_agents(
created = agents.post_agents(
CreateAgentIn(
name=NAME,
model=MODEL,
@@ -39,10 +39,10 @@ def main() -> None:
)
print(f"created {created.name} ({created.id}) on {created.model}")
agents.post_v1_agents_by_ref_run(NAME)
agents.post_agents_by_ref_run(NAME)
print("run started")
runs = agents.get_v1_agents_ref_runs(NAME, limit=5)
runs = agents.get_agents_by_ref_runs(NAME, limit=5)
entries = runs.runs or []
print(f"{len(entries)} run(s):")
for entry in entries: