Skip to content

Metacontext is an AI-native, multi-agent system that centralizes knowledge from code, docs, and expert insights. It breaks silos, preserves tacit knowledge, maintains living docs, reduces meetings, and translates complexity through agentic personas.

License

Notifications You must be signed in to change notification settings

themreza/Metacontext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metacontext - Agentic Knowledge Hub

Metacontext

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

System Architecture

Metacontext System Architecture

Components

Metacontext Ingest

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.

Metacontext Nexus

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.

Metacontext CodeVault

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.

Metacontext MCP

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.

Metacontext Agent

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.

Implementations

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.

Prototype

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

Extended

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
    • Temporal or Restate for durable execution workflows and orchestrating data ingestion pipelines
  • Infrastructure

External Services

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.

Getting Started

Docker Compose

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 up

Author

Architected and implemented by Mohammad Tomaraei

Mohammad Tomaraei

Disclaimer

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.

About

Metacontext is an AI-native, multi-agent system that centralizes knowledge from code, docs, and expert insights. It breaks silos, preserves tacit knowledge, maintains living docs, reduces meetings, and translates complexity through agentic personas.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published