Skip to main content

pushary-crewai

Phone approvals for CrewAI agents. Your agent asks, your user taps Approve or Deny.

Full walkthrough: Human-in-the-loop for CrewAI

CI PyPI license

What you need

What your customer gets

  1. They open your connect link once. It shows your product's name and logo and connects their phone.
  2. When your crew calls the ask tool, a push notification titled with your product name arrives, such as Acme needs your approval.
  3. They approve or decline, pick an option or type an answer. A decline, an expired question or no answer tells the agent not to proceed.

Pushary hosts the phone delivery, the decision record and the audit log. CrewAI keeps the crew and any saved Flow. Your app keeps its own sign-in, the customer ID and the action itself.

Quick start

pip install pushary-crewai
export PUSHARY_API_KEY=pk_xxx.sk_xxx
from crewai import Agent, Task, Crew
from pushary_crewai import connect, make_ask_human_tool

link = connect("user_123")  # once per user: show them this link

agent = Agent(
    role="Ops",
    goal="Ship safely",
    backstory="Careful operator.",
    tools=[make_ask_human_tool("user_123")],
)
task = Task(
    description="Draft the release. Before finalizing, call ask_human to get approval.",
    expected_output="approved release notes",
    agent=agent,
)
Crew(agents=[agent], tasks=[task]).kickoff()

This replaces the console human_input=True prompt. The tool waits until the person answers on their phone. A no, or no answer, tells the agent not to proceed. The external_id is bound when you build the tool, never taken from the model, so a prompt-injected agent cannot ask the wrong person.

CrewAI's own docs on this: Human feedback in Flows.

Lower-level helpers

from pushary_crewai import ask_human

d = ask_human("Approve this refund?", external_id="user_123", type="confirm")
if d["approved"]:
    issue_refund()

API

  • connect(external_id, *, api_key=None, base_url=None): enroll an end-user's phone.
  • make_ask_human_tool(external_id, *, name=..., ...): a CrewAI BaseTool bound to that user.
  • ask_human(question, *, external_id, type="confirm", ...): blocking, returns the decision dict.
  • resolve_pushary_callback(raw_body, signature, secret): verify + parse a callback for a durable path.
  • describe_answer(type, result), is_affirmative(answer), deterministic_key(parts), SIGNATURE_HEADER.

Example

The basic example gives an agent a blocking ask-human tool.

The Flow example uses CrewAI's native @human_feedback(provider=...) path. It creates a Pushary decision, saves the pending Flow, and exits. A later command reads the decision from Pushary and resumes the same Flow. No model key or open worker is needed. Tested with crewai==1.15.22 and pushary==2.1.1.

python -m pip install -e . 'crewai==1.15.22'
export PUSHARY_API_KEY='your Partner server key'
export PUSHARY_EXTERNAL_ID='your enrolled customer ID'
export CREWAI_STORAGE_DIR="$(mktemp -d)"
python examples/flow_feedback.py start 'Send the release note'
# Answer on the connected phone. Copy flow_id and decision_id from the output.
python examples/flow_feedback.py resume FLOW_ID DECISION_ID \
  --database "$CREWAI_STORAGE_DIR/resumes.sqlite"

Keep CREWAI_STORAGE_DIR and the resume database across processes. A pending decision returns pending; a decline or expiry returns approved: false. The example checks the decision ID, exact question, Flow, and recipient before resuming. Its SQLite claim prevents two local workers from resuming the same Flow concurrently; a failed or interrupted resume stays claimed for manual inspection. Use shared transactional storage across hosts.

The Flow only returns the review result. If you attach a business action, bind its exact arguments and recipient in your application, and make the action idempotent. Do not treat a model's approval claim or a direct call to flow.resume() as authorization.

License

MIT

Metadata

Release files for pushary-crewai 0.3.2

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

Source distribution (sdist)

Source distribution for pushary-crewai 0.3.2
File Size Uploaded Provenance Actions
pushary_crewai-0.3.2.tar.gz 9.9 kB With provenance Details for pushary_crewai-0.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pushary-crewai 0.3.2
File Interpreter ABI Platform Actions
pushary_crewai-0.3.2-py3-none-any.whl Python 3 none any Details for pushary_crewai-0.3.2-py3-none-any.whl

Total release size: 16.2 kB

Release files / pushary_crewai-0.3.2.tar.gz

Download URL pushary_crewai-0.3.2.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
33c5354849fefa42f6d1713ace63ad7463ba8e4426b96c0ba0380bfccd98b030
BLAKE2b-256 checksum
How to use checksums
947a8089a8aec5fd03e9b0040d7d71890244ef30757885b6e7974b4cdcf9c86c
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 22, 2026.

Transparency log

Release files / pushary_crewai-0.3.2-py3-none-any.whl

Download URL pushary_crewai-0.3.2-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef13de43c295dca75c45779c3debed4fbe7eef61521688b01060a7d35ca90fb5
BLAKE2b-256 checksum
How to use checksums
8e5d4f9698ebbf9766d0bceb88c879b30df686616ea8274624c6b7475dd46f91
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 22, 2026.

Transparency log

Security for pushary-crewai 0.3.2

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 pushary_crewai-0.3.2.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 22, 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.

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