Meet Your Claw: A Harness in Three Lines of C#
dotnet demonstrates how to stand up an agent “harness” in C# using a single AsHarnessAgent call, then incrementally add tool calling, web search, and planning so a vague request becomes a tracked, step-by-step execution loop.
Overview
The video shows how to build a minimal agent harness in C# where a single call to AsHarnessAgent provides the core agentic loop.
Building blocks added to the harness
Ability 1: Custom tool for stock prices
- Adds a custom
get_stock_pricetool that the agent can call.
Ability 2: Built-in web search for market news
- Uses a built-in web search capability to pull market news relevant to a watchlist.
Ability 3: Planning with a to-do list
- Introduces planning via a to-do list.
- Uses both plan and execute modes to turn a vague request (for example, “review my watchlist and suggest something to add”) into a tracked, step-by-step plan.
Wiring and running the agent
- Wires the agent to a Microsoft Foundry chat client.
- Runs the agent in the shared harness console.
- Sets up a companion repo so everyone starts on the same SDK version.
Resources
- Series info: https://aka.ms/FMTA/series
- Agent harness resource: https://aka.ms/AgentHarness