Quick Start
Three ways to get AgentSIEM running:
🐳
Docker
docker compose up -d
🐍
Python
pip install agentsiem
📦
Node.js
npx @agentsiem/sdk init
Option 1: Docker (recommended)
bash
git clone https://github.com/theresetlabs/agentsiem
cd agentsiem
cp .env.example .env
docker compose up -d
Option 2: Python SDK
bash
pip install agentsiem
python
from agentsiem import AgentSIEM
siem = AgentSIEM(
endpoint="http://localhost:3520",
api_key="your-api-key",
agent_id="my-agent",
)
siem.prompt("Summarize this document")
result = llm.generate(...)
siem.response(result)
Option 3: Node.js CLI
bash
npx @agentsiem/sdk init
What happens next?
Your agent sends telemetry
Every prompt, response, tool call, and error is logged to AgentSIEM.
Detection engine analyzes
80+ built-in rules + your custom Sigma rules evaluate each event in real time.
Alerts generated
Prompt injection, data exfiltration, tool abuse — flagged and scored by severity.
You respond
Acknowledge, escalate, quarantine, or kill agents directly from the dashboard. Notifications sent to Slack/Discord/Teams.
Docker Deployment
Deploy AgentSIEM in production with a single command.
docker-compose.yml
yaml
version: '3.9'
services:
agentsiem:
build: .
ports:
- "3520:3520"
environment:
- JWT_SECRET=your-secret-here
volumes:
- agentsiem-data:/app/data
restart: unless-stopped
volumes:
agentsiem-data:
Environment Variables
JWT_SECRET — Required. Generate with node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
PORT — Server port (default: 3520)
CORS_ORIGIN — Allowed origins (default: *)
STRIPE_SECRET_KEY — Enable billing (optional)
DASHBOARD_URL — Base URL for notification links
Quick Deploy
bash
cp .env.example .env
nano .env
docker compose up -d
docker compose logs -f
Health Check
bash
curl http://localhost:3520/health
Python SDK
bashpip install agentsiem
OpenAI
python
from agentsiem import AgentSIEM
from openai import OpenAI
client = OpenAI()
siem = AgentSIEM(
endpoint="http://localhost:3520",
api_key="your-api-key",
agent_id="my-agent",
)
client = siem.wrap_openai(client)
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello"}]
)
LangChain
python
from agentsiem import LangChainHandler
from langchain.agents import AgentExecutor
handler = LangChainHandler(
api_key="your-api-key",
agent_id="my-agent",
)
executor = AgentExecutor(
agent=agent, tools=tools,
callbacks=[handler]
)
CrewAI
python
from agentsiem import CrewAIMonitor
monitor = CrewAIMonitor(
api_key="your-api-key",
crew_name="research-crew",
)
monitor.register_agent(role="Researcher")
@monitor.trace_task
def research(task):
return agent.execute(task)
Guardrails
python
from agentsiem import Guardrails
guard = Guardrails(
api_key="your-api-key",
endpoint="http://localhost:3520",
mode="block",
)
result = guard.check("Ignore all previous instructions")
if result.blocked:
print(f"Blocked: {result.threats}")
else:
response = llm.generate(result.prompt)
Node.js SDK
bashnpx @agentsiem/sdk init
Usage
javascript
const { AgentSIEM } = require('@agentsiem/sdk');
const siem = new AgentSIEM({
endpoint: 'http://localhost:3520',
apiKey: 'your-api-key',
agentId: 'my-agent',
});
await siem.prompt('Hello');
await siem.response(result);
CLI Commands
bash
npx @agentsiem/sdk init
npx @agentsiem/sdk healthcheck
npx @agentsiem/sdk register --agent my-bot
npx @agentsiem/sdk simulate
npx @agentsiem/sdk alerts
npx @agentsiem/sdk stats
Runtime Guardrails
Deploy a proxy in front of your LLM API. All requests are evaluated against 80+ detection patterns before reaching the model.
How it works
Point your app to the proxy
Change your LLM API URL from https://api.openai.com to http://localhost:3521
Proxy evaluates every request
80+ detection patterns check for injection, exfiltration, tool abuse, and more.
Clean requests pass through
Malicious requests are blocked (403) or sanitized depending on mode.
Modes
- Detect — Log only, no blocking. Best for monitoring.
- Block — Return 403 for scores ≥ 0.7. Best for production.
- Sanitize — Redact PII (emails, phone numbers, keys) before forwarding.
Setup from Dashboard
Go to Guardrails in the dashboard
Navigate to the Guardrails section.
Enter your upstream LLM URL
e.g., https://api.openai.com
Select mode and start
Click Start Proxy. The proxy runs on port 3521.
Point your app to port 3521
All requests are now filtered.
API Reference
All endpoints are under /api/v1. Authenticate with Authorization: Bearer <token> or x-api-key: <key>.
Auth
POST /auth/register — Create account
POST /auth/login — Login, returns JWT
Agents
GET /agents — List agents
POST /agents — Register agent
GET /agents/:id — Agent detail + stats
Telemetry
POST /telemetry — Send event
GET /telemetry — Query events
Alerts
GET /alerts — List alerts
GET /alerts/:id — Alert detail + context
PUT /alerts/:id — Update (acknowledge, resolve)
POST /alerts/:id/action — Execute action (quarantine, kill, escalate)
Guardrails
GET /guardrails/status — Proxy status + stats
PUT /guardrails/config — Configure (mode, upstream)
POST /guardrails/test — Test prompt
Custom Rules (Sigma)
GET /rules — List custom rules
POST /rules — Create rule
GET /rules/sigma — Export all rules as YAML
POST /rules/sigma/test — Test text against rules
Compliance
GET /compliance/report?framework=eu-ai-act&format=json — Generate report
GET /compliance/frameworks — List available frameworks
Integrations
GET /integrations — List integrations
POST /integrations — Add (Slack, Discord, Teams, Webhook)
POST /notifications/test — Test notification
Integrations
Get alerts delivered where your security team lives.
Slack
Create a Slack Incoming Webhook
Go to https://api.slack.com/apps → Your App → Incoming Webhooks → Create
Add to AgentSIEM
Dashboard → Integrations → Add → Slack → Paste webhook URL
Critical alerts auto-sent
Rich Slack attachments with severity, score, agent info, and action buttons.
Discord
Dashboard → Integrations → Add → Discord → Paste webhook URL
Alerts arrive as rich embeds with color-coded severity.
Microsoft Teams
Dashboard → Integrations → Add → Teams → Paste webhook URL
Adaptive Cards with structured alert information.
Severity Filtering
Each integration has a minimum severity setting:
- Critical only — Only the most severe alerts
- High and above — Critical + High (recommended)
- Medium and above — Most alerts
- All — Every alert generated