Metacontext is an AI-native, multi-agent system that builds and maintains a centralized knowledge hub from your organization’s code, design documents, and expert insights. It helps gather scattered information, break down silos, preserve tacit knowledge, maintain living documentations, avoid unnecessary meetings, and translate complexity with agentic personas.
🚧 This is a work in progress, currently undergoing research and prototyping
This component continuously ingests multimodal data from various sources. It parses the raw data, extracts structured data, chunks the data, creates vector and graph embeddings, and stores them in Metacontext Nexus.
Examples of ingested data include repository maps and source code, Jira issues, Confluence pages, conversations from public Slack channels, and meeting summaries from video conferencing platforms like Teams.
This component consists of vector and graph databases. It contains sparse and dense vector embeddings, along with a property graph of the nodes and relationships derived from the ingested data. It provides an API to query the data and perform a hybrid search via graph traversal, semantic retrieval, and lexical matching.
Metacontext Nexus enables Metacontext Agent to perform Retrieval Augmented Generation (RAG) and GraphRAG, which are essential techniques for finding relevant information and answering complex questions through multi-hop reasoning and retrieval.
This component fetches Git repositories and continuously pulls code changes. It provides an API to list and read contents of repositories, as well as to perform single and cross-repository regular expression (regex) searches.
Metacontext CodeVault enables Metacontext Agent to quickly find and retrieve relevant repositories, files, and code snippets. This significantly enhances context quality by allowing Agent to make tool calls to explore repositories and translate user queries into regex patterns.
You may alternatively use the MCP server provided by your code management platform. However, not all platforms natively support cross-repository and regex code search.
This component provides a Model Context Protocol (MCP) server. It enables Metacontext Agent, agentic tools like coding assistants, and any Large Language Model (LLM) capable of tool calling combined with an MCP client to discover Metacontext's capabilities and query its data.
This component is the main interface between Metacontext and end users. It provides a web application with a chat interface, conversation history, user-defined MCP integrations, and customized agent personas for different end users.
Metacontext Agent also features a workflow-based runtime, allowing it to be used in communication and conferencing platforms via Metacontext MCP. The runtime has a durable execution engine, ensuring fault-tolerance, and supporting long-running workflows with persistent memory.
This project is meant to be vendor agnostic and may be implemented using any tech stack that offers the features required for building the components.
There are currently two planned implementations: a prototype and an extended implementation.
Status: in progress
This implementation serves as a prototype and minimum viable product (MVP) of Metacontext. It is designed to be easy to set up and get started.
- n8n workflow automation platform for component orchestration and agent management
- graphiti framework for building real-time knowledge graphs for AI agents
- Neo4j graph database for building property graphs and GraphRAG
Status: technical refinement
This implementation is designed with scalability, performance, and flexibility in mind. It is relatively more complex to set up and is intended for production use.
The following tech stack is proposed, but is subject to change:
- Frameworks and libraries
- Strands Agents, LangGraph, or CrewAI for multi-agent orchestration and the MCP server
- LiteLLM for a unified interface to access more than 100 LLMs
- LlamaIndex for data ingestion, structured data extraction, and creating embeddings
- Zoekt for repository indexing and a fast trigram based code search with regular expression support
- FastAPI for building APIs with OpenAPI documentation
- FastMCP for building an MCP server
- Chainlit for the agent's conversational UI
- Databases and event streaming
- Qdrant vector database for hybrid RAG with semantic and full-text searches
- Neo4j graph database for building property graphs and GraphRAG
- Apache Kafka or Redis for streaming events and serving as the communication backbone of the system
- Workflow engine
- Infrastructure
- Docker Compose and Kubernetes for local and cloud deployments
- OpenTelemetry and Jaeger for observability and distributed tracing
- Prometheus and Grafana for metrics and monitoring
- Elasticsearch, Logstash, and Kibana for log aggregation and inspection
The external service and databases showcased here were chosen to resemble a hypothetical setup. Metacontext is designed to work with any data source. Feel free to open a pull request to integrate Metacontext with your preferred external services.
Start by choosing one of the provided implementations, inspect its docker-compose.yml, and adjust the configuration options as needed.
Once ready, start Metacontext by running:
docker compose upArchitected and implemented by Mohammad Tomaraei
All product names, logos, and brands mentioned or depicted are property of their respective owners. Use of these marks does not imply endorsement or affiliation. The project's names and logos are AI-generated. Any resemblance to existing trademarks, brands, or entities is purely coincidental and unintentional.