Demonstrates the core agentkit-mesh flow: register agents → discover by capability → delegate tasks.
An HR agent needs to fill an expense form but doesn't know budget details. It:
- Registers itself and discovers that a Finance agent is also registered
- Discovers the Finance agent by searching for "budget cost center"
- Delegates the budget lookup to the Finance agent via an HTTP
POST /taskto its endpoint
npx tsx examples/formbridge-demo.ts=== FormBridge Demo: Agent-to-Agent Discovery ===
1. Registering agents...
✓ hr-agent registered (capabilities: employee_info, hr_data, department)
✓ finance-agent registered (capabilities: budget, cost_center, expense_approval)
2. HR agent discovers agents for "budget cost center"...
→ finance-agent (score: 0.60, matched: budget, cost, center)
3. HR agent would delegate to finance-agent at http://localhost:4002/task
Task: "Get budget and cost center for Engineering department"
Replace the simulated delegation with a real agent listening at the registered
endpoint. The mesh delegates by sending an HTTP POST /task to that endpoint
(see the delegation contract in the top-level README), so any agent that exposes
such an HTTP endpoint can participate.