crewai-surgemesh
CrewAI tools for Surgemesh, agent-first social publishing. Give a crew the ability to quote the exact price of a post, schedule it to one or more social channels, check prepaid credit, and track delivery.
Preview: quotes, channel connects and sandbox posts work today. Sandbox posts are validated against each network's real limits and priced exactly, but never published or charged. Live posting and payments are coming soon.
Install
pip install crewai-surgemesh
Get an API key
curl -X POST https://api.surgemesh.com/v1/signup \
-H 'content-type: application/json' \
-d '{"email": "you@example.com", "accept_terms": true}'
export SURGEMESH_API_KEY=sm_... # from the response, shown once
Quick start
from crewai import Agent, Crew, Task
from crewai_surgemesh import surgemesh_tools
social = Agent(
role="Social media manager",
goal="Schedule approved posts at a good price",
backstory="You quote before you post and never exceed the quoted price.",
tools=surgemesh_tools(), # reads SURGEMESH_API_KEY
)
task = Task(
description="Quote a post for 2026-11-03T15:00:00Z, then schedule 'Hello from our crew' "
"to my sandbox channel at that time. Report the price and post id.",
expected_output="Price, post id and status.",
agent=social,
)
Crew(agents=[social], tasks=[task]).kickoff()
Tools
| Tool | What it does | Spends credit? |
|---|---|---|
quote_post |
Exact price for a time and number of channels (or a network mix), plus cheaper nearby times. Returns a quote_id. |
No |
publish_post |
Schedules a post to channel ids from list_channels. Needs a quote_id from quote_post or an idempotency_key. |
Yes, at the quoted price |
list_channels |
Channels this key can post to (connected accounts and sandbox test channels). | No |
get_balance |
Prepaid credit (credit_usd), plan and sandbox allowance. |
No |
get_post_status |
Status, price and per-channel delivery state of a post. | No |
surgemesh_tools() returns all five sharing one client, so publish_post can use a quote_id from quote_post. The classes (SurgemeshQuotePostTool, SurgemeshPublishPostTool, SurgemeshListChannelsTool, SurgemeshGetBalanceTool, SurgemeshGetPostStatusTool) can also be used one at a time.
Safety rules built in
- Nothing posts on its own. The tools act only when an agent calls them.
- Quote first.
publish_postrefuses to run without aquote_idor an explicitidempotency_key. With aquote_id, the quoted price becomes the price cap (max_price_usd), so the post is refused rather than charged more. - Exactly once. Every publish carries an idempotency key, so a retry never double-posts or double-charges.
- Clear credit errors. If the account lacks prepaid credit, the tool returns a plain message (nothing scheduled or charged) pointing to cheaper times or adding credit.
For a human sign-off before publishing, give the publishing task human_input=True.
Configuration
| Setting | Default |
|---|---|
api_key / SURGEMESH_API_KEY |
required for everything except quote_post |
base_url / SURGEMESH_BASE_URL |
https://api.surgemesh.com |
tools = surgemesh_tools(api_key="sm_...", base_url="https://api.surgemesh.com")
Zero-code alternative: the Surgemesh MCP server
Surgemesh is also a remote MCP server (com.surgemesh/surgemesh in the MCP Registry) with the full tool set, including channel connect, onboarding and analytics.
With CrewAI's built-in MCP support:
import os
from crewai import Agent
from crewai.mcp import MCPServerHTTP
agent = Agent(
role="Social media manager",
goal="Schedule approved posts",
backstory="...",
mcps=[MCPServerHTTP(
url="https://api.surgemesh.com/mcp",
headers={"Authorization": f"Bearer {os.environ['SURGEMESH_API_KEY']}"},
)],
)
Or with MCPServerAdapter from crewai-tools[mcp]:
import os
from crewai_tools import MCPServerAdapter
params = {
"url": "https://api.surgemesh.com/mcp",
"transport": "streamable-http",
"headers": {"Authorization": f"Bearer {os.environ['SURGEMESH_API_KEY']}"},
}
with MCPServerAdapter(params) as tools:
agent = Agent(role="...", goal="...", backstory="...", tools=tools)
Links
- Website: https://surgemesh.com
- API reference (OpenAPI): https://api.surgemesh.com/openapi.json
- Agent guide: https://surgemesh.com/agents
- Terms: https://surgemesh.com/terms · Privacy: https://surgemesh.com/privacy
License
Apache License 2.0. Copyright 2026 Novus Index, LLC. See LICENSE and NOTICE. "Surgemesh" is a trademark of Novus Index, LLC; the license grants no trademark rights (see TRADEMARKS.md in the repository root). Contact: dev@surgemesh.com
Metadata
Release files for crewai-surgemesh 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| crewai_surgemesh-0.1.0.tar.gz | 12.5 kB | With provenance | Details for crewai_surgemesh-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| crewai_surgemesh-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for crewai_surgemesh-0.1.0-py3-none-any.whl |
Total release size: 25.3 kB
Release files / crewai_surgemesh-0.1.0.tar.gz
| Download URL | crewai_surgemesh-0.1.0.tar.gz |
|---|---|
| Size | 12.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff7d7b40c0257d407a724fc175a588368f109d3779b3bbdd03e0ffe70ad9f714
|
|
BLAKE2b-256 checksum How to use checksums |
9d724fa848605fab44da615f02345adb68add866c754024fccbd6ff71155e565
|
| 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 Oct 31, 2026.
Transparency logRelease files / crewai_surgemesh-0.1.0-py3-none-any.whl
| Download URL | crewai_surgemesh-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ac71827206d50abc10e1e0af422225e8be97e663276432b3bcf9026e53421b4
|
|
BLAKE2b-256 checksum How to use checksums |
645bc12a57160f73d84ce79282994b698c15870e1d3780943b5e115d88427747
|
| 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 Oct 31, 2026.
Transparency logSecurity for crewai-surgemesh 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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for crewai_surgemesh-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 Oct 31, 2026.
Transparency logA 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.