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.1.tar.gz (21.1 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.1-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sota_runner-0.1.1.tar.gz
  • Upload date:
  • Size: 21.1 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.1.tar.gz
Algorithm Hash digest
SHA256 9d5b167a33fddd96b8d3139b8ff2a0d6c8f6fdeb1a857d418b27c9c3244845ab
MD5 c5c54378f66ad3356bd7822de7b31c35
BLAKE2b-256 28e9447e66e8d8783f7e17a41ced6aa9920b9344ab5cad53ef32273a6cd5d160

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sota_runner-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 23.8 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7cb2c8be840580a10c1993742fb92a23eac73575b1300a320418e0d50b742d07
MD5 7fc501602254f76dd3817a26f9f91c1e
BLAKE2b-256 079eda16eaa350cde67c074636fcf254885ad18b63939822b5257dd8db337327

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