Integration

GenZAgents for CrewAI — verified receipts for multi-agent crews

CrewAI orchestrates multiple agents collaborating on a task. @genzagentsio/crewai captures the whole crew as one signed receipt with per-agent sub-events — so audit trails keep up with multi-agent complexity.

Multi-agent crews need multi-event receipts

A CrewAI crew has 3-5 agents collaborating. A single flat receipt loses the "who did what" structure. Our wrapper produces one parent receipt per kickoff + one sub-event per agent task. The receipt JSON includes a structured `extensions.crewai_agents` field listing each agent's role, the tools they called, the output they produced. The dashboard renders this as a per-agent timeline — much more useful than one giant blob.

Per-agent cost rollup

Each agent in a crew may use a different model. The receipt logs per-agent cost: "Researcher used Claude $0.18, Analyst used GPT-5 $0.22, Writer used Gemini $0.06". Crews can be optimised: swap the Writer's model for a cheaper one if quality holds. The data lives in the receipt; you don't have to instrument it separately.

Long-running crew runs

CrewAI runs commonly take 60+ seconds across many tool calls. The wrapper streams events to api.genzagents.com as the crew runs (not just at the end) — so if the crew crashes at step 8 of 10, you still have a receipt showing steps 1-7. This is the difference between a useful audit trail and one that vanishes on failure.

Cross-crew handoff

Crews can spawn sub-crews. The wrapper captures parent-child crew relationships: the receipt for sub-crew B includes parent_run_id pointing at crew A. Long composite workflows ("research crew → analyst crew → writer crew") are auditable as a single tree even though they're three separate Crew.kickoff calls.

Process modes — sequential vs hierarchical

CrewAI supports two process modes: sequential (agents in order) and hierarchical (manager + workers). The wrapper detects which mode the crew is using and tags receipts accordingly. Your dashboard filter "show me hierarchical-mode crew runs" surfaces the manager-pattern work for the orgs that prefer that style.

Server-side deployment

Same as LangChain: ship the wrapped crew behind an API, pass the per-user humanId via the wrapper config, every end-user's usage shows up as their own receipts. Use this pattern for SaaS that exposes CrewAI to end-users.

Install

$ npm install @genzagentsio/crewai

import { wrapCrew } from "@genzagentsio/crewai"
const crew = wrapCrew(rawCrew, {
  agentDid: "did:genz:...",
  apiKey: process.env.GENZAGENTS_API_KEY,
})
await crew.kickoff(inputs)

What we capture

Every Crew.kickoff: per-agent task assignments, tool calls, intermediate outputs, final result.

Verify it works

Run wrapped crew → one parent receipt per kickoff, one sub-event per agent task on /dashboard.

Common questions

Does the wrapper handle CrewAI Flows (the new flow-based API)?

Yes — `wrapFlow(flow)` captures Flow runs the same way. Sub-events for each step, parent receipt for the overall Flow.

What about CrewAI's memory / knowledge bases?

Memory queries and knowledge-base hits are captured as `extensions.crewai_memory_hits` on each receipt — useful for auditing what the crew remembered or didn't.

Can I redact specific agent outputs from receipts?

Yes — pass `redactAgentOutputs: ["WriterAgent"]` into the wrapper config. The named agent's outputs are digest-only on the receipt.

Does the Python crew SDK work the same way?

Yes — `genzagents.crewai` on PyPI has the same `wrap_crew` API. Same receipt shape, same dashboard rendering.

Related

Get the trust layer for your AI work

GenZAgents is the verified work-history layer above every AI provider your team uses. Sign cryptographic receipts, hand off conversations across Claude / ChatGPT / Cursor / Gemini, keep institutional AI knowledge when employees leave.

Last reviewed · 2 min read· Open spec· Changelog