Skip to content
Open
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
363 changes: 363 additions & 0 deletions a2as.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,363 @@
manifest:
version: "0.1.3"
schema: https://a2as.org/cert/schema
subject:
name: graphrag/graphrag-chat
source: https://github.com/graphrag/graphrag-chat
branch: main
commit: "19dd8c59"
scope: [graphrag_chat/agent.py, graphrag_chat/memory/multi_memory_delegate.py, graphrag_chat/models.py, graphrag_chat/neo4j_for_adk.py,
graphrag_chat/prompts.py, graphrag_chat/sub_agents/__init__.py, graphrag_chat/sub_agents/agent_smith/agent.py, graphrag_chat/sub_agents/agent_smith/prompts.py,
graphrag_chat/sub_agents/agent_smith/tools.py, graphrag_chat/sub_agents/cypher_agent/agent.py, graphrag_chat/sub_agents/cypher_agent/prompts.py,
graphrag_chat/sub_agents/cypher_agent/tools.py, graphrag_chat/tools.py]
issued:
by: A2AS.org
at: '2026-02-11T16:40:07Z'
url: https://a2as.org/certified/agents/graphrag/graphrag-chat
signatures:
digest: sha256:UgNaaQY_DzT6Gzhs-beJcX-GWkFLIZvon5jdnA8Os0U
key: ed25519:7J5PHT7mUumqoGqK8ksW8ZuPs0F5bS4lUXJFPu4fX50
sig: ed25519:NaTfsR8OXHFkg1WAdoqoIYrGxpsN1kGQkuFIRMbo9r4he7yjEzZtvMqlg61aKNEeAaW6rjBennJdWh3qvGyNDw

agents:
agent_smith:
type: instance
models: [MODEL_OPENAI_CHAT]
tools: [search_memory]
params:
name: agent_smith_v1
description: Provides acccess to a Neo4j database through Cypher queries.
instruction: return_instructions_agent_smith()
cypher_agent:
type: instance
models: [MODEL_OPENAI_CHAT]
tools: [list_graphs, refresh_graphs, graph_is_ready, get_physical_schema, read_neo4j_cypher, write_neo4j_cypher]
params:
name: cypher_agent_v1
description: Provides acccess to a Neo4j database through Cypher queries.
instruction: return_instructions_cypher()
graphrag_chat_agent:
type: instance
models: [MODEL_OPENAI_CHAT]
tools: [set_speaker, get_speaker, add_memory, search_memory]
params:
name: graphrag_chat_agent_v1
description: Hosts a chat among multiple sub-agents, each with unique identities and knowledge.
instruction: return_instructions_root()
before_agent_callback: setup_before_agent_call
sub_agents: [cypher_agent, agent_smith]

models:
MODEL_OPENAI_CHAT:
type: function
agents: [cypher_agent, agent_smith, graphrag_chat_agent]
params:
wrapper: LiteLlm
model: by_role[chat]

tools:
add_memory:
type: function
agents: [graphrag_chat_agent]
get_physical_schema:
type: function
agents: [cypher_agent]
params:
description: |-
Tool to get the physical schema of a Neo4j graph database.

Args:
graph_name: The name of the Neo4j graph to get the schema for.

Returns:
The schema is returned as a JSON object containing a description
of the node labels and relationship types.
get_speaker:
type: function
agents: [graphrag_chat_agent]
graph_is_ready:
type: function
agents: [cypher_agent]
params:
description: |-
Tool to check that the named Neo4j graph is ready.
Replies with either a positive message about the database being ready or an error message.

Args:
graph_name: The name of the Neo4j graph to check.
list_graphs:
type: function
agents: [cypher_agent]
params:
description: "Lists available named Neo4j graphs.\n "
read_neo4j_cypher:
type: function
agents: [cypher_agent]
params:
description: |-
Submits a Cypher query to read from a Neo4j database.

Args:
database: The name of the Neo4j database to query.
query: The Cypher query string to execute.
params: Optional parameters to pass to the query.

Returns:
A list of dictionaries containing the results of the query.
Returns an empty list "[]" if no results are found.
refresh_graphs:
type: function
agents: [cypher_agent]
params:
description: "Refreshes the known Neo4j connections.\nThis can be useful to re-establish connections \nwhich have dropped\
\ or failed."
search_memory:
type: function
agents: [agent_smith, graphrag_chat_agent]
params:
description: Prototyping purpose only.
set_speaker:
type: function
agents: [graphrag_chat_agent]
params:
description: "Sets the current human spaker participating in the chat.\n "
write_neo4j_cypher:
type: function
agents: [cypher_agent]
params:
description: |-
Submits a Cypher query to write to a Neo4j database.
Make sure you have permission to write before calling this.

Args:
database: The name of the Neo4j database to query.
query: The Cypher query string to execute.
params: Optional parameters to pass to the query.

Returns:
A list of dictionaries containing the results of the query.
Returns an empty list "[]" if no results are found.

teams:
graphrag_chat_agent:
type: hierarchy
agents: [graphrag_chat_agent, cypher_agent, agent_smith]

imports:
ABC: abc.ABC
abstractmethod: abc.abstractmethod
add_memory: tools.add_memory
agent: agent
Agent: google.adk.agents.Agent
agent_smith: sub_agents.agent_smith
Any: typing.Any
by_role: models.by_role
CallbackContext: google.adk.agents.callback_context.CallbackContext
cypher_agent: sub_agents.cypher_agent
Dict: typing.Dict
Event: google.adk.events.Event
get_physical_schema: tools.get_physical_schema
get_speaker: tools.get_speaker
get_structured_schema: neo4j_graphrag.schema.get_structured_schema
graph_is_ready: tools.graph_is_ready
GraphDatabase: neo4j.GraphDatabase
GraphMemoryService: graph_memory_service.GraphMemoryService
InMemoryService: graphrag_chat.memory.in_memory.InMemoryService
is_write_query: graphrag_chat.neo4j_for_adk.is_write_query
json: json
List: typing.List
list_graphs: tools.list_graphs
LiteLlm: google.adk.models.lite_llm.LiteLlm
MemoryResult: google.adk.memory.base_memory_service.MemoryResult
MultiMemoryDelegate: graphrag_chat.memory.multi_memory_delegate.MultiMemoryDelegate
Neo4jGraphCatalog: neo4j_for_adk.Neo4jGraphCatalog
Node: neo4j.graph.Node
Optional: typing.Optional
os: os
Path: neo4j.graph.Path
re: re
read_neo4j_cypher: tools.read_neo4j_cypher
Record: neo4j.Record
refresh_graphs: tools.refresh_graphs
Relationship: neo4j.graph.Relationship
Result: neo4j.Result
return_instructions_agent_smith: prompts.return_instructions_agent_smith
return_instructions_cypher: prompts.return_instructions_cypher
return_instructions_root: prompts.return_instructions_root
search_memory: tools.search_memory
SearchMemoryResponse: google.adk.memory.base_memory_service.SearchMemoryResponse
Session: google.adk.sessions.Session
set_speaker: tools.set_speaker
time: neo4j.time
tool_error: graphrag_chat.neo4j_for_adk.tool_error
tool_success: graphrag_chat.neo4j_for_adk.tool_success
ToolContext: google.adk.tools.ToolContext
ToolResult: graphrag_chat.neo4j_for_adk.ToolResult
TypedDict: typing.TypedDict
Union: typing.Union
write_neo4j_cypher: tools.write_neo4j_cypher

functions:
__init__:
type: sync
module: graphrag_chat.neo4j_for_adk
args: [self, settings]
__new__:
type: sync
module: graphrag_chat.memory.in_memory
args: [cls]
_refresh:
type: sync
module: graphrag_chat.neo4j_for_adk
args: [self]
add_memory:
type: sync
module: graphrag_chat.tools
args: [tool_context]
params:
returns: Dict
get_direct_driver:
type: sync
module: graphrag_chat.neo4j_for_adk
args: [self]
get_graphdb:
type: sync
module: graphrag_chat.neo4j_for_adk
args: [cls, graph_name]
params:
returns: Neo4jForADK
get_instance:
type: sync
module: graphrag_chat.neo4j_for_adk
args: [cls]
params:
returns: Neo4jGraphCatalog
get_physical_schema:
type: async
module: graphrag_chat.sub_agents.cypher_agent.tools
args: [graph_name]
params:
returns: Dict
get_speaker:
type: sync
module: graphrag_chat.tools
args: [tool_context]
params:
returns: str
graph_is_ready:
type: async
module: graphrag_chat.sub_agents.cypher_agent.tools
args: [graph_name]
initialize:
type: sync
module: graphrag_chat.neo4j_for_adk
args: [cls, settings]
is_write_query:
type: sync
module: graphrag_chat.neo4j_for_adk
args: [query]
params:
returns: bool
list_graphs:
type: async
module: graphrag_chat.sub_agents.cypher_agent.tools
params:
returns: List[str]
make_driver:
type: sync
module: graphrag_chat.neo4j_for_adk
args: [neo4j_settings]
read_neo4j_cypher:
type: async
module: graphrag_chat.sub_agents.cypher_agent.tools
args: [database, query, params]
params:
returns: ToolResult
refresh:
type: sync
module: graphrag_chat.neo4j_for_adk
args: [cls]
refresh_graphs:
type: async
module: graphrag_chat.sub_agents.cypher_agent.tools
result_to_adk:
type: sync
module: graphrag_chat.neo4j_for_adk
args: [result]
params:
returns: Dict
return_instructions_agent_smith:
type: sync
module: graphrag_chat.sub_agents.agent_smith.prompts
params:
returns: str
return_instructions_cypher:
type: sync
module: graphrag_chat.sub_agents.cypher_agent.prompts
params:
returns: str
return_instructions_root:
type: sync
module: graphrag_chat.prompts
params:
returns: str
search_memory:
type: sync
module: graphrag_chat.sub_agents.agent_smith.tools
args: [query, tool_context]
params:
returns: SearchMemoryResponse
send_query:
type: sync
module: graphrag_chat.neo4j_for_adk
args: [self, cypher_query, parameters]
params:
returns: ToolResult
set_speaker:
type: sync
module: graphrag_chat.tools
args: [name, tool_context]
params:
returns: str
setup_before_agent_call:
type: sync
module: graphrag_chat.agent
args: [callback_context]
to_python:
type: sync
module: graphrag_chat.neo4j_for_adk
args: [value]
tool_error:
type: sync
module: graphrag_chat.neo4j_for_adk
args: [message]
tool_success:
type: sync
module: graphrag_chat.neo4j_for_adk
args: [result]
write_neo4j_cypher:
type: async
module: graphrag_chat.sub_agents.cypher_agent.tools
args: [database, query, params]
params:
returns: ToolResult

variables:
GEMINI_API_KEY:
type: env
params:
caller: [os.environ.get]
path: [graphrag_chat.agent]
OPENAI_API_KEY:
type: env
params:
caller: [os.environ.get]
path: [graphrag_chat.agent]

files:
neo4j.json:
type: literal
actions: [read]
params:
caller: [open, json.load]
alias: [f]