Skip to content

Feat: Introduce Graph-Based Context Indexing for Multi-Agent Shared Memory #1538

Description

@FenjuFu

Motivation

With the rise of Graphify-Labs/graphify trending today, the community is clearly shifting towards structured context management for complex AI tasks. graphify demonstrates the value of converting codebases into queryable knowledge graphs to solve the "context window limitation" and "memory loss" problems in large-scale projects.

In multi-agent orchestration (our core strength in astron-agent), the current context passing mechanism relies heavily on linear text or flat vector search. As workflows become more complex (e.g., coordinating 3+ agents for code refactoring or financial analysis), agents often lose the "global view" of the project structure or business logic, leading to redundant work or hallucinated dependencies. We need a way to inject structured, graph-aware context into the agent's working memory, not just raw text chunks.

Proposed feature

Add a Graph-Based Context Indexing module to the Astron Agent runtime:

  1. Graph Construction: Integrate a lightweight graph extraction step (similar to graphify's approach) that parses project files, API schemas, or domain documents into a node-edge graph (e.g., using Neo4j or a lightweight in-memory graph like networkx for smaller scopes).
  2. Hybrid Retrieval: When an agent needs to understand a complex task, the system should:
    • First, query the graph for structural relationships (e.g., "Which modules depend on auth-service?").
    • Then, retrieve relevant text chunks based on the graph nodes.
    • Inject this structured context into the agent's prompt as a "Global Context Block" before task execution.
  3. Multi-Agent Shared Knowledge: Allow multiple agents in a workflow to share this graph index, enabling them to "see" the same structural dependencies without re-parsing the codebase.

Why it fits this repo

astron-agent is positioned as an enterprise-grade SuperAgent platform. Enterprise workflows often involve large codebases or complex business logic where structural understanding is critical. By adopting the "structured context" paradigm highlighted by graphify, we can significantly improve the reliability of long-horizon multi-agent tasks, reducing errors caused by context fragmentation.

This feature complements existing Role-Based SuperAgent Orchestration by adding a cognitive layer to the orchestration, ensuring agents have a shared, structured understanding of the domain.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions