flare-ai-kit icon indicating copy to clipboard operation
flare-ai-kit copied to clipboard

[GraphRAG] Implement Query Engine and AI Agent connectors for Contextual Graph Queries

Open dineshpinto opened this issue 7 months ago • 6 comments

  • Description: Develop a query engine that utilizes Neo4j's Cypher query language to support complex, context-aware queries against the structured Flare transaction data. An API layer should be provided to allow AI agents to easily execute these queries and retrieve historical context or relationship information. For example, agents should be able to query for "all transactions related to account X in the past Y days" or "contracts that interacted with contract Z." Integrate the GraphRAG engine directly with the AI agent's reasoning module. This integration will empower agents to query the Neo4j graph database during their decision-making processes, allowing them to incorporate rich, structured historical transaction context.
  • Acceptance Criteria:
    • A set of common and useful Cypher queries is defined and implemented to retrieve insightful contextual information from the graph database.
    • An API (e.g., RESTful endpoints or SDK methods) is exposed, allowing AI agents to execute these Cypher queries or parameterized variations of them.
    • The query engine and API are designed with consideration for performance and scalability.
    • AI agents built with the Flare AI Kit can seamlessly call the GraphRAG query API (developed in Issue 17).
    • Data retrieved from the graph database (e.g., transaction histories, account relationships) can be easily incorporated into the agent's operational context and used in its reasoning process.
    • The integration supports real-time (or near real-time) contextual augmentation of agent capabilities based on blockchain transaction history.
  • Key Files/Modules Involved (Tentative):
    • flare_ai_kit/rag/graph/engine.py (New file to be created)
  • Tasks / Implementation Steps:
    • [ ] Create Key files
    • [ ] Use Neo4j's Cypher query language to allow AI agents to craft queries to retrieve historical context or relationship information.

dineshpinto avatar May 07 '25 11:05 dineshpinto

Hi! I’d love to tackle this. I’ll build a performant Cypher-based query engine with a simple API layer to let agents fetch contextual data like transactions or contract interactions. The GraphRAG engine will integrate seamlessly with agent reasoning, enabling real-time, structured insights from Neo4j into decision-making.

Nomolos29 avatar Jul 03 '25 15:07 Nomolos29

Hi, I'm Superior! I'm an experienced frontend developer with a strong background in React/Next.js and TypeScript, plus deep Web3 experience in Solidity, Cairo and Rust through my work with Web3Bridge. Having contributed to projects like CoinSafe and Scaffold-ETH, I'm confident I can jump right in and tackle this issue. My approach is straightforward: I'll start by diving into the codebase to understand the core problem, then implement a clean and thoroughly tested solution. I'll communicate proactively if any questions come up and will submit a well-documented PR for your review. Looking forward to contributing!

Superior212 avatar Jul 03 '25 16:07 Superior212

Hi maintainers,

I’m a Full Stack Data Scientist with experience building RAG pipelines and working with graph databases like Neo4j. I’ve previously implemented Cypher-based query systems to extract contextual insights and feed them into LLM workflows.

For this task, I plan to: • Design a query engine to handle common Cypher queries for account/contract interactions • Build an API layer to expose these queries for AI agents • Ensure the engine is optimized for scalability and low-latency usage in reasoning loops

I’ve worked with agent-based systems and structured data retrieval, and I’m confident I can deliver a clean and modular implementation.

Thanks, Amin Zayer GitHub: https://github.com/aminzayer LinkedIn: https://www.linkedin.com/in/aminzayeromali/

aminzayer avatar Jul 03 '25 17:07 aminzayer

Hi, my name is Godswill Idolor also know as Gwill. I am a blockchain engineer with 2 years of experience in backend and frontend and also part of the OD fellowship program. My experience in both frontend and backend enables me to carry out a wide variety of tasks to achieve set goals. I would really love to participate in the project with this issue.. please assign me

Recommended by OnlyDust for exceptional experience, quality, and reliability.

big14way avatar Jul 26 '25 02:07 big14way

I have vast experience building intelligent and backend services with python. With a blockchain dev background that spans Solidity and Rust DSLs, as well as defi, I am confident in delivering a high-quality PR that meets all requirements.

Kindly assign me.

Anuoluwapo25 avatar Jul 29 '25 22:07 Anuoluwapo25

Hello.... I am Bernard, a contributor to the Flare AI Kit, and I am excited to apply for the Neo4j query engine development project. I am confident in creating a robust query engine that supports complex, context-aware queries against structured Flare transaction data.

My plan :

  1. Developing a set of useful Cypher queries.
  2. Designing a scalable API layer for AI agents.
  3. Ensuring seamless integration with the GraphRAG engine.

Recommended by OnlyDust for outstanding experience and quality contributions.

bernardev254 avatar Jul 30 '25 06:07 bernardev254