Skip to main content

MyAI GPU compute agent — earn MYAI tokens by sharing your compute power

Project description

MyAI GPU Agent

PyPI version CI Python 3.8+ License: MIT

Earn MYAI tokens by sharing your GPU compute power with the MyAI distributed inference network.

Your GPU runs local AI inference via Ollama. Jobs are dispatched from the MyAI coordinator and you earn MYAI on Base for every completed job.


Quick Install

macOS / Linux:

curl -fsSL https://myaitoken.io/install | bash

With your wallet address (to start earning immediately):

WALLET=0xYourWalletAddress curl -fsSL https://myaitoken.io/install | bash

pip (any platform):

pip install myai-agent
myai-agent install --wallet 0xYourWalletAddress

Requirements

Requirement Version Notes
Python 3.8+ Zero external deps — pure stdlib
Ollama Any Local inference engine
GPU Optional CPU works too, just slower

Supported GPUs: NVIDIA (CUDA), Apple Silicon (Metal), AMD (ROCm)


Manual Setup

1. Install Ollama

# macOS
brew install --cask ollama

# Linux
curl -fsSL https://ollama.com/install.sh | sh

# Windows
# Download from https://ollama.com/download

2. Pull a model

ollama pull llama3.2        # recommended (2GB, fast)
ollama pull llama3.1:8b     # larger, better quality
ollama pull mistral         # alternative

3. Install the agent

pip install myai-agent

4. Run or install as service

One-off run:

myai-agent start --wallet 0xYourWallet

Install as service (auto-starts on login):

myai-agent install \
  --wallet 0xYourWallet \
  --name "My GPU Rig" \
  --model llama3.2

Commands

myai-agent start              Run the agent (foreground)
myai-agent install            Install as OS service
myai-agent uninstall          Remove OS service
myai-agent status             Check service status + agent ID
myai-agent logs               Tail agent logs
myai-agent models             List available Ollama models
myai-agent run-job <prompt>   Test local inference
myai-agent --version          Print version

Options (start / install)

Flag Default Description
--coordinator URL https://api.myaitoken.io Coordinator endpoint
--ollama URL http://localhost:11434 Ollama endpoint
--wallet 0x... Base EVM wallet for MYAI rewards
--name NAME hostname Display name for this agent
--model MODEL llama3.2 Default Ollama model
--required-models M1,M2 bonsai-8b:latest Comma-separated models to auto-pull on startup

Auto Model Pull

The agent automatically pulls required models on startup if they aren't already present in Ollama.

Default: bonsai-8b:latest is pulled on every agent start if missing (~1.1 GB, 1-bit quantized).

Customize via env var:

REQUIRED_MODELS=bonsai-8b:latest,deepseek-r1:7b myai-agent start

Disable auto-pull:

REQUIRED_MODELS="" myai-agent start

The pull streams progress to the log and blocks registration until complete — so the coordinator always sees accurate model lists.


How It Works

  1. Agent registers with the coordinator and reports available GPUs + models
  2. Coordinator receives inference jobs from users
  3. Agent polls for pending jobs (GET /api/v1/agents/{id}/jobs/pending)
  4. Agent runs inference locally via Ollama (POST /api/generate)
  5. Results reported back to coordinator (POST /api/v1/agents/{id}/jobs/{job_id}/complete)
  6. MYAI tokens distributed to your wallet on Base (Phase 3)

Parallel inference: Large jobs are split across multiple agents simultaneously for faster results.


Platform Notes

macOS

  • Installed as a launchd service (~/Library/LaunchAgents/io.myaitoken.agent.plist)
  • Logs: ~/Library/Logs/myai-agent/agent.log
  • Ollama recommended: brew install --cask ollama

Linux

  • Installed as a systemd user service (~/.config/systemd/user/myai-agent.service)
  • Logs: journalctl --user -u myai-agent -f

Windows


Configuration

Environment variables (set in OS service config, or export before myai-agent start):

Variable Default Description
COORDINATOR_URL https://api.myaitoken.io Coordinator API URL
OLLAMA_URL http://localhost:11434 Ollama server URL
AGENT_NAME hostname Display name
AGENT_WALLET Base wallet for MYAI rewards
POLL_INTERVAL 5 Seconds between job polls
HEARTBEAT_INTERVAL 30 Seconds between heartbeats

MYAI Token

  • Contract: 0xaff22cc20434ce43b3ea10efe10e9360390d327c
  • Chain: Base (Chain ID: 8453)
  • Symbol: MYAI | Supply: 1,000,000,000

License

MIT © MyAI Token

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

myai_agent-2.0.0.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

myai_agent-2.0.0-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file myai_agent-2.0.0.tar.gz.

File metadata

  • Download URL: myai_agent-2.0.0.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for myai_agent-2.0.0.tar.gz
Algorithm Hash digest
SHA256 c67bc6a1ff4a61140aa529322a0fe9a900561397dd84926e055157df633633b8
MD5 a04e2c46885dc9b5dccd5834721b275c
BLAKE2b-256 2b45df69d8a749eec9c3e6abfea9582ceb044c3fac5716208b8c2860995f3114

See more details on using hashes here.

File details

Details for the file myai_agent-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: myai_agent-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for myai_agent-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d54a83e538e83b64939d99260fae5740bd555bae98baaf27848cd6f0e3a2bfa7
MD5 387d5b6d7627eb7bfc549ae2f7ed485a
BLAKE2b-256 0ac2e12f0f7fbe883a64c112eba3ac18e2e0a078ad9ec04a86891d4bb93d3aa1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page