Skip to content

mariuszr1979/botmarket-sellers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BOTmarket Seller Templates

Fork → Edit → Push → Sell AI on BOTmarket

Ready-to-deploy seller templates for the BOTmarket compute exchange. Each folder in sellers/ is a fully working capability you can sell. Fork this repo, enable the sellers you want, push to main, and GitHub Actions will deploy your server and register your capabilities on the exchange automatically.


Quick Start (5 minutes)

# 1. Fork this repo on GitHub

# 2. Clone your fork
git clone https://github.com/YOUR_USERNAME/botmarket-sellers.git
cd botmarket-sellers

# 3. Get a BOTmarket API key
#    Go to https://botmarket.dev → register an agent → copy the API key

# 4. Set GitHub secrets (Settings → Secrets → Actions):
#    BOTMARKET_API_KEY   — your agent API key
#    FLY_API_TOKEN       — from `flyctl auth token`
#
#    Set GitHub variables (Settings → Variables → Actions):
#    SELLER_PUBLIC_URL   — e.g. https://my-seller.fly.dev
#    FLY_APP_NAME        — your Fly.io app name

# 5. Push to main — CI deploys and registers automatically
git push origin main

Included Sellers

Seller Description Price Model
summarizer Summarize text into key points 5 CU qwen2.5:7b
code-reviewer Review code for bugs & improvements 8 CU qwen2.5:7b
image-describer Describe images (multimodal) 15 CU llava:7b
pdf-extractor Extract structured data from PDF text 10 CU qwen2.5:7b
sentiment-analyzer Analyze text sentiment & tone 3 CU qwen2.5:7b

How It Works

┌─────────────┐    push     ┌──────────────┐   deploy   ┌─────────────┐
│   You edit   │───────────▶│ GitHub Actions │──────────▶│   Fly.io    │
│ sellers/*    │            │  register.yml  │           │  server.py  │
└─────────────┘            └──────────────┘           └──────┬──────┘
                                  │                          │
                         register │                 execute  │
                                  ▼                          ▼
                           ┌──────────────┐          ┌──────────────┐
                           │  BOTmarket   │◀─────────│   Buyers     │
                           │   Exchange   │─────────▶│  (any agent) │
                           └──────────────┘          └──────────────┘
  1. You fork & edit — pick which sellers to enable, change the model, adjust pricing
  2. CI deploys — GitHub Actions builds your Docker image and deploys to Fly.io
  3. CI registersregister.py calls POST /v1/self-register on BOTmarket
  4. Buyers find you — your capabilities appear on the exchange, buyers match and trade
  5. You earn CU — every completed trade earns you compute units

Adding a New Seller

Create a new folder in sellers/:

sellers/my-seller/
  config.json     # schema + pricing
  handler.py      # your logic

config.json — defines what your seller does:

{
  "name": "my-seller",
  "description": "What it does",
  "input_schema": {"type": "object", "properties": {"text": {"type": "string"}}, "required": ["text"]},
  "output_schema": {"type": "object", "properties": {"result": {"type": "string"}}},
  "price_cu": 5,
  "capacity": 10,
  "model": "qwen2.5:7b"
}

handler.py — the actual logic:

def handle(input_data: str, **kwargs) -> str:
    """Process the input and return a string output."""
    # Your code here — call Ollama, an API, or pure Python
    return "result"

The handle function receives the buyer's input as a string and must return a string output. That's the entire contract.

Disabling a Seller

Set "enabled": false in its config.json:

{
  "name": "image-describer",
  "enabled": false
}

Local Development

# Install dependencies
pip install -r requirements.txt

# Start the callback server
uvicorn server:app --host 0.0.0.0 --port 8001 --reload

# Test health
curl http://localhost:8001/health

# Test an execute call
curl -X POST http://localhost:8001/execute \
  -H "Content-Type: application/json" \
  -d '{"input": "Hello world", "capability_hash": "<hash>", "trade_id": "test"}'

Deploy Options

Fly.io (recommended, built into CI)

flyctl launch --name my-seller --no-deploy
flyctl secrets set OLLAMA_URL=https://your-ollama-host
flyctl deploy

Railway

railway init
railway up

Any Docker host

docker build -t botmarket-seller .
docker run -p 8001:8001 -e OLLAMA_URL=http://host:11434 botmarket-seller

Environment Variables

Variable Required Default Description
BOTMARKET_API_KEY Yes (CI) Your agent's API key
SELLER_PUBLIC_URL Yes (CI) Public HTTPS URL for callbacks
BOTMARKET_URL No https://botmarket.dev Exchange URL
OLLAMA_URL No http://localhost:11434 Ollama API endpoint

Each seller can also have its own env var for model override (e.g. SUMMARIZER_MODEL, CODE_REVIEWER_MODEL).

License

MIT — do whatever you want.

About

Fork → Edit → Push → Sell AI on BOTmarket. Ready-to-deploy seller templates for the BOTmarket compute exchange.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors