Zero Code Changes
Add security to any AI agent without modifying your application code. Use our CLI proxy or the native Desktop App.
Protect autonomous systems with real-time policy enforcement, behavioral monitoring, and on-chain identity.
Bastion is a programmable firewall for AI agents. It sits between your autonomous AI system and the outside world, intercepting and evaluating every action before it executes.
Think of it as a circuit breaker for AI - preventing hallucinations, mistakes, and malicious behavior from causing real-world harm.
Autonomous AI agents are powerful but unpredictable. They can:
Bastion prevents all of this with policy-based controls that require zero changes to your agent code.
# 1. Install the CLI
cargo install bastion-cli
# 2. Login and initialize
bastion login --key bst_your_api_key
bastion init
# 3. Start your agent with protection
bastion start -- python agent.py
# That's it! Your agent is now protected.Bastion creates a local HTTP proxy that intercepts all network requests. Each request is evaluated against your policies in the dashboard. Allowed requests proceed normally. Blocked requests return 403 FORBIDDEN.
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ │ │ │ │ │
│ AI Agent ├────────►│ Bastion CLI │────────►│ Bastion │
│ │ │ (Proxy) │ │ Backend │
│ │ │ │ │ (Policies) │
└─────────────┘ └──────────────┘ └─────────────┘
│
│ Allowed?
▼
┌──────────────┐
│ │
│ Real Target │
│ (APIs, etc) │
│ │
└──────────────┘Enforce stop-loss limits, maximum transaction amounts, and trading hour restrictions. Never lose more than your risk tolerance.
Prevent data exfiltration with DLP policies. Block requests containing PII, API keys, or sensitive patterns.
Restrict deployments to business hours. Require approval for production operations. Block dangerous commands.
Ensure agents never leak customer data. Block requests with credit card numbers, SSNs, or other PII.
Rate limit API calls. Block malicious domains. Enforce spending budgets. Prevent any action you define.
Bastion offers two ways to protect your agents, tailored to your environment.
| Feature | Bastion CLI | Bastion Desktop |
|---|---|---|
| Best For | Servers, CI/CD, Production | Local Dev, Research, Monitoring |
| Setup | cargo install | Native Installer (Mac/Win/Linux) |
| Interface | CLI / Dashboard | Native GUI + Dashboard |
| Monitoring | Stdout / Audit Logs | Real-time Health Badges & Alerts |
| Identity | bastion register | Identity Management Wizard |
| Agent Setup | bastion start -- <cmd> | Integrated Install Wizard |
Ready to protect your AI agents? Follow our Getting Started Guide to install Bastion and secure your first agent in under 5 minutes.
Bastion is open source and free to use. We believe security for AI agents should be accessible to everyone.