Feature Request: Add Support for Neo4j as an Alternative Database Backend for Knowledge Management
Currently, Archon relies on Supabase with PostgreSQL and PGVector for its database needs, including vector search and contextual embeddings for knowledge retrieval and RAG strategies. While this works well for many use cases, it limits flexibility for users who prefer or require graph-based databases, especially in scenarios involving complex relationships between knowledge entities (e.g., hierarchical tasks, interconnected documentation, or semantic networks in AI-assisted coding).
Add support for Neo4j as an alternative database backend. This would allow users to configure Archon to use Neo4j for storing and querying knowledge graphs, tasks, and embeddings. Ideally, this could be implemented via a configurable database abstraction layer, enabling seamless switching between Supabase/PostgreSQL and Neo4j (or even other future backends) through environment variables or config files.
Key benefits:
-
Graph Capabilities: Neo4j excels at handling relationships, which could enhance features like hierarchical project management, task dependencies, and advanced RAG queries over interconnected data.
-
Flexibility: Users with existing Neo4j setups (common in enterprise AI/knowledge graph applications) could integrate Archon more easily.
-
Performance: For graph-heavy workloads, Neo4j might offer better query performance compared to relational vector extensions.
Additional context
-
Neo4j supports vector embeddings via plugins like APOC or native features in recent versions, making it compatible with Archon's RAG and search needs.
-
Implementation could start with migrating the SQL schemas to Cypher queries and updating the server/agents services to handle Neo4j connections (e.g., using the official Python driver: neo4j library).
-
Setup would require users to provide Neo4j credentials in the .env file, similar to Supabase (e.g.,
NEO4J_URI,NEO4J_USERNAME,NEO4J_PASSWORD,NEO4J_DATABASE). -
For reference, Neo4j documentation on Python integration: https://neo4j.com/docs/python-manual/current/.
This feature would make Archon more versatile as a backbone for AI coding assistants.
+1
Thanks for the suggestion @SynurDevelopers - we are actually already cooking up some things behind the scenes using knowledge graphs (Neo4j)!
Thanks for the suggestion @SynurDevelopers - we are actually already cooking up some things behind the scenes using knowledge graphs (Neo4j)!
Fantastic! Looking forward to seeing what you implemented! Excited! 🙌
would really like to be able to just BYODB rather than being forced into a choice between supabase or neo4j.
If you're taking ideas for feature requests, I think you default to a defacto solution, but have the ability to customise it for power users like ghosttigerlic.
If you're taking ideas for feature requests, I think you default to a defacto solution, but have the ability to customise it for power users like ghosttigerlic.
sorry, that's absolutely what I was suggesting. I didnt mean to imply "Whelp, solve your own DB solution." but more so something similar to API Providers: Here's a dropdown, select which DB you're using or: here's a barebones configuration of what ARCHON requires you to hook up if you want to BYBO, but its unsupported and you're on your own using anything outside of the recommended DB solutions.
I know what im trying to do is a bit... unorthodox. But hey, we do these things for two reasons right? To make money and/or... because we're a crazy little mad scientists and want to see what happens!
Perhaps we can think about providing an adapter pattern for supporting graph databases, as I prefer SurrealDB over Neo4J, etc. with the provider pattern discussed in the last message?