Integration Guides

Integrate ACGP with popular agent frameworks and protocols.

For production-oriented integrations, prefer GovernanceSteward.production(...) with durable runtime state. Use the general constructor only for development, tests, or advanced bootstrap flows.


Core Integrations (Maintained)

Community Integrations (Preview)

Protocol Integrations


Integration Patterns

Wrapper Pattern

Wrap existing agents without modification:

from acgp import GovernanceWrapper

wrapped_agent = GovernanceWrapper(
    agent=my_existing_agent,
    governance_tier="GT-2"
)

Middleware Pattern

Add ACGP as middleware in your agent pipeline:

agent_pipeline = [
    input_processor,
    acgp_governance_middleware,  # ACGP here
    action_executor
]

Native Integration

Build agents with ACGP from the start:

from acgp import GovernanceSteward, PostgresStateStorage

class MyGovernedAgent:
    def __init__(self):
        self.steward = GovernanceSteward.production(
            blueprint_file="blueprint.yaml",
            state_storage=PostgresStateStorage(connection_string="postgresql://runtime/acgp"),
        )

    def act(self, request):
        trace = self.create_trace(request)
        result = self.steward.evaluate(trace)
        if result.intervention == "ok":
            return self.execute(trace.action)

Quick Start Examples

LangChain

from acgp_langchain import GovernedChain
from acgp import GovernanceSteward, PostgresStateStorage

steward = GovernanceSteward.production(
    blueprint_file="blueprint.yaml",
    state_storage=PostgresStateStorage(connection_string="postgresql://runtime/acgp"),
)
governed_agent = GovernedChain(
    langchain_agent,
    steward,
    agent_id="urn:acgp:agent:assistant:prod:7f4c9d2a",
)
result = governed_agent.run("Process this request")

LangGraph

from acgp_langgraph import GovernedGraph
from acgp import GovernanceSteward, PostgresStateStorage

steward = GovernanceSteward.production(
    blueprint_file="blueprint.yaml",
    state_storage=PostgresStateStorage(connection_string="postgresql://runtime/acgp"),
)
governed_graph = GovernedGraph(
    langgraph_compiled,
    steward,
    agent_id="urn:acgp:agent:assistant:prod:7f4c9d2a",
)
result = governed_graph.invoke({"input": "data"})

AGNO

from acgp_agno import GovernedAgent, GovernedTeam
from acgp import GovernanceSteward, PostgresStateStorage

steward = GovernanceSteward.production(
    blueprint_file="blueprint.yaml",
    state_storage=PostgresStateStorage(connection_string="postgresql://runtime/acgp"),
)
governed_agent = GovernedAgent(
    agno_agent,
    steward,
    agent_id="urn:acgp:agent:assistant:prod:7f4c9d2a",
)
result = governed_agent.run("Execute task")

CrewAI

from acgp_crewai import GovernedCrew
from acgp import GovernanceSteward, PostgresStateStorage

steward = GovernanceSteward.production(
    blueprint_file="blueprint.yaml",
    state_storage=PostgresStateStorage(connection_string="postgresql://runtime/acgp"),
)
governed_crew = GovernedCrew(
    crew,
    steward,
    agent_ids={
        "Researcher": "urn:acgp:agent:researcher:prod:7f4c9d2a",
        "Writer": "urn:acgp:agent:writer:prod:9b2a41cc",
    },
)
result = governed_crew.kickoff()

Autogen

from acgp_autogen import GovernedConversableAgent
from acgp import GovernanceSteward, PostgresStateStorage

steward = GovernanceSteward.production(
    blueprint_file="blueprint.yaml",
    state_storage=PostgresStateStorage(connection_string="postgresql://runtime/acgp"),
)
governed_agent = GovernedConversableAgent(
    autogen_agent,
    steward,
    agent_id="urn:acgp:agent:assistant:prod:7f4c9d2a",
)
governed_agent.send("Hello", recipient)

Microsoft Agent Framework

from acgp_ms_agents import ACGPAgent
from acgp import GovernanceSteward, PostgresStateStorage

steward = GovernanceSteward.production(
    blueprint_file="blueprint.yaml",
    state_storage=PostgresStateStorage(connection_string="postgresql://runtime/acgp"),
)
governed_agent = ACGPAgent(
    ms_agent,
    steward,
    agent_id="urn:acgp:agent:assistant:prod:7f4c9d2a",
)
result = governed_agent.execute("Process request")

Custom Agents

See Custom Protocols for wrapping any agent.


MCP Integration Implementation Guide