CrewAI Integration
Attach a task callback or crew-level step callback. Every task output and agent step is hashed client-side and logged to Sigmodx.
Install
pip install "sigmodx-integrations[crewai]"Requires sigmodx ≥ 0.5.0 for trade and forecast scenario helpers.
Task callback
Use SigmodxTaskCallback on individual tasks when you want to log the final task output.
pip install sigmodx sigmodx-integrations[crewai]
from crewai import Crew, Task
from sigmodx import SigmodxClient
from sigmodx_integrations.crewai import (
SigmodxTaskCallback,
CREWAI_ANOMALY_CONFIG,
)
client = SigmodxClient(
api_key="your-api-key",
agent_id="your-agent-uuid",
)
task = Task(
description="Analyze transaction TXN-2026-4421 for anomalies",
agent=analyst_agent,
expected_output="Decision: flag/clear/escalate with rationale",
callback=SigmodxTaskCallback(
client=client,
config=CREWAI_ANOMALY_CONFIG,
task_inputs={"txn_ref": "TXN-2026-4421"},
),
)Crew step callback
Use SigmodxStepCallback at the crew level to log every agent step. Tool names are filtered via preset configs.
from sigmodx_integrations.crewai import (
SigmodxStepCallback,
CREWAI_TRADE_CONFIG,
)
step_callback = SigmodxStepCallback(
client=client,
config=CREWAI_TRADE_CONFIG,
)
crew = Crew(
agents=[risk_agent, execution_agent],
tasks=[pre_trade_task, order_task],
step_callback=step_callback,
)Preset configs: CREWAI_INVOICE_CONFIG, CREWAI_GL_CONFIG, CREWAI_ANOMALY_CONFIG, CREWAI_TRADE_CONFIG, CREWAI_FORECAST_CONFIG.
Full documentation
Custom scenario mapping, LangChain and LangGraph handlers, and the universal adapter are documented in the repository README.
github.com/Sigmodx/integrations-python →