nobrainr
CLAUDE.md1 starsChanged 9 months agoMITView on GitHub
Provides hybrid search (vector + full-text RRF) by default, context-enriched embeddings, chunked document ingestion with overlapping context, optional cross-encoder reranking, chunk-aware retrieval, automatic entity extraction, on-write dedup, embedding versioning, and a Vue 3 dashboard with interactive graph visualization. The system learns autonomously: it summarizes, consolidates duplicates, synthesizes cross-entity insights, detects contradictions, validates its own extractions, discovers cross-machine patterns, and archives stale knowledge — all on scheduled LLM-powered jobs.
- Installs packages
The file
We split this CLAUDE.md into the rules it gives an agent
8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Use one of these when storing memories — freeform categories are auto-normalized: architecture, debugging, deployment, infrastructure, …
- Very specific: line 208
Linking: All chunks share a document_id in metadata with chunk_index and chunk_total
- Very specific: line 220
When NOBRAINR_RERANKER_ENABLED=true (default), search overfetches overfetch_mult × limit results per RRF branch and reranks the top …
- Very specific: line 235
Every memory mutation is tracked in the memory_versions table.
- Distinctive: line 238
Corruption recovery: if an LLM-driven job corrupts a memory, the pre-mutation state is always recoverable
- Distinctive: line 253
Snapshot-on-write: Before any mutation, the memory's current state (content, tags, category, confidence, metadata) is captured
- Very specific: line 394
Default num_ctx=8192 for all LLM calls (extraction, dedup, distill, documents, search synthesis).
- Very specific: line 427
Shared client: All crawl operations go through nobrainr.crawler.client which applies PruningContentFilter by default (80% noise reduction) …
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
nobrainr — Collective Agent Memory Service
What This Is
Persistent shared memory for AI coding agents. If you're an agent reading this:
you can store learnings with memory_store, search past knowledge with memory_search,
and explore the knowledge graph with entity_search / entity_graph. Everything you
store is available to every other agent instance connected to this server.
Provides hybrid search (vector + full-text RRF) by default, context-enriched embeddings, chunked document ingestion with overlapping context, optional cross-encoder reranking, chunk-aware retrieval, automatic entity extraction, on-write dedup, embedding versioning, and a Vue 3 dashboard with interactive graph visualization.
Canonical Categories
Use one of these when storing memories — freeform categories are auto-normalized:
architecture, debugging, deployment, infrastructure, patterns, tooling,
security, frontend, backend, data, business, documentation, session-log,
insight, _archived
The system learns autonomously: it summarizes, consolidates duplicates, synthesizes cross-entity insights, detects contradictions, validates its own extractions, discovers cross-machine patterns, and archives stale knowledge — all on scheduled LLM-powered jobs.
Architecture
- Backend — Python ASGI: FastMCP (HTTP + SSE) + pure JSON API (Starlette)
- Frontend — Vue 3 + Vuetify + Cytoscape.js (separate container, nginx)
- PostgreSQL 18 + pgvector — storage, vector similarity, knowledge graph
- llama-swap (Coolify-deployed) — hosts three on-GPU
llama-serverprocesses serving the entire LLM stack from a single container:- Main LLM —
Qwen3.6-27B-IQ4_XS.gguf(port 5803, 32K ctx, parallel=2, all layers on GPU) handles extraction, chat, scheduler jobs, dedup, synthesis - Embeddings —
Qwen3-Embedding-0.6B-Q8_0.gguf(port 5802, 4K ctx, all layers on GPU) 1024-dim vectors, OpenAI-compatible/v1/embeddings - Reranker —
bge-reranker-v2-m3-Q8_0.gguf(port 5800, 4K ctx, all layers on GPU) cross-encoder rerank via llama.cpp/v1/rerank, sigmoid-normalised
- Main LLM —
- Crawl4AI — web crawling service (CPU-only container on
mcpnetwork, port 11235)
Routing (when using a reverse proxy)
| Path | Target |
/mcp, /api/*, /sse, /messages/* | nobrainr backend (port 8420) |
/* (catch-all) | dashboard (nginx, port 80) |
Project Layout
src/nobrainr/ # Python backend
├── config.py # Settings via env vars (NOBRAINR_ prefix)
├── cli.py # CLI: serve, status, search, extract-backfill, entities, imports
├── db/
│ ├── pool.py # asyncpg connection pool with pgvector
│ ├── schema.py # DDL: memories, entities, entity_memories, entity_relations, etc.
│ └── queries.py # All database operations (memory + entity + graph)
├── services/
│ ├── memory.py # store_memory_with_extraction(), store_document_chunked()
│ ├── chunking.py # Text chunking with configurable overlap
│ └── reranker.py # Cross-encoder reranking via llama-server (bge-reranker-v2-m3, GPU)
├── embeddings/
│ └── ollama.py # llama-server client (embed_text, embed_batch via /v1/embeddings)
│ # — name predates the migration; still routes to llama-server on port 5802
├── extraction/
│ ├── models.py # Pydantic: ExtractedEntity, ExtractedRelationship, ExtractionResult
│ ├── extractor.py # llama-server /v1/chat/completions with JSON-mode structured output
│ ├── dedup.py # Memory dedup (vector + LLM merge decision)
│ ├── llm.py # Shared llama-server chat helper (OpenAI-compatible)
│ └── pipeline.py # Full pipeline: extract → dedup → store → link
├── crawler/
│ ├── client.py # Shared Crawl4AI HTTP client (crawl4ai_request, crawl4ai_job, crawl4ai_deep, discover_sitemap_urls, bm25_markdown_generator)
│ ├── pdf.py # Direct PDF fetch + pymupdf text extraction (bypasses Crawl4AI for PDFs; public hosts only)
│ └── knowledge.py # Scheduled knowledge crawler (seed URLs, link discovery, freshness, saturation detection)
├── dashboard/
│ ├── app.py # Parent ASGI app: create_app(), lifespan
│ └── api.py # Pure JSON API endpoints
├── mcp/
│ └── server.py # FastMCP server with all MCP tools
├── scheduler.py # Asyncio periodic task runner (LLM lock, staggered starts)
├── scheduler_jobs.py # 9 autonomous learning jobs (see Scheduler Jobs section)
└── importers/
├── chatgpt.py # ChatGPT conversations.json parser
├── claude.py # Claude .claude/ directory scanner
└── documents.py # Universal document importer (PDF, images, DOCX, text) with vision OCR
dashboard/ # Vue 3 frontend (separate build)
├── Dockerfile # node:20-alpine build → nginx:alpine serve
├── nginx.conf # SPA routing, gzip, cache
├── package.json
├── vite.config.ts
└── src/
├── main.ts # App entry: Vue + Vuetify + Router + Pinia
├── App.vue
├── api/client.ts # Axios instance (same-origin)
├── plugins/vuetify.ts # Dark theme
├── router/index.ts # /graph, /memories, /timeline, /scheduler
├── stores/stats.ts # Global stats (Pinia)
├── types/index.ts # TypeScript interfaces
├── composables/ # useMemories, useGraph, useTimeline, useScheduler
├── views/ # GraphView, MemoriesView, TimelineView, SchedulerView
└── components/ # AppBar, MemoryCard, MemoryDetail, EntityBadge, GraphSidePanelAPI Endpoints (pure JSON)
/api/graph— Full graph data (Cytoscape elements format)/api/memories— Search/list memories (query: q, category, source_machine, tags, limit, offset)/api/memories/{id}— GET detail (+entities), POST update (JSON body), DELETE/api/timeline— Memories by date (query: category, source_machine, limit, offset)/api/node/{id}— Entity detail + connections + related memories/api/stats— Statistics + feedback/api/scheduler— Scheduler status + events + feedback/api/entities— List entities (query: type, limit, offset)/api/recall— Fast text-only search (PostgreSQL FTS, no embedding)/api/categories,/api/tags— Filter values/api/memories/{id}/history— GET full version audit trail/api/memories/{id}/restore— POST restore to a previous version (body:{"version": N})
MCP Tools
| Tool | Purpose |
memory_store | Store memory with auto-embedding, dedup check, async entity extraction |
memory_store_document | Store long documents with chunked ingestion (overlapping chunks, document linking) |
memory_search | Hybrid search (vector + FTS via RRF) with HyDE, query decomposition, reranking, chunk expansion |
memory_query | Structured filter (tags, category, source, machine) |
memory_get | Retrieve specific memory by ID (tracks access) |
memory_update | Update memory (re-embeds if content changes, versioned) |
memory_delete | Delete a memory (snapshots before deletion) |
memory_history | Get full version audit trail for a memory |
memory_restore | Restore a memory to a previous version |
memory_stats | Database + knowledge graph + embedding model + chunk statistics |
entity_search | Semantic search on knowledge graph entities |
entity_graph | Recursive graph traversal from a named entity |
entity_list | List entities with optional type filter |
entity_memories | Get all memories linked to a specific entity |
memory_maintenance | Recompute importance + decay stability |
memory_extract | Manually trigger entity extraction for a memory |
memory_feedback | Report whether search results were helpful |
memory_reflect | Batch-save learnings from a session |
log_event | Record significant agent activity |
memory_import_chatgpt | Import ChatGPT export JSON |
memory_import_claude | Import Claude memory files |
crawl_page | Crawl a URL with PruningContentFilter (or BM25 query-aware filtering), supports css_selector, screenshot, network capture |
crawl_and_store | Crawl a URL + chunked ingestion with content filtering (no more truncation, full content preserved) |
deep_crawl | Multi-page deep crawl (BFS/DFS) with optional store — crawls linked pages from a starting URL |
discover_sitemap | Discover page URLs from sitemap.xml and robots.txt for targeted crawling |
memory_import_documents | Import documents from a directory (PDF, images, DOCX, markdown) with optional vision OCR |
distill | Compress text via local LLM — extract only essential info, 90-99% token savings |
distill_search | Search memories + auto-compress results into a focused answer |
code_index | Index a codebase by extracting code symbols (functions, classes, methods) via AST |
code_search | Search indexed code symbols by name/kind — symbol-level retrieval without reading files |
community_detect | Run Louvain community detection on the knowledge graph with optional LLM summaries |
community_list | List detected communities with titles, summaries, key topics, top entities |
community_members | Get all entities in a specific community |
handoff_create | Create structured handoff for next session (task, status, next steps, blockers) |
handoff_pickup | Find pending handoffs from previous sessions — call on session start |
handoff_resolve | Mark a handoff as completed/superseded/abandoned |
memory_set_tier | Set a memory's tier (0=pinned, 1=hot, 2=standard, 3=cold) |
memory_tier_stats | Get memory counts by tier level |
error_store | Store structured error pattern (signature, root cause, fix, prevention) |
error_search | Search known error patterns — call before debugging |
global_search | GraphRAG global search — map-reduce over community summaries for broad questions |
graph_search | Entity-centric graph traversal search — finds entities, walks graph, collects memories |
MCP Resources
| URI | Purpose |
nobrainr://briefing | System stats, top categories, communities, recent events — read on session start |
nobrainr://categories | All memory categories with counts |
nobrainr://machines | Connected machines/agents with memory counts |
nobrainr://entity-types | Entity types in the knowledge graph with counts |
MCP Prompts
| Prompt | Purpose |
session_start | Structured workflow for starting a session (search context, log event) |
session_end | Structured workflow for ending a session (reflect, feedback, store) |
debug_investigation | Step-by-step debugging workflow (search, entity graph, store fix) |
research_topic | Research workflow combining memory search, entities, web crawling |
Search & Retrieval Pipeline
query → [optional] LLM query decomposition (2-4 sub-queries)
→ [optional] LLM query expansion (2-3 variants)
↓
embed(each query) → halfvec HNSW index scan (candidates) + FTS keyword search
↓ ↓ ↓
[optional] HyDE full-precision re-rank FTS results
(embed hypothetical ↓ ↓
answer too) Reciprocal Rank Fusion (RRF, k=60)
↓
cross-encoder reranking (bge-reranker-v2-m3 on GPU, enabled by default)
↓
[optional] chunk context expansion (fetch adjacent chunks)
↓
final results (with similarity, relevance, rrf_score, tier)- Memory tiering — Tier 0 (pinned), 1 (hot), 2 (standard), 3 (cold). Cold memories excluded from search by default (
include_cold=Trueto override). Auto-tiered every 6 hours based on importance + access patterns. - Hybrid search is on by default — every
memory_searchcombines vector similarity + full-text matching - Embedding model safeguard — search only matches memories embedded with the current model (prevents garbage from mixed embeddings during migration)
- Context-enriched embeddings — memories are embedded as
{category}. {tags}. {content}, not raw text - Chunk-aware retrieval — when a search hit is part of a chunked document, adjacent chunks are automatically fetched for context continuity
Chunked Document Ingestion
Long documents (>8000 chars) are automatically split into overlapping chunks:
- Max chunk size: 6000 chars (configurable:
NOBRAINR_CHUNK_MAX_CHARS) - Overlap: 500 chars between consecutive chunks (
NOBRAINR_CHUNK_OVERLAP_CHARS) - Splitting: Prefers paragraph → line → sentence boundaries
- Linking: All chunks share a
document_idin metadata withchunk_indexandchunk_total - Dedup skipped: Individual chunks skip the write-path dedup check
Used by: memory_store_document, crawl_and_store, memory_import_documents, knowledge crawler.
Embedding Versioning
Each memory and entity tracks which embedding model generated its vector in the embedding_model column.
This enables safe model migration via nobrainr re-embed --model <new-model>.
Reranking (optional)
When NOBRAINR_RERANKER_ENABLED=true (default), search overfetches overfetch_mult × limit
results per RRF branch and reranks the top reranker_max_candidates with a cross-encoder.
Active backend: bge-reranker-v2-m3 (Q8_0 quant) running as a dedicated llama-server process
on the llama-swap container, port 5800, all layers on GPU. Latency ~50ms for 8 candidates at
4K ctx. Backend preference is reranker_backend="http" which hits the llama-server
/v1/rerank endpoint; sigmoid-normalises scores to [0,1] so threshold semantics stay stable
across model swaps. Falls through to local sentence-transformers (then flashrank ONNX) if the
HTTP sidecar is unavailable — keeps search functional during llama-swap redeploys.
Skip-when-dominant: if top-1 RRF score ≥ 2.5× top-2, the reranker is skipped (it can't meaningfully reorder when RRF already has a clear winner). Saves GPU on easy queries.
Memory Versioning (Audit Trail)
Every memory mutation is tracked in the memory_versions table. This provides:
- Full audit trail: who changed what, when, and why
- Point-in-time restore: revert any memory to a previous version
- Corruption recovery: if an LLM-driven job corrupts a memory, the pre-mutation state is always recoverable
What Gets Versioned
| Mutation | change_type | changed_by |
| New memory created | created | system |
| Dedup merges new info into existing | dedup_update | mcp |
| Dedup replaces outdated memory | dedup_supersede | mcp |
| Manual update via MCP tool | manual_update | mcp |
| Manual delete via MCP tool | manual_delete | mcp |
| Scheduler consolidation merge | consolidation | scheduler:consolidation |
| Scheduler auto-summarize | auto_summarize | scheduler:auto_summarize |
| Restore to previous version | restore | manual |
How It Works
- Snapshot-on-write: Before any mutation, the memory's current state (content, tags, category, confidence, metadata) is captured
- Version numbers: Sequential per-memory (0 = creation, 1 = first change, etc.)
- Provenance:
source_memory_idandsimilarity_scoretrack dedup/consolidation origins - No data loss: Even deleted memories retain their version history
Client Connection
HTTP transport (recommended — used by Claude Code):
{
"mcpServers": {
"nobrainr": {
"type": "http",
"url": "https://<your-domain>/mcp"
}
}
}SSE (legacy, still supported):
{
"mcpServers": {
"nobrainr": {
"type": "sse",
"url": "http://<your-server>:8420/sse"
}
}
}Scheduler Jobs
The scheduler runs 27 autonomous jobs (5 SQL + 2 system + 20 LLM). LLM jobs are serialized
via a hardcoded Semaphore(1) — a single GPU cannot handle concurrent gemma3 inference without
timeouts. 1s inter-request delay between batch LLM calls for live request coexistence.
LLM retry: 5 attempts with exponential backoff on empty/malformed JSON responses.
Structured labeling jobs use think=False for ~10x speed.
Knowledge Lifecycle
| Job | Interval | Batch | Type | Purpose |
chatgpt_distill | 30m | 30 | LLM | Convert raw ChatGPT conversations → structured memories (serialized, 1 concurrent) |
auto_summarize | 1h | 20 | LLM | Generate 1-line summaries for unsummarized memories |
insight_extraction | 1h | 30 | LLM | Extract reusable learnings from agent events |
consolidation | 2h | 10 | LLM | Find near-duplicates (>88% similar) and merge via LLM |
entity_enrichment | 2h | 20 | LLM | Generate descriptions for underdescribed entities |
synthesis | 4h | 5 | LLM | Cross-entity insight generation from memory clusters |
Web Intelligence (NEW — knowledge crawl evolution)
| Job | Interval | Batch | Type | Purpose |
knowledge_crawl | 6h | 3 | LLM | Crawl seed URLs + queued URLs, store with entity extraction, discover links, saturation detection |
entity_web_research | 12h | 3 | LLM | Find underdescribed entities, LLM suggests docs URL, crawl + store |
freshness_recrawl | 24h | 3 | LLM | Re-crawl stale pages (>30 days), update if content changed |
interest_expansion | 24h | 3 | LLM | Research hot topics based on agent search/crawl interest signals |
Quality & Integrity
| Job | Interval | Batch | Type | Purpose |
extraction_quality | 4h | 20 | LLM | Validate entity extractions, update confidence, prune bad links |
contradiction_detection | 4h | 10 | LLM | Find semantically similar memories that contradict each other |
cross_machine_insights | 6h | 5 | LLM | Discover patterns across different machines/agents |
Maintenance
| Job | Interval | Type | Purpose |
maintenance | 6h | SQL | Recompute importance scores, decay stability |
feedback_integration | 12h | SQL | Adjust importance based on feedback |
memory_decay | 24h | SQL | Archive low-value, never-accessed memories >30 days old |
auto_tier | 6h | SQL | Auto-assign tiers (0-3) based on importance, access patterns, quality |
entity_pruning | 12h | SQL | Prune noise entities (<=1 memory link, older than 24h) |
Self-Improvement (inspired by autoresearch + OpusDelta)
| Job | Interval | Type | Purpose |
system_pulse | 24h | LLM | Generate daily health transmission — memory stats, growth, search quality, anomalies |
auto_optimize | 12h | LLM | Analyze search feedback patterns, suggest improvements, store optimization insights |
community_detection | 12h | LLM | Louvain community detection on entity graph + LLM community summaries |
cooccurrence_linking | 4h | LLM | Find unlinked entity pairs in 3+ shared memories, LLM classifies relationships |
github_sync | 24h | LLM | Incremental sync of GitHub repository data (requires gh CLI + GH_TOKEN env var) |
Knowledge Growth Loop
Agent sessions → interest signals (search queries, manual crawls)
↓
interest_expansion (24h) → targeted web research based on hot topics
↓
knowledge_crawl (6h) → crawl seed URLs + queued links
↓
Link discovery → queue interesting links from crawled pages
↓
entity_web_research (12h) → LLM picks underdescribed entities → suggests docs → crawls
↓
freshness_recrawl (24h) → re-crawl stale pages → update if changed
↓
Knowledge graph grows → entities enriched → new relations discoveredDeployment Notes
LLM Stack (llama-swap on GPU)
The entire inference stack runs as a single Coolify-deployed llama-swap application that
supervises three llama-server (llama.cpp) processes pinned to the RTX 4000 SFF Ada (20GB VRAM).
Ollama is not used for inference any more — the embeddings/ollama.py filename + a few
docstring references are pre-migration leftovers; everything routes through llama-server's
OpenAI-compatible endpoints.
| Role | Port | Model | Quant | ctx | parallel | n-gpu-layers |
| Main LLM | 5803 | Qwen3.6-27B-IQ4_XS.gguf | IQ4_XS | 32768 | 2 | 99 (all) |
| Embeddings | 5802 | Qwen3-Embedding-0.6B-Q8_0.gguf | Q8_0 | 4096 | — | 99 |
| Reranker | 5800 | bge-reranker-v2-m3-Q8_0.gguf | Q8_0 | 4096 | — | 99 |
The 27B model carries all language workloads — extraction, dedup, summarization,
consolidation, synthesis, scheduler jobs, chat. Config aliases like qwen3.6:35b in
config.py (extraction_model, scheduler_llm_model, chat_model) are llama-swap
group labels — llama-swap maps the label to whichever physical model is currently loaded
on the matching port. Don't expect the label to match the file name; trust the live
/v1/models endpoint on port 5803 as ground truth.
VRAM budget: ~18.1 / 20.0 GB in use, ~2.4 GB headroom. All three models stay resident — no swap-out, no keep-alive timer to worry about. Parallel=2 on the 27B lets two concurrent generations share the slot (scheduler batch jobs + a live MCP request can overlap without contention).
Service URL for the nobrainr backend:
NOBRAINR_LLM_SERVER_URL=http://llama-server:8080The llama-swap router multiplexes the three ports behind that single hostname. The
backend uses OpenAI-compatible paths (/v1/chat/completions, /v1/embeddings,
/v1/rerank) and chooses the model via the model field, which llama-swap routes to
the right llama-server process.
Extraction Performance
- Main LLM serves chat in non-thinking mode by default (Qwen3.6 supports
enable_thinking=trueviachat_template_kwargswhen explicitly enabled, but extraction/dedup/scheduler all run withenable_thinking=falsefor ~10× speed and cleaner JSON output). - Default
num_ctx=8192for all LLM calls (extraction, dedup, distill, documents, search synthesis). Main LLM is loaded with 32K ctx so longer contexts are available on demand. MAX_CONTENT_CHARS=6000— content truncation for extraction (matches chunk config).- Post-extraction noise filter in
pipeline.pycatches: short names, generic words, function calls, CLI flags, CSS selectors, trivial file names, resolution strings, git branch names. - Qwen3.6-27B IQ4_XS is ~2-3× faster than the previous gemma3:12b stack for structured JSON output and supports a much larger context window without VRAM trouble.
- Backfill:
nobrainr extract-backfill --batch-size 50 - Retry logic: 5 attempts with exponential backoff on HTTP errors / empty / malformed JSON responses from llama-server.
- LLM scheduler jobs are serialized via
Semaphore(1)(scheduler_llm_concurrency: 5setting is the upper bound; the actual lock is hardcoded to 1 to prevent concurrent 27B inference from spawning extra slots beyondparallel=2).
Network Aliases (Coolify)
Coolify redeploys create new containers with random suffixes. Traefik routes to stable
hostnames (nobrainr, brain-dashboard) via Docker network aliases on the mcp network.
The nobrainr-network.service (systemd) watches docker events and auto-applies aliases
when containers restart. No manual post-deploy needed.
# Manual fix if needed:
docker network disconnect mcp <container> && docker network connect --alias nobrainr mcp <container>Crawl4AI Configuration
- Container:
crawl4aionmcpnetwork, port 11235 (v0.9.0) - CPU only (no GPU), 4GB RAM, 4 CPUs,
--shm-size=2gfor Chromium - Connects to llama-swap via
http://llama-server:8080for LLM-based extraction - Env vars:
NOBRAINR_CRAWL4AI_URL=http://crawl4ai:11235,NOBRAINR_CRAWL4AI_API_TOKEN - Shared client: All crawl operations go through
nobrainr.crawler.clientwhich appliesPruningContentFilterby default (80% noise reduction) and wraps sync/async/deep crawl APIs - API format: v0.8.x requires
crawler_configdict wrapping (NOT flat params) to activate content filtering. The shared client handles this automatically. - Content filters: PruningContentFilter (default, boilerplate removal) or BM25ContentFilter (query-aware, extracts only relevant sections — used by entity_web_research, interest_expansion)
- Async job API: Scheduler jobs use POST
/crawl/job+ polling to avoid HTTP timeouts - Deep crawl: BFS/DFS strategies via
crawl4ai_deep(), exposed asdeep_crawlMCP tool - PDFs bypass Crawl4AI (
crawler/pdf.py): v0.9.0 fetches a PDF, then fails it as "Blocked by anti-bot protection: Cloudflare JS challenge" (HTTP 500). URLs ending in.pdfare fetched directly; any other URL is probed for a%PDF-body only after its Crawl4AI crawl failed. Text layer via pymupdf → page-separated markdown (## Page N,---), result in Crawl4AI's shape withmetadata.source = "pdf-direct"+ page counts. Caps: 50 MB, 500 pages, 1M chars. The direct fetch refuses hosts that resolve to non-public addresses (checked per redirect hop) — internal URLs keep going to Crawl4AI as before. Scanned PDFs return an error pointing atmemory_import_documents(vision OCR). - v0.9.0
/crawl/jobis broken (500 on every request — its metrics middleware crashes on_IncludedRouter).crawl4ai_job()falls back to synchronous/crawlwithmax_waitas timeout, so the four scheduled crawl jobs work again.deep_crawlhas no fallback:/crawlrejects deep-crawl strategies from requests ("may not be constructed from an untrusted request") — it stays down until Crawl4AI is fixed or pinned back. - Error dicts: a Crawl4AI HTTP error carries
status_code,correlation_id(grepdocker logs crawl4aifor the real cause) and, on 5xx, ahint.
TLS Certificates
Uses Traefik letsencrypt-dns resolver (Cloudflare DNS challenge) — works behind VPN
where HTTP challenge can't reach port 80. Config: /data/coolify/proxy/dynamic/nobrainr.yaml.
Development
# Backend
uv sync && uv run nobrainr serve
# Frontend (local dev with proxy to backend)
cd dashboard && npm install && npm run dev
# Lint
uv run ruff check src/
# Test
uv run pytest
# flashrank + sentence-transformers stay in deps as fallback paths;
# uv sync installs everything needed.Configuration Reference (Retrieval)
| Env Var | Default | Purpose |
NOBRAINR_LLM_SERVER_URL | http://llama-server:8080 | llama-swap router (multiplexes 5800/5802/5803) |
NOBRAINR_EMBEDDING_MODEL | qwen3-embedding-cpu | llama-swap label for the embedding slot (5802) |
NOBRAINR_EMBEDDING_DIMENSIONS | 1024 | Vector dimensions (must match model — Qwen3-Embed-0.6B = 1024) |
NOBRAINR_EXTRACTION_MODEL | qwen3.6:35b | llama-swap label for the main LLM slot (5803, actual file is Qwen3.6-27B-IQ4_XS.gguf) |
NOBRAINR_SCHEDULER_LLM_MODEL | qwen3.6:35b | Same slot — scheduler reuses the main LLM |
NOBRAINR_CHAT_MODEL | (empty → extraction_model) | Same slot — chat reuses the main LLM |
NOBRAINR_RERANKER_BACKEND | http | Reranker backend (http → llama-server 5800; falls back to sentence-transformers then flashrank) |
NOBRAINR_RERANKER_URL | http://reranker:80 | Override if reranker is on a separate sidecar (default routes via llama-swap path) |
NOBRAINR_RERANKER_MODEL | Qwen/Qwen3-Reranker-0.6B | Sentence-transformers fallback model name (actual GPU process serves bge-reranker-v2-m3) |
NOBRAINR_RERANKER_ENABLED | true | Enable cross-encoder reranking |
NOBRAINR_RERANKER_MAX_CANDIDATES | 8 | Top-N RRF candidates sent to the cross-encoder |
NOBRAINR_CHUNK_MAX_CHARS | 6000 | Max characters per chunk |
NOBRAINR_CHUNK_OVERLAP_CHARS | 500 | Overlap between consecutive chunks |
NOBRAINR_CHUNK_THRESHOLD | 8000 | Content above this length gets chunked |
NOBRAINR_CHUNK_CONTEXT_WINDOW | 1 | Adjacent chunks fetched around search hits |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

