Interactive Agentic Knowledge Graph

Where Nodes and Relationships Trigger Agentic Actions

Google A2A Anthropic MCP

Overview

This is an interactive agentic knowledge graph example built with Spring Boot, demonstrating how AI agents can interact with graph structures. Each node and each relationship in the graph can trigger agentic actions through multiple protocols, supporting both Google's Agent-to-Agent (A2A) protocol and Anthropic's Model Context Protocol (MCP). a2ajava is a Swiss Army knife for building agentic applications. It is multi-protocol — works seamlessly with both A2A (Agent-to-Agent) and MCP (Model Context Protocol). It is multi-language — supports Java, Kotlin, and Groovy. It is multi-platform — compatible with Gemini, OpenAI, Claude, and Grok. It is multi-client — includes A2A and MCP clients with connectors in Java, Node, and Python. It offers multi-integration — out-of-the-box support for Selenium, human-in-the-loop workflows, and multi-LLM voting for consensus-based decision making. Agents built using the A2A protocol with a2ajava run seamlessly on MCP as well, ensuring maximum interoperability across platforms.

🕸️ Knowledge Graph

Interactive graph visualization where nodes represent entities and edges represent relationships, all capable of triggering agentic actions.

🤖 Agentic Actions

Each node and relationship query can invoke AI agents to perform actions, retrieve data, or make decisions dynamically.

Architecture

Architecture Diagram

Key Components

  • Graph Structure: Nodes and edges representing knowledge entities and their relationships
  • Agentic Triggers: Interactive queries on nodes and relationships that invoke AI agents
  • Protocol Integration: Support for A2A and MCP protocols for agent communication

Integration Methods

A2A Integration

Agent Card Endpoint:

https://vishalmysore-a2amcpspring.hf.space/.well-known/agent.json

MCP Integration

MCP Connector Configuration:

{
    "customerservice": {
        "command": "java",
        "args": [
            "-jar",
            "/work/a2a-mcp-bridge/target/mcp-connector-full.jar",
            "https://vishalmysore-a2amcpspring.hf.space/"
        ],
        "timeout": 30000
    }
}

Testing Methods

Local Testing

Access Swagger UI at:

http://localhost:7860/swagger-ui/index.html
Demo Environment

Access deployed demo at:

https://vishalmysore-a2amcpspring.hf.space/swagger-ui/index.html

Testing Examples

MCP List Tools:

curl -H "Content-Type: application/json" -d '{
    "jsonrpc": "2.0",
    "method": "tools/list",
    "params": {},
    "id": 1
}' https://vishalmysore-a2amcpspring.hf.space/

MCP Tool Call:

{
    "method": "tools/call",
    "params": {
        "name": "whatThisPersonFavFood",
        "arguments": {
            "provideAllValuesInPlainEnglish": "vishal is coming home what should i cook"
        }
    },
    "jsonrpc": "2.0",
    "id": 17
}