How huhuluwa/forgemind works
ForgeMind V4 is a local AI assistant built on MiniMind, with a chat/search interface, OpenAI-compatible API, expert knowledge, code-agent tools, and file export. The user-facing path is chat client → deployed server → agent/model and optional search or tools → response or exported artifact. The repository also contains a separate model-training and evaluation stack. Runtime links below follow README statements and SOURCE INDEX references; where implementations were not excerpted, those references establish module relationships but not internal behavior.
Main entry points: serve_forgemind_chat_web.py Chat and API server · model_minimind.py MiniMind model · train_agent.py Training workflows · eval_llm.py Model evaluation
Components 23
Chat product
- Chat interface
web - Desktop client
desktop/Program.cs - Chat and API server
source/scripts/serve_forgemind_chat_web.py - OpenAI model API
minimind/scripts/serve_openai_api.py - Model API service
minimind/scripts/serve_openai_api.py
Assistant runtime
- Conversation agent
source/agent_runtime/openai_agent.py - Identity and prompts
source/agent_runtime/prompts.py - Web search
source/agent_runtime/search.py - Expert knowledge base
source/agent_runtime/expert_kb.py - Market information
source/agent_runtime/market.py - Agent tools
source/agent_runtime/tools.py - Code workspace tools
source/agent_runtime/code_tools.py - File exports
source/agent_runtime/artifacts.py
Model training
- Training workflows
minimind/trainer/train_agent.py - Generation rollouts
minimind/trainer/rollout_engine.py - Training utilities
minimind/trainer/trainer_utils.py - Model evaluation
minimind/eval_llm.py
Model and data
- Language datasets
minimind/dataset/lm_dataset.py - MiniMind model
minimind/model/model_minimind.py - Model profiles
minimind/model/model_profiles.py - LoRA adapters
minimind/model/lora_adapter.py
Other components
- User
- Search providers
Connections 26
- User → Chat interface: uses
README.md - User → Desktop client: launches
README.md - Desktop client → Chat interface: opens
README.md - Chat interface → Chat and API server: sends chat
- Chat and API server → Conversation agent: dispatches
source/scripts/serve_forgemind_chat_web.py - Chat and API server → Web search: uses
source/scripts/serve_forgemind_chat_web.py - Chat and API server → Market information: uses
source/scripts/serve_forgemind_chat_web.py - Chat and API server → Expert knowledge base: uses
source/scripts/serve_forgemind_chat_web.py - Chat and API server → File exports: exports
source/scripts/serve_forgemind_chat_web.py - Chat and API server → Agent tools: uses
source/scripts/serve_forgemind_chat_web.py - Conversation agent → Identity and prompts: uses
source/agent_runtime/openai_agent.py - Expert knowledge base → Web search: queries
source/agent_runtime/expert_kb.py - Web search → Search providers: searches
source/agent_runtime/search.py - Agent tools → Code workspace tools: dispatches
- User → OpenAI model API: requests inference
README.md - Training workflows → Language datasets: loads
minimind/trainer/train_agent.py - Training workflows → MiniMind model: trains
minimind/trainer/train_agent.py - Training workflows → Generation rollouts: generates with
minimind/trainer/train_agent.py - Training workflows → Training utilities: uses
minimind/trainer/train_agent.py - Generation rollouts → MiniMind model: generates with
minimind/trainer/rollout_engine.py - Model profiles → MiniMind model: configures
minimind/model/model_profiles.py - Model evaluation → MiniMind model: evaluates
minimind/eval_llm.py - Model evaluation → Model profiles: selects
minimind/eval_llm.py - Model evaluation → LoRA adapters: loads adapters
- OpenAI model API → MiniMind model: serves
minimind/scripts/serve_openai_api.py - OpenAI model API → Model profiles: configures
minimind/scripts/serve_openai_api.py