colber-crewai
CrewAI integration for the Colber platform — step / task observability callbacks, long-term semantic memory backed by colber-memory, and a 5-service toolkit. Apache-2.0.
This is the second framework plugin in the "Lego" GTM lever (after langchain-colber). It depends only on crewai>=0.80 and the published colber-sdk PyPI release, so it stays lightweight and is independently versionable.
Install
pip install colber-crewai
For local development inside the Colber monorepo:
pip install -e apps/colber-crewai
Components
ColberStepCallback + ColberTaskCallback
Captures CrewAI step and task events as Colber observability spans + structured logs. CrewAI exposes two hook points (plain callables, not a BaseCallbackHandler like LangChain):
step_callback: invoked after each agent step (LLM call OR tool call).task_callback: invoked after each task completes.
Wire them on either an Agent or a Crew:
from crewai import Agent, Task, Crew
from colber_crewai import ColberStepCallback, ColberTaskCallback
step_cb = ColberStepCallback(
agent_did="did:key:z6Mk...",
operator_id="op-demo",
service_name="my-crewai-agent",
)
task_cb = ColberTaskCallback(
agent_did="did:key:z6Mk...",
operator_id="op-demo",
service_name="my-crewai-agent",
)
agent = Agent(
role="Researcher",
goal="...",
backstory="...",
step_callback=step_cb,
)
task = Task(description="...", agent=agent, callback=task_cb)
crew = Crew(agents=[agent], tasks=[task])
result = crew.kickoff()
Each invocation emits one span (/v1/observability/traces) with traceId, spanId, name, durationMs, status, and a small attributes dict. Errors additionally emit a structured log event (/v1/observability/logs) at level=error.
Network failures to the observability backend are caught, logged at WARNING, and swallowed — the crew is never aborted because telemetry is sick. Both callbacks are thread-safe (CrewAI may run agents concurrently).
ColberLongTermMemory
Backs CrewAI's LongTermMemory with the colber-memory service (Qdrant + ACL + chiffrement). CrewAI keeps short-term and entity memory native (in-memory / SQLite); we plug Colber on long-term only — the tier where Colber differentiates (cross-agent share, semantic search, encrypted at rest).
from crewai import Agent, Crew
from crewai.memory import EntityMemory, ShortTermMemory
from colber_crewai import ColberLongTermMemory
long_term = ColberLongTermMemory(
agent_did="did:key:z6Mk...",
top_k=5,
share_with=["did:key:z6MkPeer1"],
)
crew = Crew(
agents=[...],
tasks=[...],
memory=True,
long_term_memory=long_term,
)
save(value, metadata) persists the value via colber-memory.store (auto-shared with the configured peer DIDs); search(query, limit) runs a semantic top-K query via colber-memory.query.
ColberToolkit
Exposes 5 Colber services as CrewAI BaseTool instances (one per operation, 14 in total).
from colber_crewai import ColberToolkit
toolkit = ColberToolkit(agent_did="did:key:z6Mk...")
tools = toolkit.get_tools() # list[crewai_tools.BaseTool]
# Plug into any CrewAI agent.
agent = Agent(role="Negotiator", tools=tools, ...)
| Service | Tools |
|---|---|
identity |
colber_identity_register, colber_identity_resolve |
reputation |
colber_reputation_score, colber_reputation_feedback |
memory |
colber_memory_store, colber_memory_query, colber_memory_share |
negotiation |
colber_negotiation_start, colber_negotiation_propose, colber_negotiation_counter, colber_negotiation_settle |
insurance |
colber_insurance_quote, colber_insurance_subscribe, colber_insurance_claim |
Pass services=["negotiation", "insurance"] to scope down the surface for a deal-only agent.
The observability service is not exposed as a tool. Letting an LLM call log_ingest is a footgun (the agent could DoS its own log pipeline). Use ColberStepCallback / ColberTaskCallback for telemetry — they give the agent first-class observability without LLM-driven calls. Passing services=["observability"] raises ValueError with the explicit reason.
Configuration
The plugin reads three environment variables when no explicit ColberClient is passed:
| Env var | Description |
|---|---|
COLBER_BASE_URLS |
JSON object mapping each of the 6 service names to its base URL. Wins if set. |
COLBER_BASE_URL |
Single ingress base URL (e.g. https://api.colber.dev); paths are appended internally per ColberClient.from_base_url. |
COLBER_AUTH_TOKEN |
Optional bearer token forwarded to every Colber service. |
If none are set, the plugin falls back to ColberClient.local() (β-VM ports on localhost).
You can always pass a pre-built client explicitly:
from colber_sdk import ColberClient
from colber_crewai import ColberToolkit
client = ColberClient.from_base_url("https://api.colber.dev", auth_token="...")
toolkit = ColberToolkit(client=client, agent_did="did:key:z6Mk...")
CrewAI version requirement
crewai>=0.80,<1. The 0.80+ line stabilised the public extension points this plugin depends on (step_callback / task_callback plain-callable convention, LongTermMemory save/search storage interface). Older versions ship different signatures.
Out of scope (Wave 2.3+ follow-up)
- CrewAI Flows integration (declarative state machines).
- Custom prompt templates pre-baked with reputation/memory context.
- Attestation flow helpers (auto-sign + verify Colber payloads inside an agent loop).
These are noted as Wave 2.3+ follow-ups in the Colber ROADMAP.
License
Apache-2.0 — same license as colber-sdk, langchain-colber, and @colber/mcp.
Metadata
Release files for colber-crewai 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| colber_crewai-0.1.0.tar.gz | 24.4 kB | With provenance | Details for colber_crewai-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| colber_crewai-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for colber_crewai-0.1.0-py3-none-any.whl |
Total release size: 55.6 kB
Release files / colber_crewai-0.1.0.tar.gz
| Download URL | colber_crewai-0.1.0.tar.gz |
|---|---|
| Size | 24.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8fb772ee349f9ab0686bb2002dd0008f43f14ce8b37a866c84042606d9746dd5
|
|
BLAKE2b-256 checksum How to use checksums |
9ae6d0921e820c9b75412dbe5bca50177281c0fa919ee17f3edd8368c6ca62b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 6, 2026.
Transparency logRelease files / colber_crewai-0.1.0-py3-none-any.whl
| Download URL | colber_crewai-0.1.0-py3-none-any.whl |
|---|---|
| Size | 31.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dfa4c1b21a3fa59def1304ff18b23ab512a2c4680096b9b80bab2bfe8c7d2a7a
|
|
BLAKE2b-256 checksum How to use checksums |
ab46fe886ee44ca9413b67d2977ca5094f2a837e25cc63c3b2370b212b8426c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 6, 2026.
Transparency logSecurity for colber-crewai 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for colber_crewai-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 6, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.