From 27bba6ceb2128db440cd666f38ef4bdb3857b403 Mon Sep 17 00:00:00 2001 From: "namrata.ghadi" Date: Wed, 11 Mar 2026 11:40:32 -0700 Subject: [PATCH 1/5] cleanup overview --- core/overview.mdx | 214 ++------------------------------------------ core/quickstart.mdx | 2 + 2 files changed, 11 insertions(+), 205 deletions(-) diff --git a/core/overview.mdx b/core/overview.mdx index 0761883..972ec38 100644 --- a/core/overview.mdx +++ b/core/overview.mdx @@ -16,6 +16,14 @@ icon: "house" **Agent Control** provides a policy-based control layer that sits between your AI agents and the outside world. It evaluates inputs and outputs against configurable rules, blocking harmful content, prompt injections, PII leakage, and other risks — all without changing your agent's code. It's fully open source--check out the **Agent Control** [repo](https://github.com/agentcontrol/agent-control). + + + + Install, run, and protect your first agent in minutes. + + + + ## Why Do You Need It? Traditional guardrails embedded inside your agent code have critical limitations: @@ -30,211 +38,7 @@ Traditional guardrails embedded inside your agent code have critical limitations - **For non-technical teams:** Intuitive UI to configure and monitor agent safety without touching code - **For organizations:** Reusable policies across agents with comprehensive audit trails - -![Agent Control Architecture](/images/Architecture.png) - - -## Get started - -Protect your AI agent in 4 simple steps. - -## Prerequisites - -- **Python 3.12+** - -- **Docker** - - -**Quick setup (no repo cloning required)** - Copy this into your terminal or directly paste into your coding agent to start the Agent Control server, UI: - -```bash -curl -L https://raw.githubusercontent.com/agentcontrol/agent-control/refs/heads/main/docker-compose.yml | docker compose -f - up -d -``` - -Then, install sdk in your virtual env: - -```bash -uv venv -source .venv/bin/activate -uv pip install agent-control-sdk -``` - -**What this does:** - -- ✅ Starts Agent Control server at `http://localhost:8000` -- ✅ Starts UI dashboard at `http://localhost:8000` -- ✅ Installs Python SDK (`agent-control-sdk`) - -**Next:** Jump to [Step 3: Register your agent](#step-3-register-your-agent) - - - - -**Alternatively**, for local development with the Agent Control repository, clone the repo and follow all steps below. - -## Step 1: Start the Agent Control Server - -Startup AgentControl server manually for local development. - -### Local development (cloning the repo) - -Prerequisites: - -- **uv** — Fast Python package manager (`curl -LsSf https://astral.sh/uv/install.sh | sh`) - -- **Node.js 18+** — For the web dashboard (optional) - -```bash - -# Clone the repository (contains the server) - -git clone https://github.com/agentcontrol/agent-control.git -cd agent-control - -# Install dependencies - -make sync - -# Start the Agent Control server (boots Postgres + runs migrations) - -make server-run - -# Start the UI (in a separate shell) - -make ui-install -make ui-dev -``` - -- **Server runs at `http://localhost:8000`** ✅ - -- **UI runs at `http://localhost:4000`** ✅ - -> 💡 **Verify the server:** Open [http://localhost:8000/health](http://localhost:8000/health) — you should see `{"status": "healthy", "version": "..."}`. - -## Step 2: Install the SDK - -In your agent application project: - -```bash -pip install agent-control-sdk -``` - -## Step 3: Register Your Agent - -Agent must be registered with the server. You should also add `@control` decorator around tools and LLM call functions. - -Here is a contrived example. Reference our [Examples](/examples/overview) for real world examples for specific frameworks. - -```python - -# my_agent.py - -import asyncio -import agent_control -from agent_control import control, ControlViolationError - -# Protect any function (like LLM calls) - -@control() -async def chat(message: str) -> str: - # In production: response = await LLM.ainvoke(message) - # For demo: simulate LLM that might leak sensitive data - if "test" in message.lower(): - return "Your SSN is 123-45-6789" # Will be blocked! - return f"Echo: {message}" - -# Initialize your agent - -agent_control.init( - agent_name="awesome_bot_3000", # Unique name - agent_description="My Chatbot", -) - -async def main(): - try: - print(await chat("test")) # ❌ Blocked - except ControlViolationError as e: - print(f"❌ Blocked: {e.control_name}") - -asyncio.run(main()) -``` - -## Step 4: Add Controls - -The easiest way to add controls is through the UI — see the [UI Quickstart](/core/ui-quickstart) for a step-by-step guide. Alternatively, use the SDK as shown below or call the API directly. - -Run following setup script to create controls to protect your agent. - -```python -# setup.py - Run once to configure agent controls - -import asyncio -from datetime import datetime, UTC -from agent_control import AgentControlClient, controls, agents -from agent_control_models import Agent - -async def setup(): - async with AgentControlClient() as client: # Defaults to localhost:8000 - # 1. Register agent first - agent = Agent( - agent_name="awesome_bot_3000", - agent_description="My Chatbot", - agent_created_at=datetime.now(UTC).isoformat(), - ) - await agents.register_agent(client, agent, steps=[]) - - # 2. Create control (blocks SSN patterns in output) - control = await controls.create_control( - client, - name="block-ssn", - data={ - "enabled": True, - "execution": "server", - "scope": {"stages": ["post"]}, - "selector": {"path": "output"}, - "evaluator": { - "name": "regex", - "config": {"pattern": r"\b\d{3}-\d{2}-\d{4}\b"}, - }, - "action": {"decision": "deny"}, - }, - ) - - # 3. Associate control directly with agent - await agents.add_agent_control( - client, - agent_name=agent.agent_name, - control_id=control["control_id"], - ) - - print("✅ Setup complete!") - print(f" Control ID: {control['control_id']}") - -asyncio.run(setup()) -``` - -> [!NOTE] -> **Authentication Note:** Authentication is disabled by default in the server .env (`AGENT_CONTROL_API_KEY_ENABLED=false`). If you enable it, this setup script needs an admin API key because it creates a control and attaches it to an agent. `agents.register_agent()` accepts a regular or admin key, but `controls.create_control()` and `agents.add_agent_control()` require a key listed in `AGENT_CONTROL_ADMIN_API_KEYS`. -> -> In the example .env, the placeholders are: -> -> - **Regular API key(s):** `AGENT_CONTROL_API_KEYS` (e.g., "my-ui-key") -> - **Admin API key(s):** `AGENT_CONTROL_ADMIN_API_KEYS` (e.g., "my-admin-key") -> -> **Replace these defaults before any shared or production deployment.** - -**With authentication enabled:** - -```bash -curl -L https://raw.githubusercontent.com/agentcontrol/agent-control/refs/heads/main/docker-compose.yml | AGENT_CONTROL_API_KEY_ENABLED=true AGENT_CONTROL_API_KEYS="my-ui-key" AGENT_CONTROL_ADMIN_API_KEYS="my-admin-key" AGENT_CONTROL_SESSION_SECRET="some-long-random-string" CORS_ORIGINS="http://localhost:4000" docker compose -f - up -d && pip install agent-control-sdk -``` - - -Now, run your agent code. - -**🎉 Done!** Your agent now blocks SSN patterns automatically. - -For detailed explanations of how controls work under the hood, performance benchmarks, configuration options, and development setup, see the complete [Quickstart](/core/quickstart) guide. +**Ready to dive in?** Start with the quickstart or explore real‑world examples and core concepts below. diff --git a/core/quickstart.mdx b/core/quickstart.mdx index e1a481c..c436595 100644 --- a/core/quickstart.mdx +++ b/core/quickstart.mdx @@ -4,6 +4,8 @@ description: Install Agent Control, start the server, and protect your first age icon: "rocket" --- +![Agent Control Architecture](/images/Architecture.png) + Protect your AI agent in 4 simple steps. ## Prerequisites From 9b7dee1c80978fd1a39c5479f419f0c96b87ca6b Mon Sep 17 00:00:00 2001 From: "namrata.ghadi" Date: Wed, 11 Mar 2026 12:18:13 -0700 Subject: [PATCH 2/5] improve the landing page --- core/overview.mdx | 35 ++++++++++++++++++----------------- core/quickstart.mdx | 13 +++++++------ 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/core/overview.mdx b/core/overview.mdx index 972ec38..6c36dec 100644 --- a/core/overview.mdx +++ b/core/overview.mdx @@ -14,7 +14,9 @@ icon: "house" allowFullScreen > -**Agent Control** provides a policy-based control layer that sits between your AI agents and the outside world. It evaluates inputs and outputs against configurable rules, blocking harmful content, prompt injections, PII leakage, and other risks — all without changing your agent's code. It's fully open source--check out the **Agent Control** [repo](https://github.com/agentcontrol/agent-control). +**Agent Control** provides a centralized control layer between your AI agents and the outside world. It evaluates inputs and outputs against configurable rules, blocking harmful content, prompt injections, PII leakage, and other risks—without changing your agent’s code. + +Choose your next step: follow the quickstart, explore examples, or head to the repo: @@ -22,36 +24,36 @@ icon: "house" Install, run, and protect your first agent in minutes. + + Real-world use cases and end-to-end integrations. + + + + Browse the source, contribute, or star the project. + + -## Why Do You Need It? +## Why It Matters Traditional guardrails embedded inside your agent code have critical limitations: - **Scattered Logic:** Control code is buried across your agent codebase, making it hard to audit or update - **Deployment Overhead:** Changing protection rules requires code changes and redeployment -- **Limited Adaptability:** Hard-coded checks can't adapt to new attack patterns or production data variations +- **Limited Adaptability:** Hard-coded checks can’t adapt to new attack patterns or production data variations **Agent Control gives you runtime control over what your agents can and cannot do:** -- **For developers:** Centralize safety logic and adapt to emerging threats instantly without redeployment -- **For non-technical teams:** Intuitive UI to configure and monitor agent safety without touching code -- **For organizations:** Reusable policies across agents with comprehensive audit trails +- **For developers:** Centralize safety logic and adapt to emerging threats without redeployment +- **For non-technical teams:** Configure and monitor agent safety without touching code +- **For organizations:** Reuse controls across agents with audit-ready traces -**Ready to dive in?** Start with the quickstart or explore real‑world examples and core concepts below. +Explore the core building blocks: - - Install, run, and protect your first agent in minutes. - - - - Real-world use cases and end-to-end integrations. - - - Controls, Selectors, Evaluators, and Actions. + Controls, selectors, evaluators, and actions. @@ -59,4 +61,3 @@ Traditional guardrails embedded inside your agent code have critical limitations - diff --git a/core/quickstart.mdx b/core/quickstart.mdx index c436595..9bac8d6 100644 --- a/core/quickstart.mdx +++ b/core/quickstart.mdx @@ -87,7 +87,7 @@ make ui-dev In your agent application project: ```bash -pip install agent-control-sdk +uv pip install agent-control-sdk ``` ## Step 3: Register Your Agent @@ -184,7 +184,11 @@ async def setup(): asyncio.run(setup()) ``` -> [!NOTE] +Now, run your agent code. + +**🎉 Done!** Your agent now blocks SSN patterns automatically. + +> [**!NOTE**] > **Authentication Note:** Authentication is disabled by default in the server .env (`AGENT_CONTROL_API_KEY_ENABLED=false`). If you enable it, this setup script needs an admin API key because it creates a control and attaches it to an agent. `agents.register_agent()` accepts a regular or admin key, but `controls.create_control()` and `agents.add_agent_control()` require a key listed in `AGENT_CONTROL_ADMIN_API_KEYS`. > > In the example .env, the placeholders are: @@ -197,12 +201,9 @@ asyncio.run(setup()) **With authentication enabled:** ```bash -curl -L https://raw.githubusercontent.com/agentcontrol/agent-control/refs/heads/main/docker-compose.yml | AGENT_CONTROL_API_KEY_ENABLED=true AGENT_CONTROL_API_KEYS="my-ui-key" AGENT_CONTROL_ADMIN_API_KEYS="my-admin-key" AGENT_CONTROL_SESSION_SECRET="some-long-random-string" CORS_ORIGINS="http://localhost:4000" docker compose -f - up -d && pip install agent-control-sdk +curl -L https://raw.githubusercontent.com/agentcontrol/agent-control/refs/heads/main/docker-compose.yml | AGENT_CONTROL_API_KEY_ENABLED=true AGENT_CONTROL_API_KEYS="my-ui-key" AGENT_CONTROL_ADMIN_API_KEYS="my-admin-key" AGENT_CONTROL_SESSION_SECRET="some-long-random-string" CORS_ORIGINS="http://localhost:4000" docker compose -f - up -d ``` -Now, run your agent code. - -**🎉 Done!** Your agent now blocks SSN patterns automatically. ### What Is Happening Under the Hood From 589a96c6e87c8823c684bc54c1ce29f41669287b Mon Sep 17 00:00:00 2001 From: "namrata.ghadi" Date: Wed, 11 Mar 2026 13:05:22 -0700 Subject: [PATCH 3/5] update text --- core/overview.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/overview.mdx b/core/overview.mdx index 6c36dec..82bafbb 100644 --- a/core/overview.mdx +++ b/core/overview.mdx @@ -1,6 +1,6 @@ --- title: Agent Control -description: Runtime guardrails for AI agents — configurable, extensible, and production-ready. +description: An open-source control plane that solves for the open, centralized governance needs for all your AI Agents. icon: "house" --- @@ -14,7 +14,7 @@ icon: "house" allowFullScreen > -**Agent Control** provides a centralized control layer between your AI agents and the outside world. It evaluates inputs and outputs against configurable rules, blocking harmful content, prompt injections, PII leakage, and other risks—without changing your agent’s code. +**Agent Control** provides a centralized control layer that evaluates inputs and outputs against configurable rules to block harmful content, prompt injections, PII leakage, and more—without changing agent code. Choose your next step: follow the quickstart, explore examples, or head to the repo: From 0d14fa526f9555245990403937630f8cd41d8045 Mon Sep 17 00:00:00 2001 From: "namrata.ghadi" Date: Wed, 11 Mar 2026 13:10:22 -0700 Subject: [PATCH 4/5] change title --- core/overview.mdx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/overview.mdx b/core/overview.mdx index 82bafbb..b00ce21 100644 --- a/core/overview.mdx +++ b/core/overview.mdx @@ -1,7 +1,6 @@ --- title: Agent Control -description: An open-source control plane that solves for the open, centralized governance needs for all your AI Agents. -icon: "house" +description: An open‑source control plane for centralized agent governance and guardrails. ---