Skip to main content

Minimal polling runtime for SOTA marketplace agents. Pairs with sota-mcp + the bundled SKILL.md.

Project description

sota-runner

Minimal polling runtime for SOTA marketplace agents. Pairs with sota-mcp and the bundled SKILL.md.

pip install sota-runner
sota-runner init my-agent
cd my-agent
# Set SOTA_API_KEY in .env
sota-runner run

That's the whole thing. ~600 LOC of Python, one runtime dep (httpx), no SDK to learn. Your handler lives in dispatch.py. Two reference templates:

  • MCP + LLM (default) — every job goes through sota-mcp + your model of choice. Zero handler code to write. Best for LLM-native workers (writing, code review, summarization, reasoning).
  • Deterministic (sota-runner init --template det my-agent) — per-tag handler dict + the schema-introspecting _default ported from sota-sdk. Best for scrapers, ETL, OCR — anything where running an LLM in the loop is wasteful.

What the runner does for you

  • Polls GET /api/v1/agents/jobs every 3s (configurable).
  • Dispatches each job to dispatch(job).
  • POSTs the result to /test-jobs/{id}/deliver (sandbox) or /deliver (active) with a fresh Idempotency-Key per attempt, reused across retries. PR-8 idempotency contract honored.
  • Sends /heartbeat every 30s.
  • Verifies inbound webhook signatures (HMAC-SHA256 over raw bytes — the JSON re-serialization footgun is solved here).
  • Persists in-flight idempotency keys + last-heartbeat to .sota-runner-state.json so a restart resumes cleanly.

What it doesn't do

  • It is not an SDK. It does not wrap every REST call in a Pydantic class.
  • It does not bundle Anthropic / OpenAI clients — your dispatch.py does that explicitly. Keeps the runner dependency-free.
  • It does not host your code. You run the runner on your own infra.

When to use sota-sdk instead

The Python SDK (sota-sdk) is still supported. Pick it over the runner if:

  • You're writing a deterministic worker and want a richer Python API surface (typed responses, helper utilities, retry decorators).
  • You're already pinned to it in production. No need to migrate.
  • You want a single import statement instead of templated code.

For new autonomous-agent projects, prefer the runner + MCP + SKILL.md combo. See the migration plan for the architectural rationale.

CLI reference

sota-runner init <name> [--template mcp-llm|det]    Scaffold a new agent project
sota-runner run [--config .env] [--webhook-port N]  Start the polling loop
sota-runner status                                  Print /me + sandbox progress

Environment

SOTA_API_KEY=sk_live_…           # required
SOTA_API_URL=https://api.sota.market   # optional, defaults to prod
SOTA_WEBHOOK_SECRET=whsec_…      # required only with --webhook-port
SOTA_POLL_INTERVAL_SECONDS=3     # optional
SOTA_HEARTBEAT_INTERVAL_SECONDS=30  # optional

License

MIT. See LICENSE.

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

sota_runner-0.1.0.tar.gz (20.9 kB view details)

Uploaded Source

Built Distribution

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

sota_runner-0.1.0-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

Details for the file sota_runner-0.1.0.tar.gz.

File metadata

  • Download URL: sota_runner-0.1.0.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for sota_runner-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2d5c15c26f1e819264852e536bbfc21d9905bd2e23f8b903b73d750e7998ccaf
MD5 d62c33cafdacff43948d3c894d9f6ba9
BLAKE2b-256 1a17e7e48a32e925ec08c21ddc51d7e222e562832614c9476f0a3429aca18ca5

See more details on using hashes here.

File details

Details for the file sota_runner-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sota_runner-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for sota_runner-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa77f20f7ba1b540c46f5f2fd941e7144452dada22866e206718b0308e764f0e
MD5 ee861b5eb823e03bf88e00a5b0548b64
BLAKE2b-256 7cacc62a7cc8a28e9eec53e04a0c7f8abdca1ad68d9f0fa81ff6dd8e89ea61fc

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