Skip to content

Commit 44d07e5

Browse files
committed
feat: v0.4 Growth & Ecosystem — demos, examples, docs, discoverability
- Add quick-demo scripts (encrypted P2P chat, anycast routing) with rich ANSI terminal output for recordings and presentations - Add Google ADK and OpenAI Agents integration examples - Add platform integration tutorials (Dify, n8n, Langflow, MCP setup) - Create llms-full.txt (500+ lines) as comprehensive AI reference - Rewrite llms.txt with Quick Start, all addressing modes, 4 adapters
1 parent dd75db6 commit 44d07e5

14 files changed

Lines changed: 1635 additions & 24 deletions

File tree

docs/integrations/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Platform Integrations
2+
3+
AgentAnycast provides a built-in [MCP Server](mcp-setup.md) that exposes P2P
4+
agent networking as tools. Any platform supporting the Model Context Protocol
5+
can use AgentAnycast to discover, communicate with, and orchestrate remote
6+
agents over an encrypted P2P network.
7+
8+
## Common Setup
9+
10+
Before integrating with any platform, see the [MCP Server Setup](mcp-setup.md)
11+
guide for installation, startup modes, and available tools.
12+
13+
## Supported Platforms
14+
15+
| Platform | Type | Integration Method |
16+
|----------|------|-------------------|
17+
| [Dify](dify.md) | Low-code AI agent platform | MCP plugin (Streamable HTTP) |
18+
| [n8n](n8n.md) | Workflow automation | MCP Client node (stdio or HTTP) |
19+
| [Langflow](langflow.md) | Visual agent builder | MCP tools component (stdio or HTTP) |
20+
21+
## AI IDE Support
22+
23+
The MCP Server also works with AI-powered IDEs and CLI tools. See the
24+
[MCP Server Setup](mcp-setup.md#ide-configuration) guide for copy-paste
25+
configurations for Claude Desktop, Cursor, VS Code, and Gemini CLI.

docs/integrations/dify.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Dify Integration
2+
3+
[Dify](https://dify.ai) is an open-source low-code AI agent platform. This
4+
guide shows how to connect AgentAnycast's MCP Server to Dify so your agents
5+
and workflows can discover and communicate with remote P2P agents.
6+
7+
## Prerequisites
8+
9+
- Dify instance (cloud or self-hosted)
10+
- AgentAnycast MCP Server running in HTTP mode (see [MCP Server Setup](mcp-setup.md))
11+
12+
Start the MCP Server:
13+
14+
```bash
15+
agentanycastd --mcp-listen :8080
16+
```
17+
18+
## Install the MCP Plugin
19+
20+
Dify supports MCP tools through its plugin ecosystem.
21+
22+
1. Open your Dify instance and navigate to **Plugins** in the top menu.
23+
2. Search for **MCP Server** in the plugin marketplace.
24+
3. Install the MCP Server plugin (community-maintained).
25+
4. After installation, the plugin appears under your available tool providers.
26+
27+
<!-- screenshot: Dify plugin marketplace showing MCP Server plugin -->
28+
29+
## Configure the Tool Provider
30+
31+
1. Go to **Tools** in the left sidebar and click **Add Tool Provider**.
32+
2. Select the **MCP Server** plugin.
33+
3. Enter the connection details:
34+
- **Server URL:** `http://localhost:8080` (or your daemon's address)
35+
- **Transport:** Streamable HTTP
36+
4. Click **Test Connection** to verify, then **Save**.
37+
38+
<!-- screenshot: Dify tool provider configuration form -->
39+
40+
Once connected, Dify imports the seven AgentAnycast tools automatically. They
41+
appear as usable tools in both Agent and Workflow modes.
42+
43+
## Example: Agent Mode
44+
45+
Create a new Agent app in Dify and enable the AgentAnycast tools:
46+
47+
1. Go to **Studio** and create a new **Agent** app.
48+
2. Under **Tools**, enable the AgentAnycast tools you need (e.g.,
49+
`discover_agents`, `send_task_by_skill`).
50+
3. In the system prompt, instruct the agent to use these tools for
51+
cross-agent communication.
52+
53+
The agent can now discover and delegate tasks to remote P2P agents as part of
54+
its reasoning loop.
55+
56+
## Example: Workflow Mode
57+
58+
Build a workflow that routes user requests to specialized remote agents:
59+
60+
1. Create a new **Workflow** app.
61+
2. Add nodes in this order:
62+
- **Start** -- receives user input
63+
- **Tool: discover_agents** -- finds agents with a matching skill
64+
- **Tool: send_task_by_skill** -- sends the user's request via anycast
65+
- **Tool: get_task_status** -- polls until the task completes
66+
- **End** -- returns the remote agent's response
67+
68+
<!-- screenshot: Dify workflow canvas with the four-node pipeline -->
69+
70+
3. Connect the nodes and configure each tool's input parameters.
71+
4. Publish and test the workflow.
72+
73+
## Tips
74+
75+
- For self-hosted Dify running in Docker, ensure the AgentAnycast daemon is
76+
reachable from the Dify container (use host networking or expose the port).
77+
- If the MCP plugin is not available in the marketplace, check the
78+
[Dify Plugin Repository](https://github.com/langgenius/dify-plugins) for
79+
manual installation instructions.

docs/integrations/langflow.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Langflow Integration
2+
3+
[Langflow](https://langflow.org) is a visual agent builder by DataStax. This
4+
guide shows how to connect AgentAnycast's MCP Server to Langflow so your
5+
visual agent pipelines can discover and communicate with remote P2P agents.
6+
7+
## Prerequisites
8+
9+
- Langflow instance (v1.1+)
10+
- AgentAnycast installed (see [MCP Server Setup](mcp-setup.md))
11+
12+
## Configure MCP Tools
13+
14+
Langflow supports MCP tool integration through its component system.
15+
16+
### Stdio Mode
17+
18+
1. Open Langflow and create a new flow (or edit an existing one).
19+
2. In the component sidebar, search for **MCP Tools** (under the Tools
20+
category) and drag it onto the canvas.
21+
3. Configure the component:
22+
- **Command:** `agentanycastd --mcp-listen stdio`
23+
4. Langflow launches the daemon and imports the available tools.
24+
25+
### HTTP Mode
26+
27+
Start the MCP Server first:
28+
29+
```bash
30+
agentanycastd --mcp-listen :8080
31+
```
32+
33+
1. Drag an **MCP Tools** component onto the canvas.
34+
2. Configure the component:
35+
- **URL:** `http://localhost:8080`
36+
3. Langflow connects to the running daemon and imports the tools.
37+
38+
<!-- screenshot: Langflow MCP Tools component configuration panel -->
39+
40+
## Example: Chat Agent with P2P Routing
41+
42+
Build a conversational agent that routes questions to specialized remote agents:
43+
44+
1. Add a **Chat Input** component.
45+
2. Add an **Agent** component (connects to your LLM of choice).
46+
3. Add an **MCP Tools** component configured with AgentAnycast (as above).
47+
4. Connect the MCP Tools output to the Agent's tools input.
48+
5. Add a **Chat Output** component.
49+
6. Wire the flow: Chat Input -> Agent -> Chat Output.
50+
51+
<!-- screenshot: Langflow canvas with chat-input, agent, mcp-tools, chat-output -->
52+
53+
With this setup, the agent can call `discover_agents` and `send_task_by_skill`
54+
during its reasoning steps to find and delegate work to remote agents.
55+
56+
## Example: Deterministic Pipeline
57+
58+
For workflows that always follow the same steps, use Langflow's tool-calling
59+
components directly:
60+
61+
1. **Chat Input** -- receives user message
62+
2. **MCP Tools** (discover) -- calls `discover_agents` with a fixed skill
63+
3. **MCP Tools** (send) -- calls `send_task_by_skill` with the user's message
64+
4. **Parse Output** -- extracts the response from the task result
65+
5. **Chat Output** -- displays the result
66+
67+
Connect the components in sequence to create a deterministic routing pipeline
68+
without LLM-driven tool selection.
69+
70+
## Tips
71+
72+
- If the MCP Tools component is not available in your Langflow version,
73+
check the [Langflow documentation](https://docs.langflow.org) for custom
74+
component installation.
75+
- For Langflow running in Docker, use HTTP mode and ensure the daemon port
76+
is accessible from the container network.
77+
- The Agent component works best with models that support tool calling
78+
(GPT-4, Claude, Gemini).

docs/integrations/mcp-setup.md

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# MCP Server Setup
2+
3+
AgentAnycast includes a built-in MCP Server in the Go daemon (`agentanycastd`).
4+
This guide covers setup and configuration common to all platform integrations.
5+
6+
## Prerequisites
7+
8+
Install the Python SDK, which auto-downloads the daemon binary:
9+
10+
```bash
11+
pip install agentanycast
12+
```
13+
14+
Verify the daemon is available:
15+
16+
```bash
17+
agentanycastd --version
18+
```
19+
20+
## Starting the MCP Server
21+
22+
### Stdio Mode
23+
24+
Stdio mode is used by AI IDEs and tools that launch the MCP server as a child process:
25+
26+
```bash
27+
agentanycastd --mcp-listen stdio
28+
```
29+
30+
The daemon reads JSON-RPC from stdin and writes responses to stdout.
31+
32+
### Streamable HTTP Mode
33+
34+
HTTP mode is used by platforms that connect to a remote MCP endpoint:
35+
36+
```bash
37+
agentanycastd --mcp-listen :8080
38+
```
39+
40+
The server listens on `http://localhost:8080` and accepts Streamable HTTP
41+
connections. You can bind to a specific interface:
42+
43+
```bash
44+
agentanycastd --mcp-listen 0.0.0.0:8080
45+
```
46+
47+
## Available Tools
48+
49+
The MCP Server exposes seven tools:
50+
51+
| Tool | Description |
52+
|------|-------------|
53+
| `discover_agents` | Find agents by skill name via DHT and relay registry |
54+
| `send_task` | Send an encrypted task to a remote agent by PeerID |
55+
| `send_task_by_skill` | Anycast routing -- discover and send in one step |
56+
| `get_task_status` | Check the status of a previously sent task |
57+
| `get_agent_card` | Retrieve an agent's capability card (skills, DID, endpoints) |
58+
| `list_connected_peers` | List all currently connected P2P peers |
59+
| `get_node_info` | Get local node info: PeerID, DID (`did:key`), listen addresses |
60+
61+
## IDE Configuration
62+
63+
### Claude Desktop
64+
65+
Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)
66+
or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
67+
68+
```json
69+
{
70+
"mcpServers": {
71+
"agentanycast": {
72+
"command": "agentanycastd",
73+
"args": ["--mcp-listen", "stdio"]
74+
}
75+
}
76+
}
77+
```
78+
79+
### Cursor
80+
81+
Add to `.cursor/mcp.json` in your project root:
82+
83+
```json
84+
{
85+
"mcpServers": {
86+
"agentanycast": {
87+
"command": "agentanycastd",
88+
"args": ["--mcp-listen", "stdio"]
89+
}
90+
}
91+
}
92+
```
93+
94+
### VS Code (Copilot)
95+
96+
Add to `.vscode/mcp.json` in your project root:
97+
98+
```json
99+
{
100+
"servers": {
101+
"agentanycast": {
102+
"type": "stdio",
103+
"command": "agentanycastd",
104+
"args": ["--mcp-listen", "stdio"]
105+
}
106+
}
107+
}
108+
```
109+
110+
### Gemini CLI
111+
112+
Add to `~/.gemini/settings.json`:
113+
114+
```json
115+
{
116+
"mcpServers": {
117+
"agentanycast": {
118+
"command": "agentanycastd",
119+
"args": ["--mcp-listen", "stdio"]
120+
}
121+
}
122+
}
123+
```
124+
125+
## Troubleshooting
126+
127+
**Daemon binary not found:** Ensure the Python SDK is installed (`pip install agentanycast`) and `agentanycastd` is on your `PATH`. The SDK downloads the binary to `~/.agentanycast/bin/`.
128+
129+
**Port already in use (HTTP mode):** Another process is using the port. Choose a different port with `--mcp-listen :9090`.
130+
131+
**Connection refused:** Confirm the daemon is running and the listen address matches your client configuration. For HTTP mode, verify there is no firewall blocking the port.
132+
133+
**Stdio mode produces no output:** Ensure no other process is reading from the same stdin/stdout. Only one client should connect in stdio mode.

0 commit comments

Comments
 (0)