One agent.yaml. Validate, health-check, audit, and generate any AI agent.
npm install -g @agentspec/cli
agentspec validate agent.yaml # Schema validation
agentspec health agent.yaml # Runtime health checks
agentspec audit agent.yaml # Compliance scoring (OWASP LLM Top 10)
agentspec generate agent.yaml --framework langgraphπ = requires an LLM API key Β Β·Β all other commands are fully local, no API key needed
- Define your agent in a single
agent.yamlβ model, tools, memory, guardrails, prompts - Validate schema with instant feedback and path-aware errors
- Health-check all runtime dependencies (env vars, model API, Redis, Postgres, MCP servers)
- Audit compliance against OWASP LLM Top 10, model resilience, and memory hygiene packs
- π Generate production-ready LangGraph, CrewAI, Mastra, or AutoGen code
- π Scan an existing codebase and auto-generate the manifest
- Evaluate agent quality against JSONL datasets with CI pass/fail gates
- Deploy to Kubernetes β operator injects sidecar, exposes
/health/readyand/gap - Export to A2A / AgentCard format
- Visual dashboard for fleet-wide agent observability (coming soon)
- Native OpenTelemetry trace export (coming soon)
agent.yamlis the single source of truth β the SDK reads it at runtime, the CLI validates and audits it, the operator deploys it- Sidecar is injected automatically by the operator and exposes live
/health/ready,/gap, and/exploreendpoints without touching agent code - CLI wraps the SDK for local development β validate, audit, generate, scan, evaluate
- MCP Server bridges the sidecar to Claude Code and VS Code for in-editor introspection
# Install
npm install -g @agentspec/cli
# Create a manifest interactively (no API key needed)
agentspec init
# Or scan an existing codebase (π requires a codegen provider, see below)
agentspec scan --dir ./src/
# Validate, health-check, audit (no API key needed)
agentspec validate agent.yaml
agentspec health agent.yaml
agentspec audit agent.yaml
# Generate runnable code (π requires a codegen provider, see below)
agentspec generate agent.yaml --framework langgraph --output ./generated/π scan and generate need a codegen provider. AgentSpec auto-detects the first one available:
# Option A: Claude subscription (Pro / Max), no API key
claude auth login
# Option B: any OpenAI-compatible endpoint (OpenAI, OpenRouter, Groq, Together, Ollama, Nvidia NIM, ...)
export AGENTSPEC_LLM_API_KEY=sk-...
export AGENTSPEC_LLM_MODEL=gpt-4o-mini
# export AGENTSPEC_LLM_BASE_URL=https://openrouter.ai/api/v1 # optional, defaults to OpenAI
# Option C: Anthropic API key
export ANTHROPIC_API_KEY=sk-ant-...Check which one is active with agentspec provider-status. Full setup, CI examples, and overrides in the Provider Authentication guide.
# One-line install
curl -fsSL https://raw.githubusercontent.com/agents-oss/agentspec/main/install.sh | bash
# Or with Helm
helm install agentspec-operator \
oci://ghcr.io/agents-oss/charts/agentspec-operator \
--version 0.1.1 \
--namespace agentspec-system --create-namespacenpm install @agentspec/sdkHealth check:
AgentSpec Health β budget-assistant
βββββββββββββββββββββββββββββββββββββ
Status: β healthy
ENV
β env:GROQ_API_KEY
β env:DATABASE_URL
β env:REDIS_URL
MODEL
β model:groq/llama-3.3-70b-versatile (94ms)
β model-fallback:azure/gpt-4 (112ms)
MEMORY
β memory.shortTerm:redis (3ms)
β memory.longTerm:postgres (5ms)
Compliance audit:
AgentSpec Audit β budget-assistant
ββββββββββββββββββββββββββββββββββββ
Score : B 82/100
Category Scores
owasp-llm-top10 75% ββββββββββββββββββββ
model-resilience 100% ββββββββββββββββββββ
memory-hygiene 80% ββββββββββββββββββββ
Violations (2)
[high] SEC-LLM-10 β API keys use $secret, not $env
[medium] MEM-04 β Vector store namespace isolated
apiVersion: agentspec.io/v1
kind: AgentSpec
metadata:
name: budget-assistant
version: 1.0.0
spec:
model:
provider: openai
id: gpt-4o-mini
apiKey: $env:OPENAI_API_KEY
fallback:
provider: azure
id: gpt-4
apiKey: $env:AZURE_OPENAI_API_KEY
prompts:
system: $file:prompts/system.md
tools:
- name: get-balance
type: function
description: "Get account balance"
module: $file:tools/finance.py
guardrails:
input:
- type: prompt-injection
action: reject
compliance:
packs:
- owasp-llm-top10
- model-resilienceSee the full manifest reference for all fields including memory, evaluation, MCP, subagents, and observability.
Full docs at agents-oss.github.io/agentspec
| Quick Start | Up and running in 5 minutes |
| Manifest Concepts | All manifest fields explained |
| Health Checks | Runtime dependency checking |
| Compliance & Audit | OWASP LLM Top 10 scoring |
| CLI Reference | All commands and flags |
TypeScript Β· pnpm workspaces Β· Zod Β· js-yaml Β· commander Β· vitest Β· tsup Β· Python Β· Kopf Β· FastAPI Β· Fastify Β· Helm
Apache 2.0
Issues and PRs welcome at github.com/agents-oss/agentspec.
Join the conversation on Slack β ask questions in #help, share what you're building in #show-and-tell, or hack on the project in #contributing.

