AgentWard sits between your agent and its tools as a transparent proxy, enforcing declarative policies at the code level — completely outside the LLM context window.
The key principle: Policies are enforced in middleware, in code, before the tool call reaches the underlying server. The LLM never sees the policy rules and cannot override them — even under prompt injection or agent reasoning errors.
Both use the same agentward.yaml policy file. They serve different purposes and run at different times.
Scans skill definitions, MCP configs, and tool declarations. Generates permission maps, smart-default policies, and compliance delta reports.
MCP or HTTP proxy intercepts every tool call in real time. Evaluates against policies: ALLOW, BLOCK, REDACT, APPROVE, LOG. Generates structured audit trail.
The same policy YAML works across all three. AgentWard is framework-agnostic — it intercepts at the protocol level, not the application level.
Each stage can be run independently, or run agentward init to go through all four interactively.
Auto-discovers all tool sources: MCP configs (Claude Desktop, Cursor, Windsurf, VS Code), Python source files (OpenAI, LangChain, CrewAI, Anthropic SDKs), and OpenClaw/ClawdBot skills. Enumerates tools from live MCP servers via subprocess + JSON-RPC handshake. Produces a risk-rated permission map with use-case-aware recommendations.
Generates an agentward.yaml based on scan results and detected use-case patterns. Tailors defaults to what you actually have installed.
Starts the MCP stdio proxy or HTTP reverse proxy with full policy enforcement. Every tool call is intercepted before it reaches the underlying server.
Evaluates your current agentward.yaml against regulatory frameworks and generates a compliance delta report with specific gaps and auto-fix suggestions.
--fix flag: auto-generates a corrected policy YAML with all required changes appliedBoth modes use the same policy YAML. Choose based on how your agent connects to its tools.
Sits between the agent host and MCP server subprocess. The agent thinks it's talking directly to the MCP server; the server thinks it's talking to the agent. Every tools/call is intercepted and evaluated.
Works with: Claude Desktop, Claude Code, Cursor, Windsurf, VS Code, OpenClaw
Swaps the ClawdBot gateway port so AgentWard listens on the original port and forwards to the gateway on a new port. Intercepts POST /tools-invoke. All other traffic including WebSocket (for the ClawdBot UI) passes through transparently.