Skip to content
This repository was archived by the owner on Jul 8, 2026. It is now read-only.

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Examples

FormBridge Demo

Demonstrates the core agentkit-mesh flow: register agents → discover by capability → delegate tasks.

Scenario

An HR agent needs to fill an expense form but doesn't know budget details. It:

  1. Registers itself and discovers that a Finance agent is also registered
  2. Discovers the Finance agent by searching for "budget cost center"
  3. Delegates the budget lookup to the Finance agent via an HTTP POST /task to its endpoint

Run

npx tsx examples/formbridge-demo.ts

What You'll See

=== 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"

In Production

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.