Skip to main content

ragmesh

CI Python 3.12 License: Apache-2.0

Retrieval as a mesh of MCP services — an agentic RAG platform built on LangGraph. A single ReAct-style agent talks to a real MCP retrieval server over the network (not an in-process function call), backed by a local FAISS vector store. Provider-agnostic (Anthropic / OpenAI / Bedrock).

The sample corpus is this repo's own documentation (README.md + project-docs/adr/) — ask it how its own retrieval pipeline works.

Architecture

flowchart LR
    User -->|POST /chat| API[FastAPI agent-api]
    API --> Agent[LangGraph agent using create_agent]
    Agent -->|MCP over streamable-http| MCP[FastMCP retrieval server]
    MCP --> FAISS[FAISS index of local embeddings]
    Docs[README and ADR docs] -->|embedded at image build time| FAISS

agent-api and mcp-server are separate containers on a Docker network — the retrieval tool is a real network service, not a decorated Python function. See project-docs/architecture-rationale.md for the full reasoning behind every structural choice, and project-docs/adr/ for the three closest judgment calls (MCP transport, MCP server library, embeddings/vector store).

Quickstart

cp .env.example .env   # fill in ANTHROPIC_API_KEY (or OPENAI_API_KEY)
docker compose up --build
curl -X POST localhost:8080/chat \
  -H "Content-Type: application/json" \
  -d '{"question": "What MCP transport does ragmesh use, and why?"}'

That's the only secret required — retrieval (embeddings + FAISS) needs no API key at all (see project-docs/adr/0003).

Local development

uv sync --all-extras
uv run pytest tests/unit -v      # hermetic: no network, no model downloads
uv run ruff check .
uv run mypy src

Building the FAISS index locally (outside Docker):

uv run python -m ragmesh.ingest
uv run ragmesh "What transport does ragmesh's MCP server use?"

Project layout

src/ragmesh/
  config.py, llm.py       # env-driven settings, provider-agnostic chat model
  ingest.py, retrieval.py # build + query the FAISS index
  mcp_server/server.py    # FastMCP retrieval server (streamable-http)
  agent.py                # MCP client + LangGraph agent, build-once/cache
  api.py, cli.py          # FastAPI POST /chat, thin CLI
project-docs/
  adr/                    # architecture decision records
  architecture-rationale.md, developer-guide.md
tests/unit/                # hermetic, fake models/embeddings
tests/integration/         # opt-in: real docker compose + live LLM key

Metadata

Release files for ragmesh 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ragmesh 0.1.0
File Size Uploaded
ragmesh-0.1.0.tar.gz 319.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ragmesh 0.1.0
File Interpreter ABI Platform
ragmesh-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 332.1 kB

Release files / ragmesh-0.1.0.tar.gz

Download URL ragmesh-0.1.0.tar.gz
Size 319.8 kB
Tags Source
SHA-256 checksum
How to use checksums
228c8938b94755251fae9e6f7472ec4245a138ec0af0dbc6cca3cb7f1f9f1269
BLAKE2b-256 checksum
How to use checksums
f4fb43539cfbb9a6bc586de966058c682c036e4e085a4134d7af021e5c8f5055
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / ragmesh-0.1.0-py3-none-any.whl

Download URL ragmesh-0.1.0-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
58bc7a0f2957a6f2d2b407c1a51a8a0a8507b9ea0b624587376796a2f10e13ad
BLAKE2b-256 checksum
How to use checksums
a56314c6575840f489086a04292daff825c5cb00a989972eb0b0a1d763ba4985
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page