SecureVector SDK for CrewAI
Bring the SecureVector local threat monitor's three controls — tool-call permissions, secret / data-leak detection, and threat detection — to every CrewAI tool call, with tamper-evident audit logging.
pip install securevector-sdk-crewai
📦 One install — batteries included.
pip install securevector-sdk-crewaialso installs the local SecureVector app (securevector-ai-monitor): the adapter and the detection engine + tamper-evident audit chain arrive in a singlepip install. The SDK is a thin interception layer — the app must be running locally (securevector-app --web) for it to do anything.
🌐 Pointing at your own cloud? Use the lightweight install. If you've deployed SecureVector to your own cloud, you don't need the bundled local app. Install only the adapter on the machine where your agents run, and point it at your deployment:
# lightweight — adapter only, no local app (your env already has crewai) pip install securevector-sdk-crewai --no-deps # point at your SecureVector endpoint — all you need for a private (in-VPC) endpoint export SECUREVECTOR_SDK_APP_URL=https://<your-securevector-endpoint> # OPTIONAL: only if your endpoint is publicly exposed and gated with an inbound token. # A private endpoint in your own VPC needs no key. To gate a public one, use a free # SecureVector cloud account API key or an SVET token — it gates access only; no agent # data is sent to SecureVector. export SECUREVECTOR_API_KEY=<SecureVector account key or SVET token>The adapter then forwards every tool call to your remote deployment instead of a local app. The default
pip install securevector-sdk-crewai(no--no-deps) still bundles the app for local use.
Quick start
Wrap your tools (recommended — robust across CrewAI versions):
from securevector_sdk_crewai import secure_tools
agent = Agent(tools=secure_tools(my_tools), ...)
or install globally (best-effort monkeypatch of CrewAI's BaseTool):
from securevector_sdk_crewai import install
install(mode="observe")
or fully zero-config:
import securevector_sdk_crewai.auto # reads env, installs globally
LLM cost tracking — install() / .auto also patch Crew.kickoff so every
run's token usage (prompt / completion / cached) posts to the app's Cost
Tracking, where the pricing table turns it into real dollars (your crew runs
on your own API keys) and per-agent budgets apply. If you only wrap tools with
secure_tools(), post usage explicitly after a run:
from securevector_sdk_crewai import track_crew_usage
result = crew.kickoff()
track_crew_usage(crew, agent_id="research-crew") # agent_id optional
Records are attributed to agent_id="crewai-agent" by default — override via
track_crew_usage(crew, agent_id=...) or SECUREVECTOR_SDK_AGENT_ID. Cost
capture is best-effort: an unreachable app never breaks the crew.
What happens on every tool call
Before a tool runs, the SDK:
- (a) Permissions — resolves an allow/block verdict for the tool, using the app's own precedence: cloud-pushed synced policy → local override → essential registry → default-allow.
- (b)+(c) Secret & threat scan — sends the serialized tool input through the
app's
/analyzepipeline.
After the tool returns, the result is scanned the same way to catch secrets /
exfiltration in tool output. Every decision is written to the app's audit chain
tagged runtime_kind="crewai".
observe vs enforce
| local app reachable | local app unreachable | |
|---|---|---|
| observe (default) | log + advisory verdict; tool always runs | tool runs (fail-open) |
| enforce (opt-in) | tool runs only if the verdict ≠ block | tool denied (fail-closed) |
install(mode="enforce") # blocks denied tools and fails closed if the app is down
In enforce mode a denied tool raises ToolBlocked before it executes; enforce
also prints a one-time disclosure to stderr.
Configuration
All optional, via env or kwargs:
| Env var | Default | Meaning |
|---|---|---|
SECUREVECTOR_SDK_APP_URL |
http://127.0.0.1:8741 |
local app base URL |
SECUREVECTOR_SDK_MODE |
observe |
observe or enforce |
SECUREVECTOR_SDK_TIMEOUT_MS |
3000 |
per-call verdict timeout |
SECUREVECTOR_SDK_RISK_THRESHOLD |
70 |
risk score that blocks in enforce mode |
SECUREVECTOR_SDK_AGENT_ID |
crewai-agent |
agent id shown in Cost Tracking |
SECUREVECTOR_SDK_DISABLED |
(unset) | set truthy to no-op |
Compliance
The tool-call-level, attributed, tamper-evident audit trail this produces is exactly the action-layer logging auditors ask for under EU AI Act Art. 12 / 15. This SDK produces the local evidence; the cloud governance surface turns it into an auditor-ready pack.
Trademarks
SecureVector is the product name of this SDK. CrewAI is a trademark of CrewAI, Inc. This is an independent, community SDK that integrates with CrewAI via its public tool API. It is not affiliated with, sponsored by, or endorsed by CrewAI, Inc. The name uses "crewai" only descriptively, to identify the framework this package works with (nominative fair use).
License
Metadata
Release files for securevector-sdk-crewai 1.2.2
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 | |
|---|---|---|---|---|
| securevector_sdk_crewai-1.2.2.tar.gz | 31.8 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| securevector_sdk_crewai-1.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 59.6 kB
Release files / securevector_sdk_crewai-1.2.2.tar.gz
| Download URL | securevector_sdk_crewai-1.2.2.tar.gz |
|---|---|
| Size | 31.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b99355dc370b1493b312dfa1c73c6c9d61b8fcc984555cff69fbb7eb8a7ebe82
|
|
BLAKE2b-256 checksum How to use checksums |
99df1102c6811fa418c57032db65991a0f90509ea62cd767a498343fb2060368
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Jul 8, 2026.
Transparency logRelease files / securevector_sdk_crewai-1.2.2-py3-none-any.whl
| Download URL | securevector_sdk_crewai-1.2.2-py3-none-any.whl |
|---|---|
| Size | 27.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b56311f46fefb8715a51bf8f18c5c522901a4f286e8bb7c3749c1a65b8141356
|
|
BLAKE2b-256 checksum How to use checksums |
d3ae301aa3f8e23dcc813ca90067dae287b56ff55d9f53b46812a19a1c0519fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Jul 8, 2026.
Transparency logSecurity for securevector-sdk-crewai 1.2.2
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 securevector_sdk_crewai-1.2.2.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 Jul 8, 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.