Skip to content

Commit 8781a19

Browse files
NicholasDColeclaude
andcommitted
Remove superseded agentic-workflows examples; make example docs consistent
The examples/agentic-workflows/ folder (5 hand-built LLM-system-task workflow examples) is superseded by the durable agents layer merged in 891bd06 - every scenario it demonstrated (tool calling, multi-agent chat, HITL, MCP) has a richer counterpart under examples/agents/. Delete it and repoint all references (README, examples/README, SDK_DEVELOPMENT, SDK_NEW_LANGUAGE_GUIDE) to the agents examples. Also make the docs consistent about example counts: - examples/agents/README.md catalog rebuilt to list all 111 core examples (65 were missing after the merge) organized by topic; removed a broken link to the nonexistent 27-user-proxy-agent.ts - all counts standardized to "200+" across README, CHANGELOG, SDK_DEVELOPMENT, SDK_NEW_LANGUAGE_GUIDE, and examples READMEs - stale workflow-example counts in SDK_DEVELOPMENT fixed (14 core / 9 api-journeys / 8 advanced) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 891bd06 commit 8781a19

11 files changed

Lines changed: 168 additions & 836 deletions

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12-
- **Durable AI agents** -- the Agentspan TypeScript SDK (`@conductor-oss/conductor-agent-sdk`) is merged into this package as new subpath exports: `@io-orkes/conductor-javascript/agents` (core: `Agent`, `AgentRuntime`, `tool`, guardrails, handoffs, memory, schedules, streaming, HITL), `/agents/testing`, and framework wrappers `/agents/vercel-ai`, `/agents/langgraph`, `/agents/langchain`. The agent clients are also first-class citizens of the root export (`AgentClient`, `WorkflowClient`, `Schedule`, `ScheduleInfo`, schedule errors) — the root surface grows additively (minor). Docs at [docs/agents/](docs/agents/README.md); 60+ examples at [examples/agents/](examples/agents/).
12+
- **Durable AI agents** -- the Agentspan TypeScript SDK (`@conductor-oss/conductor-agent-sdk`) is merged into this package as new subpath exports: `@io-orkes/conductor-javascript/agents` (core: `Agent`, `AgentRuntime`, `tool`, guardrails, handoffs, memory, schedules, streaming, HITL), `/agents/testing`, and framework wrappers `/agents/vercel-ai`, `/agents/langgraph`, `/agents/langchain`. The agent clients are also first-class citizens of the root export (`AgentClient`, `WorkflowClient`, `Schedule`, `ScheduleInfo`, schedule errors) — the root surface grows additively (minor). Docs at [docs/agents/](docs/agents/README.md); 200+ examples at [examples/agents/](examples/agents/).
1313
- **Migration for `@conductor-oss/conductor-agent-sdk` users:** install `@io-orkes/conductor-javascript` and rewrite import specifiers -- `@conductor-oss/conductor-agent-sdk` becomes `@io-orkes/conductor-javascript/agents`, and the wrapper subpaths gain the `/agents` prefix (e.g. `.../vercel-ai` becomes `.../agents/vercel-ai`).
1414
- New optional peer dependencies (all lazily resolved, install only what you use): `zod`, `zod-to-json-schema`, `ai`, `@langchain/core`, `@langchain/langgraph`. `dotenv` becomes a runtime dependency (the agent entry points load it at import time; the package `sideEffects` field allowlists `dist/agents/**` so bundlers keep that bootstrap).
1515
- **Agent clients in `sdk/clients`, one client for both planes** -- `AgentClient` is an interface (the `/agent/*` control-plane surface); `OrkesAgentClient` is the implementation, obtained via `runtime.client` or `OrkesClients.getAgentClient()`. Both share a single underlying `ConductorClient` (and its one token mint) across control-plane and worker-plane calls -- no bespoke agent-layer auth/transport code exists. Naming note: `getWorkflowClient()` returns the general-purpose `WorkflowExecutor`; the agent `WorkflowClient` (`OrkesClients.getAgentClient().workflows` / `getAgentWorkflowClient()`) adds the agent-execution 404 fallback and token-usage rollup.

README.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ See the [Examples Guide](examples/README.md) for the full catalog. Key examples:
459459
| [test-workflows.ts](examples/test-workflows.ts) | Unit testing with mock outputs (no workers) | `npx ts-node examples/test-workflows.ts` |
460460
| [metrics.ts](examples/metrics.ts) | Prometheus metrics + HTTP server on :9090 | `npx ts-node examples/metrics.ts` |
461461
| [express-worker-service.ts](examples/express-worker-service.ts) | Express.js + workers in one process | `npx ts-node examples/express-worker-service.ts` |
462-
| [function-calling.ts](examples/agentic-workflows/function-calling.ts) | LLM dynamically picks which worker to call | `npx ts-node examples/agentic-workflows/function-calling.ts` |
462+
| [02-tools.ts](examples/agents/02-tools.ts) | Durable agent: LLM dynamically picks which tool to call | `npx tsx examples/agents/02-tools.ts` |
463463
| [fork-join.ts](examples/advanced/fork-join.ts) | Parallel branches with join synchronization | `npx ts-node examples/advanced/fork-join.ts` |
464464
| [sub-workflows.ts](examples/advanced/sub-workflows.ts) | Workflow composition with sub-workflows | `npx ts-node examples/advanced/sub-workflows.ts` |
465465
| [human-tasks.ts](examples/advanced/human-tasks.ts) | Human-in-the-loop: claim, update, complete | `npx ts-node examples/advanced/human-tasks.ts` |
@@ -518,18 +518,20 @@ const run = await workflow.execute({ question: "What is Conductor?" });
518518
console.log(run.output?.answer);
519519
```
520520
521-
**Agentic Workflows**
521+
**Agentic Examples**
522522
523-
Build AI agents where LLMs dynamically select and call TypeScript workers as tools.
524-
See [examples/agentic-workflows/](examples/agentic-workflows/) for all examples.
523+
To build AI agents where LLMs dynamically select and call tools, use the
524+
durable agents layer (see [Durable AI Agents](#durable-ai-agents) below).
525+
All agent examples live in [examples/agents/](examples/agents/); highlights:
525526
526527
| Example | Description |
527528
|---------|-------------|
528-
| [llm-chat.ts](examples/agentic-workflows/llm-chat.ts) | Automated multi-turn conversation between two LLMs |
529-
| [llm-chat-human-in-loop.ts](examples/agentic-workflows/llm-chat-human-in-loop.ts) | Interactive chat with WAIT tasks for human input |
530-
| [function-calling.ts](examples/agentic-workflows/function-calling.ts) | LLM dynamically picks which worker function to call |
531-
| [mcp-weather-agent.ts](examples/agentic-workflows/mcp-weather-agent.ts) | MCP tool discovery and invocation for real-time data |
532-
| [multiagent-chat.ts](examples/agentic-workflows/multiagent-chat.ts) | Multi-agent debate: optimist vs skeptic with moderator |
529+
| [01-basic-agent.ts](examples/agents/01-basic-agent.ts) | Simplest possible agent: define, run, print result |
530+
| [02-tools.ts](examples/agents/02-tools.ts) | LLM dynamically picks which tool to call, incl. approval-required tools |
531+
| [03-multi-agent.ts](examples/agents/03-multi-agent.ts) | Multi-agent orchestration: sequential, parallel, handoffs |
532+
| [04-mcp-weather.ts](examples/agents/04-mcp-weather.ts) | MCP tool discovery and invocation for real-time data |
533+
| [09-human-in-the-loop.ts](examples/agents/09-human-in-the-loop.ts) | Agent pauses for human approval mid-run |
534+
| [15-agent-discussion.ts](examples/agents/15-agent-discussion.ts) | Multi-turn debate between agents with opposing viewpoints |
533535
534536
**RAG and Vector DB Workflows**
535537
@@ -572,9 +574,11 @@ testing toolkit (`/agents/testing`).
572574
573575
- **Docs:** [docs/agents/](docs/agents/README.md) — start with
574576
[getting-started.md](docs/agents/getting-started.md)
575-
- **Examples:** [examples/agents/](examples/agents/) — 60+ runnable examples,
576-
from a basic agent to the full [kitchen sink](examples/agents/kitchen-sink.ts);
577-
run them with `npx tsx examples/agents/01-basic-agent.ts`
577+
- **Examples:** [examples/agents/](examples/agents/) — 200+ runnable examples
578+
(core examples plus quickstart and framework ports for Google ADK, LangGraph,
579+
OpenAI Agents SDK, and Vercel AI SDK), from a basic agent to the full
580+
[kitchen sink](examples/agents/kitchen-sink.ts); run them with
581+
`npx tsx examples/agents/01-basic-agent.ts`
578582
579583
## Documentation
580584

SDK_DEVELOPMENT.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -603,24 +603,24 @@ Read in `resolveOrkesConfig.ts`. Env vars take precedence over config object val
603603

604604
## Examples
605605

606-
The `examples/` directory contains 32 runnable TypeScript files across 3 subdirectories, matching the Python SDK's examples structure. See [examples/README.md](examples/README.md) for the full catalog.
606+
The `examples/` directory contains 31 runnable TypeScript files for the workflow/worker layer, plus 200+ durable AI-agent examples under `examples/agents/`. See [examples/README.md](examples/README.md) for the full catalog.
607607

608608
### Structure
609609

610610
```
611611
examples/
612-
├── 13 core files # Workers, workflows, metrics, testing
613-
├── agentic-workflows/ # 5 AI/LLM agent examples
614-
├── api-journeys/ # 7 complete API lifecycle demos
615-
└── advanced/ # 7 advanced workflow patterns
612+
├── 14 core files # Workers, workflows, metrics, testing
613+
├── agents/ # 200+ durable AI agent examples (see examples/agents/README.md)
614+
├── api-journeys/ # 9 complete API lifecycle demos
615+
└── advanced/ # 8 advanced workflow patterns
616616
```
617617

618618
### Conventions
619619

620620
- **Self-contained**: Every file imports from `../src/sdk`, connects via `OrkesClients.from()`, and is runnable with `npx ts-node examples/<file>.ts`
621621
- **Cleanup**: Examples that create resources clean up after themselves in try/finally blocks
622622
- **Env vars**: All examples read `CONDUCTOR_SERVER_URL` (required) and optionally `CONDUCTOR_AUTH_KEY`/`CONDUCTOR_AUTH_SECRET`
623-
- **AI examples**: Use `LLM_PROVIDER` and `LLM_MODEL` env vars with defaults to `openai_integration` / `gpt-4o`
623+
- **Agent examples**: `examples/agents/` uses `AGENTSPAN_SERVER_URL`/`AGENTSPAN_LLM_MODEL` plus a provider API key — see [examples/agents/README.md](examples/agents/README.md)
624624
- **Naming**: Kebab-case file names matching Python SDK's snake_case pattern (e.g., `fork-join.ts``fork_join_script.py`)
625625
- **Imports**: Use relative paths from the example file (e.g., `from "../../src/sdk"` for subdirectory examples)
626626

@@ -665,8 +665,6 @@ examples/
665665
| `api-journeys/metadata.ts` | `metadata_journey.py` | All metadata APIs |
666666
| `api-journeys/prompts.ts` | `prompt_journey.py` | All prompt APIs |
667667
| `api-journeys/schedules.ts` | `schedule_journey.py` | All schedule APIs |
668-
| `agentic-workflows/function-calling.ts` | `agentic_workflows/function_calling_example.py` | LLM tool calling |
669-
| `agentic-workflows/multiagent-chat.ts` | `agentic_workflows/multiagent_chat.py` | Multi-agent debate |
670668
| `advanced/rag-workflow.ts` | `rag_workflow.py` | RAG pipeline |
671669
| `advanced/fork-join.ts` | `orkes/fork_join_script.py` | Parallel execution |
672670

SDK_NEW_LANGUAGE_GUIDE.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,7 +1417,7 @@ const wf = new ConductorWorkflow(executor, "my_workflow")
14171417
14181418
### Phase 7: Examples
14191419
1420-
**Goal:** 36 runnable example files demonstrating all SDK features.
1420+
**Goal:** 31 runnable example files demonstrating all SDK features.
14211421
14221422
#### 7.1 Core Examples (14 files)
14231423
@@ -1451,15 +1451,20 @@ const wf = new ConductorWorkflow(executor, "my_workflow")
14511451
| `advanced/wait-for-webhook.ts` | Webhook wait pattern |
14521452
| `advanced/human-tasks.ts` | Human-in-the-loop workflow |
14531453
1454-
#### 7.3 Agentic / AI Examples (5 files)
1454+
#### 7.3 Agentic / AI Examples
1455+
1456+
Agentic examples (tool calling, multi-agent, human-in-the-loop, MCP) are
1457+
provided by the durable agents layer under `examples/agents/` in the JS SDK
1458+
(200+ examples) rather than as hand-built LLM-task workflows. If the new-language SDK includes
1459+
an agents layer, mirror that catalog — e.g.:
14551460
14561461
| File | Demonstrates |
14571462
|------|-------------|
1458-
| `agentic-workflows/function-calling.ts` | LLM tool/function calling |
1459-
| `agentic-workflows/multiagent-chat.ts` | Multi-agent debate |
1460-
| `agentic-workflows/llm-chat.ts` | LLM chat completion |
1461-
| `agentic-workflows/llm-chat-human-in-loop.ts` | Human-in-the-loop AI |
1462-
| `agentic-workflows/mcp-weather-agent.ts` | MCP tool integration |
1463+
| `agents/01-basic-agent.ts` | Basic LLM agent |
1464+
| `agents/02-tools.ts` | LLM tool/function calling |
1465+
| `agents/03-multi-agent.ts` | Multi-agent orchestration |
1466+
| `agents/09-human-in-the-loop.ts` | Human-in-the-loop AI |
1467+
| `agents/04-mcp-weather.ts` | MCP tool integration |
14631468
14641469
#### 7.4 API Journey Examples (9 files)
14651470

examples/README.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Quick reference for example files demonstrating SDK features.
44

5-
> **Looking for the durable AI-agent examples?** They live in
5+
> **Looking for the durable AI-agent examples?** All 200+ of them live in
66
> [`agents/`](agents/) and demonstrate the `@io-orkes/conductor-javascript/agents`
77
> layer (`Agent`, `AgentRuntime`, tools, guardrails, handoffs) — run them with
88
> `npx tsx examples/agents/01-basic-agent.ts`. The examples in this directory
@@ -44,17 +44,21 @@ npx ts-node examples/workers-e2e.ts
4444
| **[workflow-ops.ts](workflow-ops.ts)** | Lifecycle: start, pause, resume, terminate, restart, retry, search | `npx ts-node examples/workflow-ops.ts` |
4545
| **[test-workflows.ts](test-workflows.ts)** | Unit testing with mock task outputs (no workers needed) | `npx ts-node examples/test-workflows.ts` |
4646

47-
### AI/LLM Workflows
47+
### AI Agents
4848

49-
Require an LLM integration configured in Conductor. Set `LLM_PROVIDER` and `LLM_MODEL` env vars.
49+
Agentic examples live in [`agents/`](agents/) and use the durable agents layer
50+
(`@io-orkes/conductor-javascript/agents`). See [agents/README.md](agents/README.md)
51+
for the full catalog and environment setup (`AGENTSPAN_SERVER_URL`,
52+
`AGENTSPAN_LLM_MODEL`, provider API key). Highlights:
5053

5154
| File | Description | Run |
5255
|------|-------------|-----|
53-
| **[agentic-workflows/llm-chat.ts](agentic-workflows/llm-chat.ts)** | Two LLMs in automated multi-turn conversation | `npx ts-node examples/agentic-workflows/llm-chat.ts` |
54-
| **[agentic-workflows/llm-chat-human-in-loop.ts](agentic-workflows/llm-chat-human-in-loop.ts)** | Interactive chat with WAIT tasks for human input | `npx ts-node examples/agentic-workflows/llm-chat-human-in-loop.ts` |
55-
| **[agentic-workflows/function-calling.ts](agentic-workflows/function-calling.ts)** | LLM dynamically picks which worker to call | `npx ts-node examples/agentic-workflows/function-calling.ts` |
56-
| **[agentic-workflows/mcp-weather-agent.ts](agentic-workflows/mcp-weather-agent.ts)** | MCP tool discovery + invocation for real-time data | `npx ts-node examples/agentic-workflows/mcp-weather-agent.ts` |
57-
| **[agentic-workflows/multiagent-chat.ts](agentic-workflows/multiagent-chat.ts)** | Multi-agent debate: optimist vs skeptic with moderator | `npx ts-node examples/agentic-workflows/multiagent-chat.ts` |
56+
| **[agents/01-basic-agent.ts](agents/01-basic-agent.ts)** | Simplest possible agent: define, run, print result | `npx tsx examples/agents/01-basic-agent.ts` |
57+
| **[agents/02-tools.ts](agents/02-tools.ts)** | LLM dynamically picks which tool to call | `npx tsx examples/agents/02-tools.ts` |
58+
| **[agents/03-multi-agent.ts](agents/03-multi-agent.ts)** | Multi-agent orchestration: sequential, parallel, handoffs | `npx tsx examples/agents/03-multi-agent.ts` |
59+
| **[agents/04-mcp-weather.ts](agents/04-mcp-weather.ts)** | MCP tool discovery + invocation for real-time data | `npx tsx examples/agents/04-mcp-weather.ts` |
60+
| **[agents/09-human-in-the-loop.ts](agents/09-human-in-the-loop.ts)** | Agent pauses for human approval mid-run | `npx tsx examples/agents/09-human-in-the-loop.ts` |
61+
| **[agents/15-agent-discussion.ts](agents/15-agent-discussion.ts)** | Multi-turn debate between agents with opposing viewpoints | `npx tsx examples/agents/15-agent-discussion.ts` |
5862

5963
### Monitoring
6064

@@ -302,9 +306,9 @@ npx ts-node examples/advanced/sub-workflows.ts
302306
npx ts-node examples/api-journeys/metadata.ts
303307
npx ts-node examples/api-journeys/authorization.ts
304308

305-
# 9. AI/LLM workflows (requires LLM integration)
306-
npx ts-node examples/agentic-workflows/function-calling.ts
307-
npx ts-node examples/agentic-workflows/multiagent-chat.ts
309+
# 9. Durable AI agents (requires an LLM API key — see agents/README.md)
310+
npx tsx examples/agents/01-basic-agent.ts
311+
npx tsx examples/agents/02-tools.ts
308312
```
309313

310314
---
@@ -327,12 +331,7 @@ examples/
327331
├── metrics.ts # Prometheus metrics + HTTP server
328332
├── express-worker-service.ts # Express.js + workers integration
329333
330-
├── agentic-workflows/ # AI/LLM agent examples
331-
│ ├── llm-chat.ts # Multi-turn automated AI conversation
332-
│ ├── llm-chat-human-in-loop.ts # Interactive chat with WAIT pauses
333-
│ ├── function-calling.ts # LLM-driven function routing
334-
│ ├── mcp-weather-agent.ts # MCP tool discovery + invocation
335-
│ └── multiagent-chat.ts # Multi-agent debate with moderator
334+
├── agents/ # 200+ durable AI agent examples (see agents/README.md)
336335
337336
├── api-journeys/ # Complete API lifecycle demos
338337
│ ├── authorization.ts # Users, groups, permissions (17 calls)

0 commit comments

Comments
 (0)