How modelscope/sirchmunk works
Sirchmunk is an embedding-free, agentic search and evolving-knowledge product for local files and web sources. The main workflow is to submit a query through an API, MCP tool, or web interface; search raw data; and return an answer with evidence. Knowledge clusters capture and persist reusable knowledge, while the learning modules support evolution. The tree and excerpts establish the service-to-searcher MCP path and storage roles; detailed wiring among retrieval, reasoning, and learning modules was not sampled, so those links are omitted.
Main entry points: search.py Agentic search · page.tsx Web UI · main.py FastAPI app · server.py MCP server
Components 19
User interfaces
- Web UI
web/app/page.tsx - FastAPI app
src/sirchmunk/api/main.py - MCP server
src/sirchmunk_mcp/server.py - MCP service
src/sirchmunk_mcp/service.py
Search and answers
- Agentic search
src/sirchmunk/search.py - Query analysis
src/sirchmunk/schema/query_intelligence.py - Raw retrieval
src/sirchmunk/retrieve/text_retriever.py - Source scanning
src/sirchmunk/scan - Search agent
src/sirchmunk/agentic/react_agent.py - Answer policy
src/sirchmunk/answer_policy.py - Search renderer
src/sirchmunk/renderers/search_response.py
Knowledge evolution
- Learning modules
src/sirchmunk/learnings
Persistent state
- Knowledge clusters
src/sirchmunk/storage/knowledge_storage.py - Chat history
src/sirchmunk/api/components/history_storage.py - Uploaded files
src/sirchmunk/api/file_service.py
External integrations
- OpenAI-compatible LLM
src/sirchmunk/llm/openai_chat.py - Local and web sources
Other components
- User
- MCP client
Connections 19
- User → Web UI: asks
- Web UI → FastAPI app: sends requests
- User → FastAPI app: submits queries
- MCP client → MCP server: invokes tools
- MCP server → MCP service: dispatches
- MCP service → Agentic search: calls search
- Agentic search → Knowledge clusters: reads and writes
- Agentic search → Raw retrieval: retrieves text
- Agentic search → Source scanning: scans sources
- Agentic search → Query analysis: analyzes queries
- Agentic search → Search agent: coordinates reasoning
- Agentic search → Answer policy: applies policy
- Agentic search → Search renderer: formats results
- Agentic search → OpenAI-compatible LLM: uses LLM
- Raw retrieval → Local and web sources: searches raw data
- Source scanning → Local and web sources: reads sources
- Learning modules → Knowledge clusters: evolves knowledge
- Web UI → Chat history: stores conversations
- FastAPI app → Uploaded files: manages uploads