crewai - 💡(How to fix) Fix [FEATURE] Cryptographic identity and kill switch for multi-agent crews in production [2 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
crewAIInc/crewAI#5082Fetched 2026-04-08 01:35:22
View on GitHub
Comments
2
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
commented ×1labeled ×1

Code Example

from aip_protocol import AgentPassport, RevocationStore

analyst = AgentPassport.create(
    domain="acme-capital.com", agent_name="analyst-bot",
    allowed_actions=["research", "analyze"],
    denied_actions=["trade", "delete_records"],
    monetary_limit_per_txn=0,
)

trader = AgentPassport.create(
    domain="acme-capital.com", agent_name="trading-bot",
    allowed_actions=["trade", "analyze"],
    denied_actions=["delete_records"],
    monetary_limit_per_txn=10000,
)

# Kill only the rogue trader — analyst keeps working
store = RevocationStore()
store.revoke(agent_id=trader.agent_id, reason="anomalous_trading_pattern")
RAW_BUFFERClick to expand / collapse

Feature Area

Agent capabilities

Is your feature request related to a an existing bug? Please link it here.

NA — this is a new feature request for production agent security.

Describe the solution you'd like

Cryptographic identity and per-agent kill switch for multi-agent crews.

When deploying CrewAI crews in production, each agent should have:

  1. Cryptographic identity — Ed25519 keypair per agent, so every action is mathematically provable
  2. Per-agent boundaries — AnalystAgent can research but CANNOT trade. TradingAgent can trade up to $10K but CANNOT delete records. Enforced at the protocol level, not the prompt level.
  3. Selective kill switch — Revoke ONE compromised agent without shutting down the entire crew

An open-source protocol called AIP (Agent Identity Protocol) that provides this. Working CrewAI demo:

from aip_protocol import AgentPassport, RevocationStore

analyst = AgentPassport.create(
    domain="acme-capital.com", agent_name="analyst-bot",
    allowed_actions=["research", "analyze"],
    denied_actions=["trade", "delete_records"],
    monetary_limit_per_txn=0,
)

trader = AgentPassport.create(
    domain="acme-capital.com", agent_name="trading-bot",
    allowed_actions=["trade", "analyze"],
    denied_actions=["delete_records"],
    monetary_limit_per_txn=10000,
)

# Kill only the rogue trader — analyst keeps working
store = RevocationStore()
store.revoke(agent_id=trader.agent_id, reason="anomalous_trading_pattern")

Describe alternatives you've considered

  • Prompt-level guardrails — Telling agents "don't do X" in system prompts. Easily bypassed by prompt injection.
  • API key scoping — Limits API access but doesn't verify which agent in a crew is making the call or enforce monetary limits.
  • LLM-as-judge — Using a second LLM to validate actions. Adds ~500ms latency and is probabilistic, not deterministic.

AIP is deterministic, sub-millisecond, and operates outside the LLM context — it cannot be bypassed by prompt engineering.

Additional context

Willingness to Contribute

Yes, I'd be happy to submit a pull request

extent analysis

Fix Plan

To implement the requested feature, we will integrate the Agent Identity Protocol (AIP) into the production agent security system. Here are the steps:

  • Install the AIP protocol library: pip install aip-protocol
  • Create an AgentPassport for each agent in the crew, specifying the allowed and denied actions, as well as the monetary limit per transaction
  • Use the RevocationStore to revoke the identity of a compromised agent

Example Code

from aip_protocol import AgentPassport, RevocationStore

# Create agent passports
analyst = AgentPassport.create(
    domain="acme-capital.com", 
    agent_name="analyst-bot",
    allowed_actions=["research", "analyze"],
    denied_actions=["trade", "delete_records"],
    monetary_limit_per_txn=0,
)

trader = AgentPassport.create(
    domain="acme-capital.com", 
    agent_name="trading-bot",
    allowed_actions=["trade", "analyze"],
    denied_actions=["delete_records"],
    monetary_limit_per_txn=10000,
)

# Revoke a compromised agent
store = RevocationStore()
store.revoke(agent_id=trader.agent_id, reason="anomalous_trading_pattern")

Verification

To verify that the fix worked, test the following scenarios:

  • Create a crew with multiple agents, each with their own AgentPassport
  • Attempt to perform an action that is allowed for an agent, and verify that it succeeds
  • Attempt to perform an action that is denied for an agent, and verify that it fails
  • Revoke the identity of a compromised agent, and verify that it can no longer perform any actions

Extra Tips

  • Make sure to handle errors and exceptions properly when creating and revoking agent passports
  • Consider implementing additional logging and monitoring to detect and respond to potential security incidents
  • Review the AIP protocol documentation and demos to ensure proper integration and usage.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING