Agent Guardrails Starter Template
AgentProduction-ready multi-agent starter template with AgentGuard OWASP v2.1 compliance, SwarmDB, Rip-PR, AgentHub IDE, OpenTelemetry, Skill Protocol v2 signed skills, and CI/CD evaluation gates — production-ready from day one.
Agent Guardrails Starter Template
Overview
A production-ready starter template for building AI agents with explicit guardrails built in from day one. This template pairs a multi-agent architecture with AgentGuard runtime enforcement and AgentHub IDE development workflow, shipping with OWASP Agentic Top 10 v2.1 compliance as the default.
The template is designed for teams that want to build agents they can deploy in regulated environments from day one — not bolt on compliance after the fact.
Category
Agent
What's Included
- Multi-agent architecture (planner + coder + reviewer) with cross-agent policy enforcement
- AgentGuard runtime integration with pre-configured OWASP v2.1 policies
- AgentHub IDE project files for visual development and debugging
- Skill Protocol v2 signed skills for common operations
- OpenTelemetry instrumentation for agent observability
- MCP server configurations for SwarmDB, AgentGuard, and Rip-PR
- CI/CD pipeline with agent evaluation gates
- Compliance audit log export configuration
- Docker Compose for local development
Directory Structure
agent-guardrails-template/
├── agents/
│ ├── planner.py # Planning agent
│ ├── coder.py # Code-writing agent
│ └── reviewer.py # Review agent
├── policies/
│ ├── default.yaml # Default agent policy
│ ├── planner.yaml # Planner-specific policy
│ ├── coder.yaml # Coder-specific policy
│ └── reviewer.yaml # Reviewer-specific policy
├── skills/
│ ├── sign-review.yaml # Signed skill for review operations
│ └── keys/ # Agent identity keys
├── mcp/
│ ├── servers.yaml # MCP server registry
│ └── .mcp.json # MCP client config
├── tests/
│ ├── test_planner.py
│ ├── test_coder.py
│ └── test_reviewer.py
├── ci/
│ ├── evaluation.yaml # Agent evaluation pipeline
│ └── compliance-check.sh
├── docker-compose.yml
├── pyproject.toml
└── README.md
Quick Start
# Clone the template
gh repo fork agents-lib/agent-guardrails-template --clone
cd agent-guardrails-template
# Install dependencies
pip install -e .
# Set up environment variables
cp .env.example .env
# Edit .env with your API keys
# Start the full stack (AgentGuard + SwarmDB + MCP servers)
docker compose up -d
# Run tests
pytest
# Run the agent
python -m agents.planner --task "Review the auth module for security issues"
# Open in AgentHub IDE
agenthub .
Agent Architecture
┌─────────────┐
│ User │
└──────┬──────┘
│
┌──────▼──────┐
│ Planner │──policy: planner.yaml
└──────┬──────┘
│
┌────────────┴────────────┐
│ │
┌──────▼──────┐ ┌──────▼──────┐
│ Coder │ │ Reviewer │
└──────┬──────┘ └──────┬──────┘
│ │
└────────────┬────────────┘
│
┌──────▼──────┐
│ AgentGuard │ ── OWASP v2.1 enforcement
└──────┬──────┘
│
┌──────▼──────┐
│ SwarmDB │ ── Agent state with writer identity
└─────────────┘
Pre-Configured Policies
Default Policy
# policies/default.yaml
default_agent:
identity: "*"
tools_allowed: [github-read, filesystem-read]
dlp:
enabled: true
pii_patterns: [email, ssn, credit_card]
memory_protection:
writer_verification: true
poison_detection: true
tool_output:
schema_validation: true
adversarial_detection: true
Coder Policy
# policies/coder.yaml
agent:coder:
identity: "agent:coder-v*"
extends: default_agent
tools_allowed: [github-read, github-write, filesystem-read, filesystem-write]
tools_denied: [github-admin, admin-*]
cross_agent:
can_read_from: ["agent:planner-v*"]
can_write_to: ["agent:reviewer-v*"]
Skill Protocol v2 Example
A signed skill for code review operations:
# skills/sign-review.yaml
name: sign-review
version: 1.0.0
description: Sign and submit a code review
author: agents-lib
input_schema:
type: object
properties:
pr_url:
type: string
focus:
type: string
enum: [security, performance, correctness]
max_comments:
type: integer
default: 10
execution:
runtime: agentguard
policy: sign-review-policy.yaml
signing:
keypair: skills/keys/sign-review.pem
algorithm: ed25519
MCP Server Configuration
{
"mcpServers": {
"agentguard": {
"command": "agentguard-mcp",
"args": ["--config", "policies/default.yaml"]
},
"swarmdb": {
"command": "swarmdb-mcp",
"args": ["--url", "swarmdb://localhost:6432"]
},
"rip-pr": {
"command": "rip-pr-mcp",
"args": ["--github-token", "${GITHUB_TOKEN}"]
}
}
}
CI/CD Pipeline
# .github/workflows/agent-eval.yaml
name: Agent Evaluation
on: [pull_request]
jobs:
eval:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pip install -e .
- run: pytest tests/
- name: Agent evaluation
run: |
agenthub run --ci --threshold 0.85
- name: Compliance check
run: ci/compliance-check.sh
- name: OWASP v2.1 coverage
run: agentguard audit --owasp-coverage
Environment Variables
# .env.example
ANTHROPIC_API_KEY=***
OPENAI_API_KEY=***
GITHUB_TOKEN=***
AGENTGUARD_API_KEY=***
SWARMDB_API_KEY=***
RIP_PR_API_KEY=***
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
DD_API_KEY=***
Pros
- ✅ Production-ready multi-agent architecture from day one
- ✅ OWASP Agentic Top 10 v2.1 compliance built in
- ✅ AgentGuard + SwarmDB + Rip-PR integration out of the box
- ✅ AgentHub IDE project files for visual development
- ✅ OpenTelemetry instrumentation included
- ✅ CI/CD pipeline with evaluation gates
- ✅ Compliance audit log export ready for SOC 2
Cons
- ❌ Larger initial footprint than minimal templates
- ❌ Assumes a multi-agent architecture; may be overkill for simple agents
- ❌ Policy authoring requires security expertise
When to Use
- Building production agents for regulated environments
- Teams already invested in AgentGuard, SwarmDB, and Rip-PR
- Projects that need OWASP Agentic v2.1 compliance from day one
- Organizations requiring SOC 2 or ISO 27001 audit evidence
Resources
- Website: https://agents-lib.com/templates
- GitHub: https://github.com/agents-lib/agent-guardrails-template
- AgentGuard docs: https://agentguard.dev/docs
- SwarmDB docs: https://swarmdb.dev/docs
