← Back to docs
CrewAI
CrewAI orchestrates multiple AI agents working together. With Astapa, your crew can safely access and modify database records while maintaining full auditability and human oversight.
Features
- Native CrewAI tool integration
- Multi-agent session isolation
- Collaborative approval workflows
- Role-based access patterns
- Conflict detection across agents
Quick Start
example.py
from crewai import Agent, Task, Crew
from astapa import AstapaTool
# Create Astapa tool for CrewAI
db_tool = AstapaTool(
api_url="http://localhost:8080",
mode="agentic" # Require human approval
)
# Create agent with database access
analyst = Agent(
role="Data Analyst",
goal="Analyze and update customer records",
tools=[db_tool]
)
# Define task
task = Task(
description="Update subscription status for churned users",
agent=analyst
)
# Run crew - mutations staged for review
crew = Crew(agents=[analyst], tasks=[task])
crew.kickoff()