CrewAI + Grantex

Authorization for CrewAI Agents

Add scoped, revocable permissions at configured CrewAI tool boundaries. Each wrapped crew member presents a role-scoped grant that the receiving service verifies.

The Problem

Without Grantex

Your CrewAI agents share the same API keys. If one crew member is compromised, the entire crew's access is exposed. No way to scope or revoke individual agent access.

With Grantex

Each configured crew member can present its own scoped JWT. Wrapped tools enforce the required role scope; unwrapped tools and services remain outside this integration.

How Grantex Works with CrewAI

Install the integration

pip install grantex-crewai — Python-native integration for CrewAI crews.

Register each crew member

Create agent identities with role-specific scopes for each crew member.

Authorize the crew

Obtain role-scoped grants through the configured authorization flow for each crew member.

Crew operates with scoped tokens

Each configured crew member presents its own JWT at wrapped tool or service boundaries. Other crew tools are unaffected until they are integrated.

Monitor & control

Attach the audit wrapper to selected tools when action records are required, and manage individual member grants centrally.

Quick Start

pip install grantex-crewai grantex
from grantex_crewai import create_grantex_tool

research_tool = create_grantex_tool(
    name='research',
    description='Search approved research sources',
    grant_token=researcher_token,
    required_scope='search:read',
    func=search_tool,
)

write_tool = create_grantex_tool(
    name='write_draft',
    description='Write a document draft',
    grant_token=writer_token,
    required_scope='docs:write',
    func=save_draft,
)

Why Grantex for CrewAI

Per-Agent Scoping

Assign narrow role scopes to each configured crew member, then enforce those scopes at every protected tool or service boundary.

Role-Based Access

Map CrewAI roles to Grantex scopes. Define authorization policies per role, not per API key.

Crew-Wide Audit Trail

Use the audit wrapper to record crew tool calls with their grant and agent identifiers.

Delegation Chains

A lead agent can delegate narrower permissions to sub-agents. Central grant state can cascade a parent revocation to child grants; local verifiers still need current state.

Python Native

Python adapter for the documented CrewAI tool interface. Validate the CrewAI and adapter versions together before deployment.

Central Revocation

Revoke a crew member's grant centrally; each enforcement point must receive current grant state.

Verification, revocation, and audit boundary

This integration enforces authorization only where its wrapper or middleware is installed. Local JWT verification checks signatures and claims after JWKS retrieval; it does not prove current revocation unless the verifier performs an online state check or synchronizes revocation data.

Token verification does not create a consent record or prove that a tool executed. Use the configured authorization flow for grant decisions and add an audit integration at the execution boundary when action records are required.

Ready to secure your CrewAI agents?

Follow the integration guide and verify the package version before deployment. Apache 2.0.