Skip to Content
AgentShield

Installation

Install the AgentShield services, the Python and TypeScript SDKs, and the framework integrations.

AgentShield has two halves: the services you run (gateway, control plane, dashboard, intelligence engine, event relay) and the clients your agents use (SDKs and framework integrations). This page covers both.

Requirements

ToolVersionNeeded for
Docker with Compose v2CurrentData services, and the full stack in containers
Go1.23 or newerRunning the gateway and event relay from source
Node.js22 or newer (.nvmrc)Control plane, dashboard, TypeScript SDK
Python3.11 or newerIntelligence engine, Python SDK, integrations
kubectlWith built-in KustomizeKubernetes deployment

Services

The fastest path. Every image runs as a non-root user on a read-only filesystem with all capabilities dropped.

docker compose --profile app up -d --build
docker compose --profile app run --rm control-plane node apps/control-plane/dist/bootstrap.js

docker compose up -d without a profile starts only PostgreSQL, Redis, NATS, MinIO, and Mailpit, for running the applications from source. See Docker Compose.

Python SDK

The Python SDK lives in sdk/python as the agentshield-sdk distribution. Its only dependency is cryptography.

python -m pip install ./sdk/python
from agentshield_sdk import Client, public_key

Alternatively, put the source directory on PYTHONPATH, which is how the repository's own tests and examples run:

python -m pip install "cryptography>=43,<47"
export PYTHONPATH=sdk/python

Framework integrations

Each integration is its own pip package that depends on agentshield-sdk and on its framework. Install the SDK and the integration from the repository in one command, so pip resolves the SDK dependency locally:

IntegrationInstallPulls in
LangGraph nodepython -m pip install ./sdk/python ./integrations/langgraphNothing else. Works with any LangGraph state that has messages
LangChain toolspython -m pip install ./sdk/python ./integrations/langchainlangchain-core 0.3 or newer
CrewAI toolspython -m pip install ./sdk/python ./integrations/crewaicrewai 0.100 or newer
MCP serverpython -m pip install ./sdk/python ./integrations/mcpNothing else. Adds the agentshield-mcp command

The repository's tests still run from source with PYTHONPATH pointing at sdk/python and the integration directories; both ways load the same code.

TypeScript SDK

Build a package tarball from the repository and install it into your project:

# in the AgentShield repository
npm ci
npm pack --workspace @agentshield/sdk     # builds dist/ and writes agentshield-sdk-0.1.0.tgz

# in your project
npm install /path/to/agentshield-sdk-0.1.0.tgz
import { Client } from "@agentshield/sdk";

The package is ESM with type declarations, uses only node:crypto and the global fetch, and has no runtime dependencies. It works with plain node and any TypeScript setup using "moduleResolution": "NodeNext" or "Bundler". Inside the repository, workspaces can depend on it directly after npm run build --workspace @agentshield/sdk.

Node.js 22 or newer

The client relies on the global fetch and on Ed25519 support in node:crypto. Both are available in every supported Node.js release.

Verify the installation

curl -s http://127.0.0.1:8081/health/ready    # gateway: PostgreSQL and Redis answer
curl -s http://127.0.0.1:8080/health/ready    # control plane: PostgreSQL answers
curl -s http://127.0.0.1:8082/health/ready    # intelligence: ruleset loaded
curl -s http://127.0.0.1:8083/health/ready    # event relay: database, NATS, outbox age

Each returns HTTP 200 when ready and 503 otherwise. A gateway whose readiness is 503 does not return allow.

Was this page helpful?

On this page