How bachtiarpanjaitan/ihandai-go works
ihandai is a provider-agnostic Go AI framework. Its main user-to-result paths are direct chat, RAG queries, document indexing, multi-turn conversations, and agent runs. The documented indexing and RAG stages are shown as distinct components; the README also identifies workflows, MCP, streaming, and observability as product capabilities. Source excerpts confirm key client orchestration and agent calls; links based only on documented capabilities cite the README, since those implementation paths were not sampled.
Main entry points: client.go AI Client · embedding.go Embedding · llm.go LLM Interfaces · react.go ReAct Agent
Components 21
Client API
- AI Client
client.go - Shared Types
pkg/core/types.go
RAG Pipeline
- Document Loader
pkg/loader/file.go - Text Splitter
pkg/splitter/recursive.go - Retrieval Strategies
pkg/retriever - Reranker
pkg/reranker/reranker.go - RAG Prompt
pkg/prompt/simple.go
Providers and Storage
- Embedding
pkg/embedding/embedding.go - Vector Store
pkg/vectordb/vectordb.go - LLM Interfaces
pkg/llm/llm.go - Ollama Provider
plugins/ollama/chat.go
Agents and Tools
- ReAct Agent
pkg/agent/react.go - Tool Interface
pkg/tools/tools.go - Calculator Tool
pkg/agent/tools/calculator.go - HTTP Tool
pkg/agent/tools/http.go
Runtime Capabilities
- Conversation Memory
pkg/memory/inmemory.go - DAG Workflows
pkg/workflow - MCP Client
pkg/mcp/client.go - Observability
pkg/telemetry - Streaming
pkg/llm/llm.go
Other components
- Application User
Connections 24
- Application User → AI Client: calls
- AI Client → LLM Interfaces: opens provider
client.go - AI Client → Embedding: opens provider
client.go - AI Client → Vector Store: opens provider
client.go - AI Client → Document Loader: loads documents
client.go - AI Client → Text Splitter: splits documents
client.go - AI Client → Embedding: embeds chunks
client.go - AI Client → Vector Store: inserts documents
client.go - AI Client → Embedding: embeds query
client.go - AI Client → Retrieval Strategies: retrieves documents
client.go - Retrieval Strategies → Vector Store: searches vectors
- AI Client → Reranker: reranks results
- AI Client → RAG Prompt: builds prompt
- AI Client → LLM Interfaces: generates answer
- AI Client → Conversation Memory: stores conversation
- AI Client → ReAct Agent: runs goal
client.go - ReAct Agent → LLM Interfaces: requests completion
pkg/agent/react.go - ReAct Agent → Tool Interface: executes tool
pkg/agent/react.go - Ollama Provider → LLM Interfaces: implements chat
plugins/ollama/chat.go - Ollama Provider → Embedding: implements embeddings
- AI Client → DAG Workflows: offers workflows
- AI Client → MCP Client: offers MCP
- AI Client → Streaming: offers streaming
- AI Client → Observability: offers observability