Skip to content

GML-2370 feat(deepagent): Run Agent mode on a Deep Agent with on-prem memory; - #74

Merged
chengbiao-jin merged 7 commits into
release_2.1.0from
GML-2370-deep-agent
Nov 14, 2026
Merged

chengbiao-jin merged 7 commits into
release_2.1.0from
GML-2370-deep-agent

Conversation

@chengbiao-jin

@chengbiao-jin chengbiao-jin commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Agent mode answers with one LangChain Deep Agent instead of the triage / planner / executor / synthesizer pipeline (GML-2370)
    • The agent decides whether it needs tools, plans questions with several parts with a to-do list, and hands focused research to a graph subagent and a document subagent
    • Tools: GraphRAG schema, query generation and retrievers; read-only TigerGraph lookups and installed queries; the graph's MCP tools. All run as the signed-in user
    • Answers keep the existing response shape, with citations and the tool calls in the Trace
  • Conversation memory and per-user long-term memory, kept per graph in a SQLite file under configs/graph_data/<graph>/, with no extra volume
  • Agent API: /{graph}/agent/chat, /agent/tools, /agent/threads, /agent/memories, also routed through nginx on port 80
  • agent_engine selects the engine: "default" (used when unset, currently the Deep Agent), "deepagent" or "legacy"
  • README documents the Deep Agent, agent memory, the agent API and the new settings
  • Adds the deepagents license and corrects the license list

Contract change: Agent mode, on the existing chat and query endpoints too, now runs the Deep Agent by default. The Planned / Reactive styles run only with agent_engine: "legacy".

Overlap: #71 (GML-2193) also adds short-term and long-term agent memory, with a different store. The two need to be reconciled before both merge.

Verification

27 Deep Agent unit tests pass in the graphrag image with deepagents 0.7.32 installed. The engine setting and the per-graph memory files were not run against a live instance.

Agent mode now answers each question with a single LangChain Deep Agent
(deepagents.create_deep_agent on LangGraph) instead of the triage /
planner / executor / synthesizer pipeline. The model decides whether tools
are needed, plans with write_todos, delegates to graph-analyst and
document-researcher subagents, and returns a structured DeepAgentAnswer.

Tools (graphrag/app/deep_agent/tools.py), run as the logged-in user:
- GraphRAG: get_graph_schema, query_graph (MapQuestionToSchema +
  GenerateFunction, GenerateCypher fallback), hybrid/similarity/
  contextual/community search over the existing retrievers
- TigerGraph (read-only pyTigerGraph): vertex/edge counts, vertex and
  edge lookups, list/run installed queries (GraphRAG maintenance and
  mutating-named queries blocked), read-only openCypher when USE_CYPHER
- MCP add-on tools configured for the graph

Memory (graphrag/app/deep_agent/memory.py):
- STM: LangGraph checkpointer, thread per graph:user:conversation
- LTM: LangGraph store routed at /memories/ (per user and graph),
  /memories/AGENTS.md loaded into every conversation
- SQLite by default, Postgres optional, in-memory fallback; token logins
  that do not identify a user keep no memory

REST: /{graph}/agent/chat, /agent/tools, /agent/threads, /agent/memories.
Existing chat and query endpoints use the Deep Agent in Agent mode;
graphrag_config.agent_engine="legacy" restores the previous engine.
Knowledge-graph creation, ingestion and the Classic engine are unchanged.
…ther agents

nginx (configs/nginx.conf, a symlink to docs/tutorials/configs/nginx.conf) forwards
/{graph}/agent/{chat,tools,threads,memories} to the backend with a 600 s read
timeout, so external callers can use port 80. docs/DeepAgent.md gains
instructions, a tool definition and examples for agents that call
/{graph}/agent/chat.
The Agent mode engine setting had no stable name for the default engine, and the Deep Agent was documented in a separate file outside the README.

- Agent mode engine is "default", "deepagent" or "legacy"; "default" is used when the setting is absent
- "deepagent" keeps selecting the Deep Agent if the default engine changes
- README describes the Deep Agent, agent memory, the agent API and its settings
- Planned / Reactive settings are marked as legacy-engine only
- Remove the separate Deep Agent document
The license list did not include deepagents, and its counts and entries did not match the license files that ship with GraphRAG.

- Add the deepagents MIT license
- List exactly the license files in the folder, with correct counts
- State that one dependency uses the GNU AGPL 3.0, the same license as GraphRAG
Agent memory was lost when a container was recreated in deployments without a separate data volume.

- Store each graph's conversations and memories in its own file under configs
- Remove the extra data volume and the memory environment variables
- Remove the unused Postgres memory option
- Describe the change in the README and CHANGELOG for users and operators

Refs: GML-2370
In the container, conversations and memories were kept only until restart.

- Open the memory file at its real location on the configs volume

Refs: GML-2370

@prinskumar-tigergraph prinskumar-tigergraph left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested the branch , does not any real bug
approved

@chengbiao-jin
chengbiao-jin merged commit 41dc685 into release_2.1.0 Nov 14, 2026
@chengbiao-jin
chengbiao-jin deleted the GML-2370-deep-agent branch November 14, 2026 01:36
@chengbiao-jin chengbiao-jin changed the title GML-2370 Run Agent mode on a Deep Agent with on-prem memory GML-2370 feat(deepagent): Run Agent mode on a Deep Agent with on-prem memory; Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants