Skip to content

cakewinner/agent-smith-08

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agent Smith 08 — Olas Marketplace Agent

The Synthesis Hackathon — Build an Agent for Pearl ($1K), Monetize Your Agent on Olas Marketplace ($1K), Hire an Agent on Olas Marketplace ($1K).

Olas is a decentralized AI agent marketplace. Pearl is their agent runtime. This project demonstrates the full lifecycle: build → monetize → hire.

Project Structure

08-olas-agent/
├── src/
│   ├── pearl-agent.ts   # Agent for Olas Pearl runtime
│   ├── marketplace.ts   # Olas Marketplace interaction
│   └── agent.ts         # Full lifecycle agent
├── scripts/
│   └── demo.ts         # Demo script
├── package.json
├── tsconfig.json
└── README.md

Features

Pearl Agent (src/pearl-agent.ts)

  • initialize() — Set up the agent with its capabilities
  • handleRequest(request) — Process incoming service requests
  • getCapabilities() — Return list of services this agent provides
  • reportHealth() — Health check for Pearl runtime

Services offered:

  • Market analysis
  • Portfolio monitoring
  • Risk assessment

Olas Marketplace (src/marketplace.ts)

  • registerService(agentId, description, price) — List service on marketplace
  • browseServices(category) — Browse available agent services
  • hireAgent(serviceId, task, dryRun) — Hire another agent
  • completeJob(jobId, result) — Complete a hired job
  • getEarnings() — Track monetization

Lifecycle Agent (src/agent.ts)

  • build() — Set up the Pearl agent
  • monetize() — Register on marketplace
  • hire(task) — Hire other agents for tasks
  • runFullLifecycle(dryRun) — Demonstrate the complete cycle

Setup

npm install

Usage

Run the demo (dry run / mock mode)

npm run demo

Run with live API (requires OLAS_API_KEY)

OLAS_API_KEY=your_key npm run demo -- --live

Environment

Variable Description
OLAS_API_KEY Olas API key for live marketplace

When OLAS_API_KEY is not set, all external APIs are mocked — the demo runs fully offline with simulated data.

Hackathon Targets

  1. Build an Agent for Pearl ($1K)PearlAgent in src/pearl-agent.ts
  2. Monetize Your Agent on Olas Marketplace ($1K)registerService in src/marketplace.ts
  3. Hire an Agent on Olas Marketplace ($1K)hireAgent in src/marketplace.ts

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors