Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions integrations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ Integration with NVIDIA's AI model ecosystem:
- Performance optimization examples
- Multiple example implementations (intro, marketing strategy)

### 4. Decision Anchor MCP
Integration with Decision Anchor via MCP for external accountability proof:
- Connects to DA's remote MCP server using `MCPServerAdapter`
- Records decision boundaries for payments, delegation, and disputes
- No DA API key needed — agents register via MCP tools

## Integration Patterns

These examples demonstrate:
Expand Down
32 changes: 32 additions & 0 deletions integrations/decision_anchor_mcp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Decision Anchor MCP Integration

Connect CrewAI agents to [Decision Anchor](https://github.com/zse4321/decision-anchor-sdk)'s remote MCP server using `MCPServerAdapter`.

Decision Anchor provides external accountability proof for agent payments, delegation, and disputes via MCP. It does not monitor, judge, or intervene.

## What this example does

1. Connects to DA's MCP server (`https://mcp.decision-anchor.com/mcp`) via `MCPServerAdapter`
2. Registers a new agent (one-time, no DA API key required)
3. Creates a Decision Declaration (DD) with accountability scope for a delegated task
4. Reports the DD ID and anchored timestamp

## Setup

```bash
pip install crewai crewai-tools[mcp]
```

## Usage

```bash
export OPENAI_API_KEY=your_key
python main.py
```

## Notes

- No DA API key needed — agents register via MCP tools and receive Trial 500 DAC / 30 days
- Running this creates a real agent registration and decision record on DA
- The MCP server uses streamable HTTP transport
- Full agent guide: [AGENTS.md](https://github.com/zse4321/decision-anchor-sdk/blob/main/AGENTS.md)
78 changes: 78 additions & 0 deletions integrations/decision_anchor_mcp/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
"""CrewAI agent with Decision Anchor MCP integration.

Connects CrewAI agents to Decision Anchor's remote MCP server
using MCPServerAdapter for external accountability proof.

Use case: a crew handling delegated tasks records each handoff
boundary via DA, so that responsibility disputes between agents
have externally-anchored proof.

Requirements:
pip install crewai crewai-tools[mcp]

Usage:
export OPENAI_API_KEY=your_key
python main.py
"""

from crewai import Agent, Crew, Process, Task

from crewai_tools import MCPServerAdapter

# Decision Anchor's remote MCP server — no API key needed
da_server_params = {
"url": "https://mcp.decision-anchor.com/mcp",
"transport": "streamable_http",
}


def main():
with MCPServerAdapter(da_server_params) as da_tools:
accountability_agent = Agent(
role="Accountability Recorder",
goal=(
"Record decision boundaries for actions "
"that involve external effects"
),
backstory=(
"You ensure that every payment, delegation, or "
"external action has its accountability scope "
"recorded externally via Decision Anchor. "
"This protects the team when disputes arise later."
),
tools=da_tools,
verbose=True,
)

record_task = Task(
description=(
"1. Register as a new agent on Decision Anchor "
"with name 'crewai-demo-agent'. "
"2. Create a Decision Declaration (DD) with "
"action_type 'execute' and summary "
"'Delegated data processing task to specialist agent'. "
"Use retention short, integrity basic, "
"disclosure internal, responsibility minimal. "
"3. Report the DD ID and anchored timestamp."
),
expected_output=(
"DD ID and timestamp confirming the decision "
"was externally anchored."
),
agent=accountability_agent,
)

crew = Crew(
agents=[accountability_agent],
tasks=[record_task],
process=Process.sequential,
verbose=True,
)

result = crew.kickoff()
print("\n=== Result ===")
print(result)


if __name__ == "__main__":
main()
2 changes: 2 additions & 0 deletions integrations/decision_anchor_mcp/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
crewai
crewai-tools[mcp]