Add a todo-harness agent example - #1166
PratikDhanave (PratikDhanave) wants to merge 1 commit into
Conversation
Go supports the todo harness (agent/harness/todo) but has no sample for it. Add an example that attaches the todo context provider to a Foundry agent so the agent plans a multi-step task with todo items and completes them, and register it with cmd/verifyexamples (env-gated on FOUNDRY_PROJECT_ENDPOINT).
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved review comments remain, and all reviewed changes are covered.
Review effort: Lite
Findings: None
What changed in this PR
Adds a Go example demonstrating the session-backed todo harness with a Foundry agent.
Changes:
- Adds a three-course dinner planning example using todo tools.
- Registers the example with environment-gated verification.
| File | Description |
|---|---|
examples/02-agents/harness/step02_todo/main.go |
Demonstrates todo context-provider usage. |
cmd/verifyexamples/examples.go |
Registers the sample for verification. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Scope: examples Changed Go contract: None. This PR only adds a new example ( Upstream evidence reviewed:
Result: aligned. This is a pure example addition (plus test-harness registration) with an env-gated Foundry credential requirement, consistent with other harness examples. No public API, defaults, or runtime behavior changed. Go's todo-harness sample coverage is a reasonable, idiomatic complement to the equivalent upstream Python/.NET todo-tooling surfaces — no cross-repo parity issues found.
|
Continuing the harness sample coverage (after the loop-harness example): Go supports the todo harness (
agent/harness/todo) butexamples/has no sample for it, unlike the .NET Harness samples.Change
examples/02-agents/harness/step02_todothat attaches the todo context provider to a Foundry agent. The provider exposes todo tools and injects the current todo list each turn, so the agent plans a multi-step task (a three-course dinner) as todo items and completes them one by one (session-backed, so it runs inside a session).cmd/verifyexamples(env-gated onFOUNDRY_PROJECT_ENDPOINT), skipping cleanly without credentials.Builds,
go vet,gofumptclean; theverifyexamplestest passes and the entry is discovered and skips without credentials.