Send one controlled Claw Messenger message from CrewAI and prove the matching reply in the tool
Project description
Claw Messenger for CrewAI
Use this package to send one controlled plain-text message from CrewAI to a registered E.164 phone and prove the same thread works when the matching reply reaches the active tool invocation.
It is intentionally not a persistent inbound listener, webhook server, delivery guarantee, group-messaging tool, or broad CrewAI toolkit. An accepted, delivered, or read outbound status is not proof that the two-way setup works. The controlled reply must reach this tool, or a separately named WebSocket consumer, webhook, or backend, before the setup counts as proven.
Install
Install the public package from PyPI:
python3 -m pip install crewai-claw-messenger
Credentials
Set your API key outside code, notebooks, screenshots, agent traces, and logs:
export CLAW_API_KEY="cm_live_REDACTED"
export CONTROLLED_TEST_PHONE_E164="+14155550101"
For a release proof, use a regenerated key for a test tenant and revoke it when the run is complete.
Quick controlled proof
Prove the tool directly before giving it to an agent:
import os
from crewai_claw_messenger import ClawMessengerTool
tool = ClawMessengerTool()
result = tool.run(
recipient_e164=os.environ["CONTROLLED_TEST_PHONE_E164"],
message="This is my Claw Messenger test. Reply yes.",
timeout_seconds=300,
)
print(result)
The person holding the controlled phone must reply in the same thread while the tool is waiting. Count the run as successful only when the returned JSON includes:
{
"proof_status": "reply_received",
"reply_source": "controlled_recipient"
}
Possible proof states are:
reply_received: the matching reply reached this tool invocation.send_failed: Claw Messenger rejected or failed the outbound request.reply_timeout: no matching reply reached this invocation before its deadline.configuration_error: the key, recipient, message, or timeout was invalid.
In an async host, use await tool.arun(...). The synchronous run path deliberately refuses to nest another event loop.
Minimal crew flow
After the direct proof works, add the same tool to one narrow agent and task:
import os
from crewai import Agent, Crew, Task
from crewai_claw_messenger import ClawMessengerTool
tool = ClawMessengerTool()
agent = Agent(
role="Messaging test agent",
goal="Prove one controlled Claw Messenger thread",
backstory=(
"Only report success when the tool returns proof_status reply_received. "
"Accepted, delivered, or read is not reply proof."
),
tools=[tool],
)
task = Task(
description=(
"Use the Claw Messenger tool to send one test to {controlled_phone}. "
"Wait for the controlled reply and return the sanitized tool result."
),
expected_output="A sanitized proof result or a clear timeout or send failure.",
agent=agent,
)
crew = Crew(agents=[agent], tasks=[task])
print(crew.kickoff(inputs={"controlled_phone": os.environ["CONTROLLED_TEST_PHONE_E164"]}))
Tell the agent to use only a registered recipient the operator controls and to call setup complete only when proof_status is reply_received.
Current scope
- One plain-text outbound message to one registered E.164 recipient.
- Truthful
send.resultstatus fields. - One matching inbound reply observed during the same tool call.
- Sanitized message and chat identifier hints rather than raw identifiers.
The tool stops listening when it returns. Use your own long-running WebSocket consumer, webhook, or backend for persistent inbound handling, and name that observation point before a controlled proof run.
Release verification
Each release must pass the same checks used by the n8n and LangChain packages:
- Keep the package metadata and bundled
LICENSEfile on the approved Apache 2.0 license. - Use package-scoped PyPI publisher access without placing credentials in the repository, examples, agent traces, screenshots, or logs.
- Regenerate a test-tenant API key specifically for this proof. Never reuse a production key.
- Name one controlled registered E.164 phone, a person ready to reply, and the active CrewAI tool invocation as the reply observation point.
- Build, test, check, and install the wheel in a clean virtual environment.
- Send one short plain-text message, then reply once from the controlled phone in the same thread while the tool is waiting.
- Retain only sanitized evidence showing
proof_status: reply_receivedfor the matching thread. Accepted, delivered, or read outbound status alone does not pass this gate. - Revoke the regenerated test key.
- Publish only after explicit approval. Release notes and maintainer contact remain separate decisions.
Claw Messenger documentation: https://clawmessenger.com/docs
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crewai_claw_messenger-0.1.0.tar.gz.
File metadata
- Download URL: crewai_claw_messenger-0.1.0.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
edff3c7302fb62dd0f45fd3dfe1197baab44d39b36f96e8eef8e970ab40a18de
|
|
| MD5 |
b280c78fd7536a1dc45a588b326eebf3
|
|
| BLAKE2b-256 |
dd681401dbe9af5f4f9409f5ad3e0b984efe2f8f723e994aed46b924e2078e3c
|
File details
Details for the file crewai_claw_messenger-0.1.0-py3-none-any.whl.
File metadata
- Download URL: crewai_claw_messenger-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36f2d93c20c7d1cc29a85acaad94aea742338965fa4eb6218dd1424d1c53d74c
|
|
| MD5 |
94f4ba9c8b2040befd62ceb46f1a6df5
|
|
| BLAKE2b-256 |
f1f855f5902d1f516873993fd201e954e2ada9da758a68684fd682cf66af10df
|