Pronounced: for-TAY-mee
Memory that understands.
Most storage systems are passive—they hold your data and wait for exact queries. Fortémi is different. It's an intelligent memory system that actually comprehends what you store: the meaning behind your notes, the relationships between ideas, and the context that connects them.
Ask it a question, and it doesn't just search for matching words. It finds answers that are conceptually relevant, even when you can't remember the right terminology. Store a document, and it automatically discovers how that knowledge connects to everything else you know. Over time, your knowledge base becomes a living network that grows smarter with every piece of information you add.
Built in Rust. Backed by PostgreSQL. Powered by embeddings. No cloud dependency required.
Under the hood: Hybrid retrieval (BM25 + dense vectors), automatic knowledge graph, 131 document types, W3C SKOS vocabularies, multi-memory isolation, OAuth2 auth, 37 MCP agent tools, and multimodal media processing. ~85k lines of Rust.
| Audience | Start Here |
|---|---|
| New Users | Getting Started · Use Cases |
| Developers | Quick Start · API Docs · Search Guide |
| AI Agents | MCP Server · MCP Deployment |
| Operators | Configuration · Operators Guide |
| Security | Authentication · Encryption |
- Understands meaning — Semantic search finds related content even without keyword matches
- Discovers connections — Automatically links related notes via embedding similarity
- Enhances content — RAG pipeline enriches notes with context from related knowledge
- Processes media — Extracts knowledge from images, audio, video, and 3D models
- Isolates tenants — Parallel memory archives with schema-level isolation and federated search
- Streams events — Real-time SSE, WebSocket, and webhook notifications
See Use Cases for deployment patterns and Executive Summary for a capabilities overview.
| Capability | What It Does |
|---|---|
| Hybrid Search | RRF fusion of BM25 + dense retrieval (details) |
| Multilingual FTS | CJK bigrams, emoji trigrams, 6+ language stemmers (details) |
| Knowledge Graph | Automatic linking at >70% similarity with graph exploration, community detection, and maintenance pipeline (details) |
| SKOS Vocabularies | W3C controlled vocabulary with hierarchical concepts (details) |
| Multi-Memory | Schema-isolated archives with federated cross-archive search (details) |
| Authentication | OAuth2 + API keys, opt-in enforcement (details) |
| Media Processing | Vision, audio, video, 3D model extraction (details) |
| Embedding Sets | MRL dimensionality reduction, auto-embed, two-stage retrieval (details) |
| Real-Time Events | SSE + WebSocket + webhook notifications (details) |
| Spatial-Temporal | PostGIS location + time range queries |
| Encryption | X25519/AES-256-GCM public-key encryption (details) |
| 131 Document Types | Auto-detection with optimized chunking per type (details) |
Includes PostgreSQL, API server, and MCP server in one container:
docker compose -f docker-compose.bundle.yml up -d
curl http://localhost:3000/healthPorts: 3000 (API + Swagger UI at /docs), 3001 (MCP)
Clean reset: docker compose -f docker-compose.bundle.yml down -v && docker compose -f docker-compose.bundle.yml up -d
# Prerequisites: Rust 1.70+, PostgreSQL 18+ with pgvector, Ollama (optional)
psql -c "CREATE EXTENSION IF NOT EXISTS vector;"
for f in migrations/*.sql; do psql -d matric -f "$f"; done
DATABASE_URL="postgres://matric:matric@localhost/matric" cargo run --release -p matric-api# Hybrid search (default: BM25 + semantic + RRF)
curl "http://localhost:3000/api/v1/search?q=retrieval+augmented+generation"
# Browse all endpoints
open http://localhost:3000/docsSee Getting Started for the full walkthrough and API docs for all endpoints.
┌─────────────────────────────────────────────────────────────────┐
│ Fortemi │
├──────────────────┬──────────────────────────────────────────────┤
│ matric-api │ HTTP REST API with OpenAPI/Swagger │
├──────────────────┼──────────────────────────────────────────────┤
│ matric-search │ Hybrid retrieval (BM25 + dense + RRF) │
├──────────────────┼──────────────────────────────────────────────┤
│ matric-jobs │ Async NLP pipeline (embedding, RAG, linking) │
├──────────────────┼──────────────────────────────────────────────┤
│ matric-inference│ LLM abstraction (Ollama, OpenAI backends) │
├──────────────────┼──────────────────────────────────────────────┤
│ matric-db │ PostgreSQL + pgvector + PostGIS repositories │
├──────────────────┼──────────────────────────────────────────────┤
│ matric-crypto │ X25519/AES-256-GCM public-key encryption │
├──────────────────┼──────────────────────────────────────────────┤
│ matric-core │ Core types, traits, and error handling │
├──────────────────┼──────────────────────────────────────────────┤
│ mcp-server │ MCP agent integration (Node.js, 37 tools) │
└──────────────────┴──────────────────────────────────────────────┘
See Architecture for detailed system design with research citations.
37 core agent tools via Model Context Protocol. Docker bundle exposes MCP on port 3001.
Connect (.mcp.json or Claude Desktop):
{
"mcpServers": {
"fortemi": { "url": "https://your-domain.com/mcp" }
}
}Local stdio (development): node mcp-server/index.js with MATRIC_MEMORY_URL=http://localhost:3000
Set MCP_TOOL_MODE=full for all 202 granular tools. See MCP Guide · MCP Deployment.
Parallel memory archives with schema-level isolation. Select per request via X-Fortemi-Memory header. Search across all archives with federated search.
See Multi-Memory Guide · Agent Strategies.
Opt-in via REQUIRE_AUTH=true. Supports OAuth2 (client credentials + authorization code) and API keys. Public endpoints (/health, /docs, /oauth/*) always accessible.
See Authentication Guide.
Key variables (see full reference for all ~27 variables):
| Variable | Default | Description |
|---|---|---|
DATABASE_URL |
postgres://localhost/matric |
PostgreSQL connection |
PORT |
3000 |
API server port |
REQUIRE_AUTH |
false |
Enable OAuth2/API key auth |
ISSUER_URL |
https://localhost:3000 |
OAuth2 issuer URL |
OLLAMA_BASE |
http://localhost:11434 |
Ollama API endpoint |
OLLAMA_EMBED_MODEL |
nomic-embed-text |
Embedding model |
OLLAMA_VISION_MODEL |
qwen3-vl:8b |
Vision model for image description |
WHISPER_BASE_URL |
http://localhost:8000 |
Audio transcription endpoint |
MAX_MEMORIES |
10 |
Max archives (see capacity planning) |
MCP_TOOL_MODE |
core |
core (37 tools) or full (all) |
cargo test --workspace # Run tests
cargo fmt && cargo clippy -- -D warnings # Format + lint
RUST_LOG=debug cargo run -p matric-api # Run with loggingSee CI/CD for pipeline details.
- Getting Started — 5-minute quickstart
- Use Cases — Deployment patterns
- Best Practices — Research-backed guidance
- Glossary — Terminology
- Search Guide — Modes, RRF tuning, query patterns
- Multilingual Search — CJK, emoji, language-specific FTS
- Knowledge Graph — Traversal, linking, exploration
- Embedding Sets — MRL, auto-embed, two-stage retrieval
- Real-Time Events — SSE, WebSocket, webhooks
- File Attachments — Media upload and extraction
- Encryption — PKE for secure sharing
- Configuration — All environment variables
- Authentication — OAuth2, API keys, migration
- Multi-Memory — Archives, federated search
- MCP Server · MCP Deployment — Agent integration
- Operators Guide — Monitoring, troubleshooting
- Backup & Restore — Database recovery
- Hardware Planning — Sizing and resources
- Troubleshooting — Diagnostics
- Architecture — System design with citations
- Research Background — Methodology and benchmarks
- Executive Summary — Capabilities overview
- Cormack, G. V., Clarke, C. L. A., & Büttcher, S. (2009). "Reciprocal rank fusion outperforms condorcet and individual rank learning methods." SIGIR '09.
- Lewis, P., et al. (2020). "Retrieval-augmented generation for knowledge-intensive NLP tasks." NeurIPS 2020.
- Reimers, N., & Gurevych, I. (2019). "Sentence-BERT: Sentence embeddings using siamese BERT-networks." EMNLP 2019.
- Malkov, Y. A., & Yashunin, D. A. (2020). "Efficient and robust approximate nearest neighbor search using HNSW." IEEE TPAMI.
- Hogan, A., et al. (2021). "Knowledge graphs." ACM Computing Surveys.
- Kusupati, A., et al. (2022). "Matryoshka representation learning." NeurIPS 2022.
- Miles, A., & Bechhofer, S. (2009). "SKOS simple knowledge organization system reference." W3C Recommendation.
See docs/research/ for detailed paper analyses.
- HotM - Knowledge management frontend