CrewAI
Trace crew lifecycle, agent steps, and task completions from CrewAI.
Installation
Section titled “Installation”pip install "axonpush[crewai]"import osfrom axonpush import AxonPushfrom axonpush.integrations.crewai import AxonPushCrewCallbacks
client = AxonPush( api_key=os.environ["AXONPUSH_API_KEY"], tenant_id=os.environ["AXONPUSH_TENANT_ID"], base_url=os.environ.get("AXONPUSH_BASE_URL", "https://api.axonpush.xyz"),)
callbacks = AxonPushCrewCallbacks( client=client, channel_id=1, agent_id="crewai",)Wire callbacks into Crew() and bracket execution:
from crewai import Crew
callbacks.on_crew_start()
crew = Crew( agents=[...], tasks=[...], step_callback=callbacks.on_step, task_callback=callbacks.on_task_complete,)result = crew.kickoff()
callbacks.on_crew_end(result)Events Traced
Section titled “Events Traced”| Event | When |
|---|---|
crew.start | Crew begins execution |
crew.end | Crew completes |
agent.step | An agent takes a step |
tool.*.start | Tool execution begins |
tool.*.end | Tool execution completes |
task.complete | A task finishes |