Skip to main content

agent-utils-swarm

Thin Python client for the agent_utils Swarm server - stateful coordination for AI agents over MCP: memory, locks, task board, pub/sub, idempotency and webhook inboxes.

This is a client for a hosted commercial service (agent-utils.ai), not the service itself. Zero dependencies (standard library only). Install name agent-utils-swarm; import agent_utils.swarm (a namespace package).

Install

pip install agent-utils-swarm

Quickstart

import json, os
from agent_utils.swarm import AgentUtilsSwarm

# Any secret works as a token; the first call auto-provisions a free trial.
swarm = AgentUtilsSwarm(token=os.environ["AGENT_UTILS_TOKEN"])

swarm.put_memory("project", "status", json.dumps({"phase": "review"}))

# Hand work out through the task board; any agent can claim it atomically.
swarm.create_task(board="launch", title="Write release notes")
claimed = swarm.claim_task(board="launch", agent_name="writer")

# Tell the rest of the swarm, and wait (long-poll) for replies.
swarm.publish(topic="launch", body="release notes in progress", sender="writer")
news = swarm.read_topic(topics=["launch"], wait_seconds=20)

API

Memory - persistent key-value memory

  • get_memory(namespace, key)
  • put_memory(namespace, key, value_json, months?, tags?, priority?)
  • replace_memory(namespace, key, value_json, priority?, summary?, tags_to_add?, tags_to_delete?)
  • extend_memory_ttl(namespace, key, months)
  • delete_memory(namespace, key)
  • list_keys(namespace)
  • list_namespaces()
  • search_by_tag(tag)
  • top_memories(namespace, n)

Mutex - distributed locks

  • acquire_lock(resource_id, agent_name, ttl_seconds?, reason?)
  • release_lock(resource_id, kill_token)
  • extend_lock(resource_id, kill_token, additional_ttl_seconds)
  • check_lock(resource_id)
  • list_active_locks()

Task board - shared work queue with atomic claims, leases and dependencies

  • create_task(board, title, description?, priority?, depends_on?, tags?, memory?, created_by?)
  • list_tasks(board, status?, owner?, tag?, ready_only?, limit?)
  • get_task(board, task_id)
  • claim_task(board, agent_name, task_id?, tag?, lease_seconds?)
  • complete_task(board, task_id, agent_name, result?, memory?)
  • release_task(board, task_id, agent_name)
  • update_task(board, task_id, ...)
  • delete_task(board, task_id)
  • list_boards()
  • renew_board(board, months?)
  • delete_board(board)

Pub/sub - topics agents publish to and long-poll

  • publish(topic, body, ttl_seconds?, sender?)
  • read_topic(topics, after?, limit?, wait_seconds?)
  • renew_message(topic, seq, ttl_seconds?)
  • list_topics()
  • delete_topic(topic, delete_token)

Idempotency - exactly-once operations

  • acquire_key(key, operation, agent_name)
  • complete_key / fail_key / check_key
  • create_operation_rule / list_operation_rules / delete_operation_rule / cleanup_operation_rules

Webhook inbox - temporary webhook receivers

  • create_inbox(...)
  • poll_inbox(...)
  • list_inboxes()
  • delete_inbox(...)
  • configure_inbox_settings(...)
  • cleanup_expired()

Account (on both servers) - get_account, list_api_keys, create_api_key, revoke_api_key, list_payments, settle_balance, submit_feature_request, submit_exit_feedback, delete_account

  • call(name, args) - call any tool by name

Python methods use the tool names; TypeScript methods are their camelCase forms (claim_task -> claimTask). Memory has typed parameters; the other services take keyword arguments (Python) or an args object (TypeScript) that are passed straight through as the tool's arguments.

Every response carries a _meta envelope with account_status, op_cost, and credits_remaining. The canonical, always-current reference is the server's llms.txt (per service: /docs/<service>).

Endpoint: https://mcp.agent-utils.ai/swarm (staging: STAGING_ENDPOINT, https://mcp-staging.agent-utils.ai/swarm).

One token, both servers

agent_utils is two MCP servers on one account: swarm (this one) and extensions (math, units). The same token works on both and draws from one credit pool. See the agent-utils hub for the full platform, and the TypeScript client @agent-utils/swarm.

Pricing

1 credit = $0.00001. Trial: 1,000 credits, no card. Activation: $5 -> 500,000-credit limit. Terms: mcp.agent-utils.ai/legal.txt.

Contact

Questions, bugs or account issues: support@agent-utils.ai

License

MIT. The hosted agent_utils service is a separate commercial product and is not open-source.

Metadata

Release files for agent-utils-swarm 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-utils-swarm 0.1.0
File Size Uploaded Provenance Actions
agent_utils_swarm-0.1.0.tar.gz 7.5 kB With provenance Details for agent_utils_swarm-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agent-utils-swarm 0.1.0
File Interpreter ABI Platform Actions
agent_utils_swarm-0.1.0-py3-none-any.whl Python 3 none any Details for agent_utils_swarm-0.1.0-py3-none-any.whl

Total release size: 14.1 kB

Release files / agent_utils_swarm-0.1.0.tar.gz

Download URL agent_utils_swarm-0.1.0.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bd9a2a9c9c249dd8398d11c11440a6a189495e9d04faf333de7b0ac35ecd7d45
BLAKE2b-256 checksum
How to use checksums
068b52500910d88767da1c7d416cf3ac77f0c06e20accd354520ff796b69d01b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Release files / agent_utils_swarm-0.1.0-py3-none-any.whl

Download URL agent_utils_swarm-0.1.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
701704b646c8cf71b484950047b75c79dd6a914a7de2d23482bbffdef69f1ac9
BLAKE2b-256 checksum
How to use checksums
8ba41c3cbe846b0cd4f17d5a890340fca82c311f6b7f846b382cfb7d9ad71cd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Security for agent-utils-swarm 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agent_utils_swarm-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page