Skip to content

Commit d5f693e

Browse files
Kowserclaude
andcommitted
Docs: canonical conductor.client.ai paths for agent clients
AgentScheduleClient naming (ScheduleClient alias noted), the OrkesClients.get_agent_client()/get_agent_schedule_client() factories, and the AgentApiClient transport home; hello_world_schedule example builds via the factory. Verified live: example fired 5 scheduled executions to COMPLETED against the v0.4.0 JAR. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 857a752 commit d5f693e

3 files changed

Lines changed: 16 additions & 10 deletions

File tree

docs/agents/advanced.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,15 @@ with AgentRuntime() as runtime:
126126

127127
Key methods: `run`/`run_async`, `start`/`start_async`, `deploy`/`deploy_async`,
128128
`schedule(agent, schedules)`, `get_status`, `respond`, `stop`, `signal`,
129-
`stream_sse`, and `.schedules` (the `ScheduleClient`). Both sync and async forms
129+
`stream_sse`, and `.schedules` (the `AgentScheduleClient`). Both sync and async forms
130130
exist. Most users call `runtime.run/start/deploy` instead, which add local-worker
131131
management on top of this client.
132132

133+
The raw `/agent/*` HTTP transport behind this client is
134+
`conductor.client.ai.AgentApiClient` — also reachable without the agents layer via
135+
`OrkesClients.get_agent_client()` (and `get_agent_schedule_client()` for the cron
136+
lifecycle). `AgentClient` composes that transport and adds the agent-level surface.
137+
133138
## Structured output
134139

135140
Pass `output_type=` a Pydantic model (or dataclass) to get a typed, validated result.

docs/agents/api-reference.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Context manager (sync and async: `with` / `async with`).
4646
| `signal` | `(execution_id, message) -> None` | Inject persistent context |
4747
| `shutdown` | `() -> None` | Stop all workers |
4848
| `client` (property) | `-> AgentClient` | Control-plane client |
49-
| `schedules_client` | `() -> ScheduleClient` | Shared schedule client |
49+
| `schedules_client` | `() -> AgentScheduleClient` | Shared schedule client |
5050

5151
Async variants exist for status/respond/approve/reject/send/stop/shutdown
5252
(`*_async`). Module-level wrappers using a singleton runtime: `run`, `run_async`,
@@ -190,7 +190,9 @@ start_at=None, end_at=None, description=None)` — `cron` is a 5- or 6-field exp
190190
`ScheduleInfo` (read model) fields include `name`, `short_name`, `agent`, `cron`,
191191
`timezone`, `input`, `paused`, `catchup`, `next_run`, `create_time`, `update_time`, ...
192192

193-
`ScheduleClient` (via `runtime.schedules_client()` or `runtime.client.schedules`):
193+
`AgentScheduleClient` (alias `ScheduleClient`; canonical home
194+
`conductor.client.ai` — via `runtime.schedules_client()`, `runtime.client.schedules`,
195+
or `OrkesClients.get_agent_schedule_client()`):
194196

195197
| Method | Signature |
196198
|---|---|
@@ -280,11 +282,13 @@ The control-plane client (formerly `AgentHttpClient`, alias kept). Reach it via
280282
| `stop` | `(execution_id) -> None` | |
281283
| `signal` | `(execution_id, message) -> None` | |
282284
| `stream_sse` | `(execution_id) -> AsyncIterator[dict]` | |
283-
| `schedules` (property) | `-> ScheduleClient` | |
285+
| `schedules` (property) | `-> AgentScheduleClient` | |
284286
| `close` | `() -> None` (async) | |
285287

286288
Lower-level endpoint methods (`start_agent`, `deploy_agent`, `compile_agent`) are also
287-
available.
289+
available. The raw transport behind them is `conductor.client.ai.AgentApiClient`
290+
(build one with `OrkesClients.get_agent_client()`); `AgentClient` composes it and
291+
keeps the agent-level conveniences.
288292

289293
## Config and credentials
290294

examples/agents/hello_world_schedule.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
from conductor.client.orkes_clients import OrkesClients
2828

2929
from conductor.ai.agents.schedule import Schedule
30-
from conductor.ai.agents.schedule.client import ScheduleClient
3130

3231
CONDUCTOR_API = "http://localhost:8080/api"
3332

@@ -108,12 +107,10 @@ def main() -> None:
108107
# 1. Register the workflow that the schedule will fire.
109108
register_hello_world_workflow(agent_name)
110109

111-
# 2. Build the agentspan ScheduleClient against the scheduler-enabled
110+
# 2. Build the agent schedule client against the scheduler-enabled
112111
# Conductor instance.
113112
clients = OrkesClients(configuration=Configuration(base_url="http://localhost:8080"))
114-
sched_client = ScheduleClient(
115-
clients.get_scheduler_client(), clients.get_workflow_client()
116-
)
113+
sched_client = clients.get_agent_schedule_client()
117114

118115
# 3. Declarative deploy: one schedule, fires every 2 seconds.
119116
# Quartz 6-field cron: 'sec min hour day month day-of-week'.

0 commit comments

Comments
 (0)