calculator-weather-agents example without writing config.yaml by hand. You describe the scenario in one sentence, then IBM Bob drives wxctl mcp serve to compose the config, scaffold the tools, plan, apply, and test, then tear it all down. The deployed result is identical to the Declarative path: one knowledge base, two Python tools, two agents, and four tests.
This page documents the flow proven live on watsonx Orchestrate. To wire other MCP clients (Cursor, Claude Desktop, or your own agent), see MCP clients.
Prerequisites
- A prebuilt
wxctlbinary on yourPATH. See Installation. - A watsonx Orchestrate profile. Every resource is a watsonx Orchestrate resource, so the profile needs one
watsonx_orchestrateblock. See Profiles & credentials. - IBM Bob installed. Bob is the MCP client that runs the flow.
.bob/mcp.jsonwiring Bob towxctl mcp serve. Create it in the project directory:
.bob/mcp.json
Replace
"wxctl" with the absolute path to the binary if it is not on Bob’s PATH. The working directory must be a Bob trusted folder so Bob can read and write files there. To wire Bob for every workspace, put the same block in ~/.bob/mcp_settings.json instead.Write the scenario
Start from an empty project directory that holds onlyuse-case.txt with the scenario:
use-case.txt
Run it interactively
Launch Bob in the project directory:compose_start first, which returns the ordered recipe and its guardrails, then works through the stages below. Approve each MCP tool call as Bob composes, validates, scaffolds, plans, applies, tests, and destroys. Apply and destroy pause for your confirmation (the server gates them with confirm: true); the read-only steps and wxctl_test run without a gate.
Run it headless
For an unattended or CI run, Bob Shell takes the same instruction in one shot:--yolo approves the tool calls and file writes a non-interactive session would otherwise refuse, so the generated config.yaml and tool sources land in the current directory. The confirm: true gate on apply and destroy still holds inside the server, as does the error-free-plan-before-apply rule. To let an unattended agent explore with no possibility of mutation, wire the server with --read-only in args instead.
The stages
Bob works through thecompose_start recipe in order:
| Stage | Tools | What happens |
|---|---|---|
| Recipe | compose_start | Returns the ordered steps, the fix-loop policy, and the plan-before-apply gate |
| Generate | compose_paths, compose_prompt | Bob’s model writes config.yaml: a knowledge base, two Python tools, two collaborating agents, and a generated kind: test suite |
| Check | wxctl_validate | Schema and reference checks; an invalid config returns a fix prompt (at most 3 iterations) |
| Scaffold | compose_scaffold | Materializes the tool source stubs on disk; Bob fills in the implementations and the knowledge-base document |
| Preview | wxctl_plan | The dependency-ordered create plan, which must be error-free |
| Deploy | wxctl_apply (confirm: true) | Creates the resources |
| Prove | wxctl_test | Runs the generated tests against the live deployment |
| Reset | wxctl_destroy (confirm: true) | Tears everything back down |
wxctl_apply refuses to run until a preceding wxctl_plan succeeds, so Bob cannot skip the preview.
This is that run, fast-forwarded: Bob generates the config and the implementations, deploys, proves it with the tests it wrote, and tears it all down.
What you deployed
TheReset stage already tore the resources down, so nothing is left running. Along the way Bob deployed and tested the identical result of the Declarative path:
- 1 knowledge base, grounded in the IBM company-history document.
- 2 Python tools, a calculator (add / multiply / divide) and a weather lookup (mock city forecasts).
- 2 agents, a Calculator Agent (calculator tool + knowledge base) and a Weather Agent (weather tool) that delegates arithmetic to the Calculator Agent.
- 4 tests, covering a calculation, an IBM-history answer, a Tokyo forecast, and delegation.
Next steps
Build it by hand
The other way to build this: write every file yourself, then plan, apply, and test.
MCP clients
Wire wxctl into Bob, Cursor, or a hosted config-authoring Worker.
Generate a config from a scenario
The compose_start recipe in depth: identify, generate, plan, apply, test.
Resource kinds
Every kind the discovery tools can list and explain.

