Skip to main content

Introduction

KalGuard is an open-source, enterprise-grade security layer for AI agents. It runs as a sidecar process that mediates every prompt and tool call your agent makes — enforcing policy, filtering dangerous inputs, and producing an immutable audit trail.

The Problem

Autonomous AI agents introduce a class of risk that traditional application security does not address:

ChallengeImpact
Prompt injectionAdversarial inputs can override agent instructions
Uncontrolled tool accessAgents may invoke dangerous operations without authorization
Lack of audit trailNo structured record of what the agent actually did
Implicit trustMost frameworks assume the agent is trustworthy by default

The KalGuard Approach

KalGuard treats every agent as untrusted by default and enforces five design principles:

  1. Zero Trust — every request is validated against policy before execution.
  2. Fail Closed — if evaluation errors or the sidecar is unreachable, access is denied.
  3. Agent Agnostic — works with OpenAI, Anthropic, LangChain, custom frameworks, or local models.
  4. Environment Agnostic — deploy locally, in Docker, on Kubernetes, or on bare-metal VMs.
  5. Security as Infrastructure — the sidecar is a separate process, not library code inside your agent.

Core Components

┌──────────────┐ HTTP / SDK ┌──────────────────┐
│ │ ─────────────────► │ │
│ AI Agent │ │ KalGuard Sidecar│
│ │ ◄───────────────── │ │
└──────────────┘ allow / deny └────────┬─────────┘

┌──────────────┼──────────────┐
│ │ │
Policy Engine Prompt Firewall Audit Log
Tool Mediator
ComponentResponsibility
Policy EngineEvaluates declarative JSON rules (first-match, fail-closed)
Prompt FirewallRisk scoring, injection detection, PII redaction, content filtering
Tool MediatorAllowlist/denylist, schema validation, per-tool rate limiting
Agent IdentityShort-lived JWT tokens scoped to specific capabilities
Audit LoggerStructured, append-only JSON logs (SIEM-ready)
SDK ClientTypeScript helper that wraps HTTP calls to the sidecar

Use Cases

  • Enterprise AI deployments — enforce uniform security policy across an agent fleet.
  • Regulated industries — maintain audit trails and access controls for compliance.
  • Multi-tenant platforms — isolate agent capabilities per customer or environment.
  • Development & testing — sandbox agent behavior before promoting to production.

Free vs. Cloud (Pro & Enterprise)

KalGuard is fully functional as an open-source, self-hosted solution. For teams that need centralized management, higher limits, and advanced features, KalGuard Cloud adds a managed dashboard layer.

CapabilityFree (OSS)Pro ($49/mo)Enterprise
Security checks/day1,000100,000Unlimited
Agents1UnlimitedUnlimited
Audit retention7 days90 days365 days
Prompt firewallBasicAdvanced + PII redactionAdvanced + PII
Usage analyticsDashboardDashboard
Custom policy rulesYesYes
SSO / SAML / SLAYes

To connect your sidecar to KalGuard Cloud, set a single environment variable:

export KALGUARD_API_KEY=kg_live_your_api_key_here

See KalGuard Cloud for details.

What's Next?

  • Quick Start — get KalGuard running in five minutes.
  • Architecture — understand the sidecar model in depth.
  • Installation — comprehensive install guide for every platform.