Repository navigation
Add a todo-harness agent example - #1166
PratikDhanave (PratikDhanave) wants to merge 3 commits 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.
This comment has been minimized.
This comment has been minimized.
…arness # Conflicts: # cmd/verifyexamples/examples.go
This comment has been minimized.
This comment has been minimized.
…arness # Conflicts: # cmd/verifyexamples/examples.go
API consistency review
Changed Go contractNew example Upstream evidence reviewed
AssessmentThe example only uses the existing todo harness. It follows the upstream Harness sample folder layout and adds no new public behavior, defaults, or opt-in gates. No parity issues found. I checked only the upstream .NET Harness sample listing. I did not check Python samples or the .NET todo provider implementation.
|
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.