# ACP — AI Control Plane

**Deterministic governance and execution control plane for enterprise AI agents and autonomous systems.**

> **Note:** “ACP” means many things in other industries (medical, political, nonprofit, and more). In this project it always means **ACP — AI Control Plane**, not a generic acronym.

**Add governance, approvals, policy enforcement, and execution visibility to AI agents in minutes.**

Works with CrewAI, LangGraph, Strands, Google ADK, MCP tools, and custom Python workflows.

**Requires:** [Docker Desktop](https://docs.docker.com/get-docker/) (Compose v2).

---

## Quick start

```bash
pip install acp-ai
acp init          # optional: starter policies in ~/.acp/policies
acp up --build    # first run: build + start stack
acp dashboard     # open governance UI
```

| Step | Command |
|------|---------|
| Install | `pip install acp-ai` |
| Start stack | `acp up` (use `acp up --build` once) |
| Open UI | `acp dashboard` → http://localhost:3090/dashboard/ |
| Stop | `acp down` |

---

## Why ACP — AI Control Plane?

Most agents call tools, APIs, and other agents directly. Teams then scatter rules across Python, workflows, and frameworks:

```python
if supplier_risk_score > threshold:
    require_human_approval()
```

That becomes inconsistent, hard to audit, easy to bypass, and duplicated everywhere.

**ACP — AI Control Plane** centralizes governance **outside** agent code:

| Capability | What you get |
|------------|----------------|
| **Centralized governance** | One place for rules, not copy-paste per team |
| **Policy enforcement** | OPA/Rego evaluates every governed call |
| **Approvals** | Escalate high-risk actions to humans |
| **A2A governance** | Governed agent-to-agent calls |
| **A2T governance** | Governed agent-to-tool calls |
| **Audit & visibility** | Decisions, traces, registry in one dashboard |

---

## Architecture

![ACP — AI Control Plane architecture](https://raw.githubusercontent.com/raja-datascientist/ACP/main/docs/images/acp-architecture.svg)

```text
Agent / Workflow  →  ACP SDK  →  Interceptor / Gateway  →  OPA (Rego)  →  Allow / Deny / Escalate  →  Execution
```

---

## Dashboard

The **ACP — AI Control Plane** dashboard is a core differentiator: live allow/deny/escalate decisions, approvals, agent registry, and policy catalog. Open **http://localhost:3090/dashboard/** after `acp up`.

### Overview & activity

![Overview — governance posture and live activity](https://raw.githubusercontent.com/raja-datascientist/ACP/main/docs/images/dashboard-overview.png)

![Live activity — real-time enforcement stream](https://raw.githubusercontent.com/raja-datascientist/ACP/main/docs/images/dashboard-live-activity.png)

### Decisions & approvals

![Governance decisions — allow / deny / escalate analytics](https://raw.githubusercontent.com/raja-datascientist/ACP/main/docs/images/dashboard-governance-decisions.png)

![Approvals — human-in-the-loop escalation queue](https://raw.githubusercontent.com/raja-datascientist/ACP/main/docs/images/dashboard-approvals.png)

### Registry & policies

![Agent registry — identity catalog for policy enforcement](https://raw.githubusercontent.com/raja-datascientist/ACP/main/docs/images/dashboard-agent-registry.png)

![Policies — Rego catalog from the interceptor](https://raw.githubusercontent.com/raja-datascientist/ACP/main/docs/images/dashboard-policies.png)

![Policy detail — mortgage underwriting rules](https://raw.githubusercontent.com/raja-datascientist/ACP/main/docs/images/dashboard-policy-underwriting.png)

### Forensics

![Traces — governance trace investigation](https://raw.githubusercontent.com/raja-datascientist/ACP/main/docs/images/dashboard-traces.png)

---

## Deployment modes

| Mode | How | Best for |
|------|-----|----------|
| **Local** | `acp up` via pip + Docker | Demos, dev, quickstart |
| **SDK** | `@governed_tool` in your agent code | CrewAI, LangGraph, Strands, custom Python |
| **Gateway** | Single origin on `:3090` (dashboard + API proxy) | Local unified URL; pattern for prod ingress |
| **Cloud / self-hosted** | Docker Compose, Kubernetes, ECS/EKS on AWS/Azure/GCP | Team or enterprise rollout |

**Local endpoints**

| URL | Purpose |
|-----|---------|
| http://localhost:3090/dashboard/ | Governance dashboard |
| http://localhost:8080 | Interceptor API (`/tool-call`, `/api/v1/*`) |

**Self-hosted (example)**

```text
https://acp.your-company.example
```

---

## Example: governed tool

```python
import os
from acp import governed_tool

os.environ.setdefault("ACP_INTERCEPTOR_URL", "http://localhost:8080")

@governed_tool(agent_id="supply-chain", tool="supplier_approval")
def supplier_approval(supplier_name: str, risk_score: int):
    return {"supplier": supplier_name, "risk_score": risk_score, "status": "pending_review"}
```

The **AI Control Plane** intercepts the call, evaluates policy, then allows, denies, or escalates.

---

## Example: policy (Rego)

```rego
package acp.policy

allow {
    input.identity.role == "supply-chain-manager"
    input.action.tool == "supplier_approval"
    input.risk_score < 70
}
```

Edit policies in `~/.acp/policies/` after `acp init`.

---

## Example: governance flow

```text
Supply Chain Agent
    → ACP — AI Control Plane validates identity (JWT)
    → OPA evaluates policy
    → Decision: ESCALATE
    → Human approves in dashboard
    → Execution resumes
```

---

## What the AI Control Plane provides

- **Policy enforcement** — OPA/Rego (Cedar on roadmap)
- **Identity** — JWT from Okta, Auth0, Keycloak, or your IdP
- **Approvals** — human-in-the-loop for risky actions
- **Observability** — dashboard for decisions, traces, agents, tools
- **Agent registry** — lightweight catalog of agents and capabilities
- **Framework-friendly** — keep CrewAI / LangGraph / Strands for reasoning; govern execution here

---

## Philosophy

Orchestration frameworks handle **reasoning, planning, and workflows**.

**ACP — AI Control Plane** handles **governance, trust, approvals, policy, and auditability**.

Reasoning stays autonomous. Execution stays governed.

---

## Roadmap

- Gateway / proxy execution mode (production hardening)
- MCP-native governance
- Policy studio and replay
- Enterprise topology views
- Multi-cloud deployment templates

---

## License

MIT License
