Skip to content

Add a todo-harness agent example - #1166

Open
PratikDhanave (PratikDhanave) wants to merge 1 commit into
microsoft:mainfrom
PratikDhanaveFork:feat/example-todo-harness
Open

PratikDhanave (PratikDhanave) wants to merge 1 commit into
microsoft:mainfrom
PratikDhanaveFork:feat/example-todo-harness

Conversation

@PratikDhanave

Copy link
Copy Markdown
Contributor

Continuing the harness sample coverage (after the loop-harness example): Go supports the todo harness (agent/harness/todo) but examples/ has no sample for it, unlike the .NET Harness samples.

Change

  • New examples/02-agents/harness/step02_todo that 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).
  • Registered in cmd/verifyexamples (env-gated on FOUNDRY_PROJECT_ENDPOINT), skipping cleanly without credentials.

Builds, go vet, gofumpt clean; the verifyexamples test passes and the entry is discovered and skips without credentials.

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).
Copilot AI lite review requested due to automatic review settings September 23, 2026 04:39
@github-actions github-actions Bot added area:examples Changes files in the examples area area:tooling Changes files in the tooling area size:medium At most 100 changed lines across at most 5 files labels Sep 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions github-actions Bot added the kind:examples Changes examples or example-support metadata label Sep 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Scope: examples

Changed Go contract: None. This PR only adds a new example (examples/02-agents/harness/step02_todo/main.go) and a corresponding entry in cmd/verifyexamples/examples.go. It uses the existing, unchanged agent/harness/todo package (todo.New, todo.Options) that already ships in this repo (introduced prior to this PR) — no exported symbols, option shapes, or defaults were added or modified.

Upstream evidence reviewed:

  • Python: python/packages/core/agent_framework/_harness/_todo.py (todo harness context provider), sample coverage under python/samples/02-agents/harness/console/commands/todo_handler.py.
  • .NET: dotnet/src/Microsoft.Agents.AI/Harness/Todo/TodoProvider.cs, TodoProviderOptions.cs, TodoItem.cs, with sample usage in dotnet/samples/02-agents/Harness/Harness_Shared_Console/Commands/TodoCommandHandler.cs and ToolFormatters/TodoToolFormatter.cs (todo functionality is exposed as part of the shared harness console rather than a single standalone step sample).
  • Go already has a related, more elaborate sample combining agentmode + todo providers at examples/02-agents/agents/step23_planning_with_todos/main.go, demonstrating the same todo.New API this PR exercises in a simpler standalone form.

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.

Generated by Go API Consistency Review Agent · copilot · auto · 41.2 AIC · ⌖ 5.53 AIC · ⊞ 9.2K ·

@github-actions github-actions Bot added the parity-approved Go API consistency review found no parity issues label Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:examples Changes files in the examples area area:tooling Changes files in the tooling area kind:examples Changes examples or example-support metadata parity-approved Go API consistency review found no parity issues size:medium At most 100 changed lines across at most 5 files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants