Framework guide
Add Quasentra to CrewAI.
Build the normal CrewAI Agent first, then pass that same agent through security.crewai() before adding it to a Crew.
Complete once before this pageInstall the matching package, create your API key and create the shared security = Quasentra(...) object.Shared setup →
python -m pip install "quasentra[crewai]"
1. Create your tools normally
from crewai.tools import tool
@tool("customer_lookup")
def customer_lookup(customer_id: str) -> str:
"""Read one customer record."""
return company_database[customer_id]
@tool("customer_delete")
def customer_delete(customer_id: str) -> str:
"""Permanently delete one customer."""
del company_database[customer_id]
return "deleted"
These are ordinary CrewAI tools. Keep your real validation and business logic inside them.
2. Add the Quasentra adapter
agent = Agent(
role="Customer Support",
goal="Resolve customer requests safely",
tools=[customer_lookup, customer_delete],
)
agent = security.crewai(
agent_id="support-agent",
agent=agent,
permissions={
"customer.lookup": "ALLOW",
"customer.delete": "DENY",
},
)
This is the only framework-specific part. Registration, discovery, permission sync and runtime decisions happen automatically.
3. Replace the example values
| Example | Replace it with |
|---|---|
| support-agent | Your stable agent ID. Also allow this ID on its Quasentra API key. |
| Customer Support Agent | A readable dashboard name for the business role. |
| tools | The actual tools already used by this agent. |
| permissions | Your ALLOW, REQUIRE_APPROVAL and DENY choices for those tool actions. |
4. Check that it works
- Start the application once.
- Open Dashboard → Agents and confirm the agent and tools appear.
- Open Access Control and confirm every action has the expected permission.
- Run one allowed request and one denied request using test data.
- Confirm the denied function did not execute and the reason appears in Decisions.
Security boundary
The adapter intercepts local CrewAI BaseTool objects. External execution paths require gateway enforcement.
Do not give the model a second unprotected path to the same function or credential. For payments, production databases and other high-impact systems, review the Trusted Gateway after the basic integration works.