How wiranata-orion/llm-lan-server works
LLM DIY is a local Ollama-based AI chat and coding assistant, with a Vue interface and Node/TypeScript agent backend. The main workflow runs from user chat in the UI, through its API client and backend routes to the agent orchestrator, which generates responses through Ollama and can use tools, memory, retrieval, and workspace context. Separate branches cover document ingestion, persistent conversation/vector memory, and Vibe Coding workspace indexing and file access. Edges use README statements and SOURCE INDEX references; unsampled internals are not assumed to call one another.
Main entry points: ollama.ts Ollama client · orchestrator.ts Turn orchestrator · api.js API client · workspace-indexer.ts Workspace indexer
Components 20
User interface
- Chat interface
web-ui/src/App.vue - API client
web-ui/src/services/api.js - Workspace interface
web-ui/src/components/WorkspaceView.vue - Browser memory
web-ui/src/services/memory.js
Chat agent
- Agent API routes
agent-server/src/routes.ts - App context
agent-server/src/app-context.ts - Turn orchestrator
agent-server/src/orchestrator.ts - Ollama client
agent-server/src/ollama.ts - Tool execution
agent-server/src/tools/executor.ts
Memory and retrieval
- Memory core
agent-server/src/memory-core.ts - Conversation history
agent-server/src/chat-history-store.ts - Document retrieval
agent-server/src/retriever.ts - Vector store
agent-server/src/vector-store.ts - Document ingestion
agent-server/src/ingestion.ts
Coding workspace
- Workspace API
agent-server/src/routes/workspace.ts - Workspace context
agent-server/src/services/workspace-rag.ts - Workspace indexer
agent-server/src/services/workspace-indexer.ts - Workspace index store
agent-server/src/services/workspace-store.ts
Other components
- User
- Ollama engine
Connections 26
- User → Chat interface: asks
README.md - Chat interface → API client: requests
web-ui/src/App.vue - API client → Agent API routes: calls API
README.md - Agent API routes → App context: uses context
agent-server/src/routes.ts - App context → Turn orchestrator: provides agent
agent-server/src/app-context.ts - Turn orchestrator → Ollama client: generates chat
agent-server/src/orchestrator.ts - Ollama client → Ollama engine: sends requests
agent-server/src/ollama.ts - Turn orchestrator → Tool execution: executes tools
agent-server/src/orchestrator.ts - Turn orchestrator → Memory core: uses memory
agent-server/src/orchestrator.ts - Turn orchestrator → Document retrieval: retrieves context
agent-server/src/orchestrator.ts - Memory core → Ollama client: embeds content
agent-server/src/memory-core.ts - Memory core → Vector store: reads and writes
agent-server/src/memory-core.ts - Document retrieval → Ollama client: embeds query
agent-server/src/retriever.ts - Document retrieval → Vector store: searches vectors
agent-server/src/retriever.ts - Document ingestion → Ollama client: embeds chunks
agent-server/src/ingestion.ts - Document ingestion → Vector store: stores chunks
agent-server/src/ingestion.ts - API client → Browser memory: persists chats
web-ui/src/App.vue - Chat interface → Workspace interface: opens workspace
web-ui/src/App.vue - Workspace interface → API client: uses API
- Workspace API → Workspace indexer: uses indexer
agent-server/src/routes/workspace.ts - Workspace API → Workspace context: uses workspace context
agent-server/src/routes/workspace.ts - Workspace API → Workspace index store: uses store
agent-server/src/routes/workspace.ts - Workspace context → Workspace indexer: reads and searches
agent-server/src/services/workspace-rag.ts - Workspace context → Ollama client: embeds search
agent-server/src/services/workspace-rag.ts - Workspace indexer → Workspace index store: indexes data
agent-server/src/services/workspace-indexer.ts - Workspace indexer → Ollama client: embeds chunks
agent-server/src/services/workspace-indexer.ts