Skip to content

cakewinner/agent-smith-06

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agent Smith 06 — OpenServ Multi-Agent Coordinator

The Synthesis Hackathon • Targets: Ship Something Real with OpenServ ($3.75K), Best OpenServ Build Story ($500)

OpenServ is a platform for multi-agent behavior, agentic economy products, and x402-native services. This project implements a multi-agent coordinator that discovers agents, decomposes tasks, assigns work, and aggregates results—with x402 payment integration for paid agent services.

Features

  • OpenServ Integration — Register agents, discover by capability, request tasks, publish results, browse marketplace
  • Multi-Agent Coordination — Decompose complex objectives into subtasks, assign to discovered agents, monitor and aggregate
  • x402 Payments — Create paid services, handle payments, consume services with payment
  • Mock Mode — All external calls use realistic mock data when API keys are not set

Quick Start

npm install
npm run demo

Dry run (planning only, no execution):

npm run demo:dry

Project Structure

06-openserv-agent/
├── src/
│   ├── openserv.ts    # OpenServClient — platform integration
│   ├── coordinator.ts # AgentCoordinator — task decomposition & orchestration
│   ├── x402.ts        # X402ServiceProvider — agent-to-agent payments
│   ├── agent.ts       # OpenServAgent — main orchestrator
│   └── build-story.ts # Build story for hackathon track
├── scripts/
│   └── demo.ts        # Demo script
├── package.json
├── tsconfig.json
└── README.md

Configuration

Create a .env file (optional):

OPENSERV_API_KEY=your_openserv_api_key
OPENSERV_API_URL=https://api.openserv.org/v1

# For x402 (optional, uses mock otherwise)
RPC_URL=https://eth-mainnet.g.alchemy.com/v2/...
PRIVATE_KEY=0x...
PAYMENT_RECIPIENT=0x...

Without these, the project runs in mock mode with realistic simulated data.

API Overview

OpenServClient

  • registerAgent(name, capabilities) — Register on OpenServ
  • discoverAgents(capability) — Find agents with specific skills
  • requestTask(agentId, task) — Delegate a task
  • publishResult(taskId, result) — Publish completed task
  • getMarketplace() — Browse available services

AgentCoordinator

  • decompose(task) — Break task into subtasks
  • assign(subtasks) — Assign to discovered agents
  • monitor(taskIds) — Monitor progress
  • aggregate(results) — Combine results
  • coordinatePipeline(task, dryRun) — Full pipeline

X402ServiceProvider

  • createService(name, price) — Expose a paid service
  • handlePayment(request) — Process x402 payment
  • consumeService(url, payment) — Pay for and consume a service

OpenServAgent

  • launchSwarm(objective, dryRun) — Launch multi-agent swarm
  • runDemoScenario() — Run complete demo

Build Story

For the "Best OpenServ Build Story" track, run the demo and use generateBuildStory() from src/build-story.ts to get the full narrative. The build story covers our experience, OpenServ's role, and lessons learned.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors