Agent X
AgentX: What Happens When an AI Agent Can See the Connections Between Solana Wallets?
Building a graph-powered investigation agent with Rust, FalkorDB, MCP, and AI.
The problem I wanted to solve
Blockchain transactions are public, but understanding what is happening between wallets is not always straightforward.
Imagine investigating a wallet that has sent funds to another address. That address has interacted with a third wallet, which has eventually transferred funds back into the original network of wallets. Looking at each transaction separately might not reveal the bigger picture.
For a security researcher, the interesting question is not just what happened in one transaction. It is how different wallets are connected, whether those connections form a pattern, and what evidence supports that observation.
That is the idea behind AgentX, an AI-powered investigation agent I built to explore suspicious wallet relationships on Solana.
I wanted to combine graph-based analysis with an AI agent so that investigators could move beyond individual transactions and examine connected wallet activity with a clearer explanation of the evidence.
Explore the Project.
Project repository: https://github.com/Abhishekvenky010/wemakedevs
Demo video: https://www.loom.com/share/12f61a3a4cf84684916209ef059086b7
YouTube video: https://youtu.be/634VNtdjetg
The repository contains the project implementation, while the demo walks through the investigation workflow, graph-based analysis, and risk-report generation.
Why I chose a graph database
One of the most important decisions in AgentX was using FalkorDB as more than a place to store data.
Wallet investigations are naturally about relationships. A wallet connects to another wallet through a transfer, and that wallet may connect to several more. As the investigation expands, these relationships become the most useful part of the data.
In AgentX, wallets are represented as nodes and transfers as directed relationships between them.
This allows the investigation to follow paths across multiple wallets and look for patterns such as circular transfers. Instead of manually piecing together individual records, the backend can query the graph for connected paths.
FalkorDB is the context layer that makes these relationships available to the agent. The goal is for the graph to drive the investigation, rather than simply display information collected somewhere else.
How AgentX works
The project brings together blockchain data collection, graph queries, an AI agent, and an evidence-backed reporting workflow.
1. Start with a Solana wallet
The investigation begins with a wallet address. AgentX validates the address and attempts to retrieve its transaction history through Solana RPC services.
When transaction data is available, the next step is to explore counterparties and expand the investigation across connected wallets.
This is also where the first practical challenge appears: not every wallet provides enough accessible history for a complete investigation, and data providers can impose rate limits.
2. Build relationships in FalkorDB
The collected transfer information is represented in FalkorDB as a graph of wallets and their relationships.
Once the data is available, graph queries can follow connected paths and search for circular patterns. This is useful because a suspicious relationship may only become visible after following several transfers.
For example, AgentX explores paths that return to their starting wallet after multiple transfers.
The important part is not simply finding a cycle. It is identifying the wallets and relationships that form it, so the result can be examined as evidence rather than accepted as an unexplained risk score.
3. Give the AI agent access to graph investigations
AgentX uses MCP tools to connect the AI agent to the investigation workflow.
Instead of asking the language model to infer every wallet relationship from a block of text, the agent can use structured tools to retrieve relevant graph information.
The backend is built with Rust and Axum, FalkorDB handles graph-based investigation, and a Qwen model accessed through Groq helps turn the findings into a readable report.
Each component has a different responsibility: the backend coordinates the workflow, the graph provides connected context, and the AI helps communicate what the evidence means.
4. Turn the findings into a report
After the investigation retrieves relevant evidence, AgentX generates a report explaining the patterns found and why they may deserve further review.
The intention is to make the investigation easier to understand, not to let the AI make unsupported accusations.
A useful report should help a researcher answer three questions:
Which wallets and transfers are involved?
What relationship or pattern was identified?
Why might that pattern deserve further investigation?
The evidence should remain central to the explanation.
A closer look: investigating a circular transfer pattern
One of the clearest demonstrations of AgentX uses three connected wallets.
In the synthetic demo dataset, the wallets form a circular transfer pattern. By querying the graph, AgentX can identify the relationship between the wallets and use that result as the basis for an investigation report.
This example illustrates why graph traversal matters. The finding depends on how multiple transfers connect, rather than on treating each transfer as an isolated event.
It also provides a repeatable way to test the investigation and reporting pipeline when live blockchain data is unavailable.
There is an important distinction here: the circular pattern in this demonstration comes from synthetic demo data, not verified evidence of malicious activity on Solana mainnet. It demonstrates the graph investigation workflow, not a confirmed real-world fraud case.
A circular transfer pattern is a potential risk indicator. It is not proof of wrongdoing.
The hardest part was not just the AI
One of the practical challenges was retrieving enough live transaction data to carry an investigation forward.
During testing, some wallet histories returned limited data, and provider rate limits interrupted parts of the workflow. In some cases, the system could not obtain the transaction signatures needed to expand the investigation as intended.
A note on data sources
AgentX is designed to investigate Solana wallet activity using live blockchain data. During testing, some investigations were limited by transaction-history availability and RPC provider rate limits. To demonstrate the graph traversal and report-generation workflow independently of those limitations, I used synthetic demo data. The circular-transfer example shown in this article is synthetic and should not be interpreted as a finding about real Solana wallets.
That exposed an important difference between building a graph query that works and building an investigation pipeline that can reliably obtain the data the query needs.
An engineering lesson
One challenge during development was getting the graph query and report-generation pipeline to work reliably together. Testing with synthetic graph data helped me examine the investigation logic separately from live RPC availability. This highlighted the importance of keeping graph evidence separate from AI-generated explanations, so that the final report remains grounded in the information the system actually retrieves.
I used synthetic demo data to exercise the graph and report-generation path independently of those external data limitations. This made it possible to demonstrate the circular-pattern investigation without presenting simulated activity as live blockchain evidence.
The experience also reinforced a lesson about AI-assisted security tools: a report is only as reliable as the evidence supplied to it. If the data is incomplete, the system needs to communicate that limitation instead of making its conclusions sound more certain than they are.
Why this project fits the idea of context for AI agents
An AI model can describe blockchain concepts, but describing a wallet relationship is different from actually retrieving and tracing that relationship.
AgentX explores how a graph can provide the missing context. Wallets and transfers are connected in a form that the agent can query, allowing the investigation to focus on relationships that span multiple steps.
MCP provides a structured way for the agent to use investigation tools, while the graph supplies the connected data needed to support its findings.
For me, the most important design principle is that the graph should influence what the agent investigates and reports. It should not be a decorative layer added after the AI has already made its decision.
That is the idea I wanted to explore with FalkorDB.
What I would improve next
There are several areas I would like to develop further:
More reliable live-data collection: improve transaction retrieval, pagination, retries, and handling of RPC rate limits.
A visual investigation interface: let researchers explore wallet connections, transfer paths, and circular patterns interactively.
Investigation history: preserve previous findings and compare them with new investigations to provide more useful context.
Stronger evidence reporting: show the relevant paths, data sources, missing information, and limitations behind each finding.
Better validation: test the graph queries and report generation against a broader set of known and synthetic transaction patterns.
These improvements would help move the project from a working investigation prototype toward a more reliable tool for researchers.
Final thoughts
Building AgentX gave me an opportunity to explore a practical question: can an AI agent investigate complex blockchain relationships more effectively when it has a graph to work with?
The project combines Solana data retrieval, FalkorDB graph queries, MCP tools, and AI-generated explanations to explore that idea.
The circular-transfer demonstration shows how connected wallet paths can be identified and turned into an understandable report. The challenges with live data also show why reliable evidence collection and transparent limitations matter just as much as the AI itself.
AgentX is a step toward making blockchain investigations easier to explore and explain. Its purpose is not to declare a wallet guilty, but to help researchers identify patterns, examine the underlying evidence, and decide what deserves a closer look.
That is what I find most interesting about graph-powered AI agents: they can make relationships easier to investigate without removing the need for human judgment.
AgentX is a prototype for investigation and research. Its findings indicate patterns that may warrant further review; they do not establish malicious intent. The completeness of any investigation depends on the transaction data available.




Comments
Post a Comment