# alladinchik7/yuima_ai-agent architecture

> Architecture diagram of the GitHub repository alladinchik7/yuima_ai-agent, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alladinchik7/yuima_ai-agent
- Repository: https://github.com/alladinchik7/yuima_ai-agent

## Overview

Yuima is a Go desktop AI assistant. A user submits a message in the Fyne UI; the agent asks a configured LLM, dispatches requested tools, and returns a response to the UI. The product also includes persistent dialog/task/reminder storage, web search and weather tools, history compression, background task cleanup, and reminder notifications. The graph preserves README-described capabilities, but omits unverified internal links where source excerpts do not show the calls.

Main entry points: [`cmd/desktop/main.go`](https://github.com/alladinchik7/yuima_ai-agent/blob/main/cmd/desktop/main.go) (Application startup), [`internal/ui/app.go`](https://github.com/alladinchik7/yuima_ai-agent/blob/main/internal/ui/app.go) (Desktop UI), [`internal/agent/agent.go`](https://github.com/alladinchik7/yuima_ai-agent/blob/main/internal/agent/agent.go) (Agent loop), [`internal/bootstrap`](https://github.com/alladinchik7/yuima_ai-agent/tree/main/internal/bootstrap) (Dependency setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop experience"]
  node_desktop_app["Desktop UI<br/>[app.go]"]
  node_entrypoint["Application startup<br/>[main.go]"]
  node_config["Configuration<br/>[config.go]"]
  node_bootstrap["Dependency setup"]
end

subgraph group_agent["Agent and tools"]
  node_agent_core["Agent loop<br/>[agent.go]"]
  node_tool_registry["Tool registry<br/>[tool.go]"]
  node_todo_tools["Todo tools"]
  node_reminder_tools["Reminder tools"]
  node_weather_tool["Weather tool<br/>[weather_tool.go]"]
  node_web_tool["Web search tool<br/>[web_search.go]"]
  node_llm_provider["LLM provider"]
end

subgraph group_services["Background services"]
  node_cleaner["Task cleanup<br/>[cleaner.go]"]
  node_reminder_service["Reminder service<br/>[service.go]"]
end

subgraph group_data["Storage and integrations"]
  node_search_client["Search client<br/>[client.go]"]
  node_weather_client["Weather client<br/>[weather.go]"]
  node_store_api["Storage interfaces<br/>[store.go]"]
  node_sqlite_store[("SQLite storage")]
  node_memory_store[("In-memory storage")]
end

node_user(("User"))
node_searxng["SearxNG"]
node_weather_service["Weather service"]
node_system_notifications["System notifications"]

node_user -->|"sends message"| node_desktop_app
node_desktop_app -->|"submits input"| node_agent_core
node_agent_core -->|"requests completion"| node_llm_provider
node_agent_core -->|"dispatches calls"| node_tool_registry
node_desktop_app -->|"shows response"| node_user
node_entrypoint -->|"loads settings"| node_config
node_entrypoint -->|"initializes dependencies"| node_bootstrap
node_entrypoint -->|"creates and runs"| node_desktop_app
node_entrypoint -->|"creates agent"| node_agent_core
node_entrypoint -->|"registers tools"| node_todo_tools
node_entrypoint -->|"registers tools"| node_reminder_tools
node_entrypoint -->|"registers tool"| node_weather_tool
node_entrypoint -->|"registers tool"| node_web_tool
node_entrypoint -->|"starts service"| node_cleaner
node_entrypoint -->|"starts service"| node_reminder_service
node_entrypoint -->|"initializes search"| node_search_client
node_search_client -->|"queries"| node_searxng
node_weather_client -->|"requests weather"| node_weather_service
node_agent_core -->|"loads and saves summaries"| node_store_api
node_cleaner -.->|"lists and deletes tasks"| node_store_api
node_reminder_service -->|"reads and marks reminders"| node_store_api
node_reminder_service -->|"notifies through callback"| node_desktop_app
node_desktop_app -->|"sends notification"| node_system_notifications
node_bootstrap -.->|"selects storage"| node_sqlite_store
node_bootstrap -.->|"selects storage"| node_memory_store

click node_desktop_app "https://github.com/alladinchik7/yuima_ai-agent/blob/main/internal/ui/app.go"
click node_entrypoint "https://github.com/alladinchik7/yuima_ai-agent/blob/main/cmd/desktop/main.go"
click node_agent_core "https://github.com/alladinchik7/yuima_ai-agent/blob/main/internal/agent/agent.go"
click node_tool_registry "https://github.com/alladinchik7/yuima_ai-agent/blob/main/internal/tools/tool.go"
click node_todo_tools "https://github.com/alladinchik7/yuima_ai-agent/tree/main/internal/tools/todo"
click node_reminder_tools "https://github.com/alladinchik7/yuima_ai-agent/tree/main/internal/tools/remindertools"
click node_weather_tool "https://github.com/alladinchik7/yuima_ai-agent/blob/main/internal/tools/weathertools/weather_tool.go"
click node_web_tool "https://github.com/alladinchik7/yuima_ai-agent/blob/main/internal/tools/webtools/web_search.go"
click node_llm_provider "https://github.com/alladinchik7/yuima_ai-agent/tree/main/internal/llm"
click node_search_client "https://github.com/alladinchik7/yuima_ai-agent/blob/main/internal/search/client.go"
click node_weather_client "https://github.com/alladinchik7/yuima_ai-agent/blob/main/internal/weather/weather.go"
click node_store_api "https://github.com/alladinchik7/yuima_ai-agent/blob/main/internal/storage/store.go"
click node_sqlite_store "https://github.com/alladinchik7/yuima_ai-agent/tree/main/internal/storage/sqlite"
click node_memory_store "https://github.com/alladinchik7/yuima_ai-agent/tree/main/internal/storage/memory"
click node_cleaner "https://github.com/alladinchik7/yuima_ai-agent/blob/main/internal/cleaner/cleaner.go"
click node_reminder_service "https://github.com/alladinchik7/yuima_ai-agent/blob/main/internal/reminder/service.go"
click node_config "https://github.com/alladinchik7/yuima_ai-agent/blob/main/internal/config/config.go"
click node_bootstrap "https://github.com/alladinchik7/yuima_ai-agent/tree/main/internal/bootstrap"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_desktop_app,node_entrypoint,node_config,node_bootstrap,node_user toneBlue
class node_agent_core,node_tool_registry,node_todo_tools,node_reminder_tools,node_weather_tool,node_web_tool,node_llm_provider toneAmber
class node_cleaner,node_reminder_service toneMint
class node_search_client,node_weather_client,node_store_api,node_sqlite_store,node_memory_store toneRose
class node_searxng,node_weather_service,node_system_notifications toneIndigo
```

## Components

### Desktop experience

- [Desktop UI](https://github.com/alladinchik7/yuima_ai-agent/blob/main/internal/ui/app.go): `internal/ui/app.go`
- [Application startup](https://github.com/alladinchik7/yuima_ai-agent/blob/main/cmd/desktop/main.go): `cmd/desktop/main.go`
- [Configuration](https://github.com/alladinchik7/yuima_ai-agent/blob/main/internal/config/config.go): `internal/config/config.go`
- [Dependency setup](https://github.com/alladinchik7/yuima_ai-agent/tree/main/internal/bootstrap): `internal/bootstrap`

### Agent and tools

- [Agent loop](https://github.com/alladinchik7/yuima_ai-agent/blob/main/internal/agent/agent.go): `internal/agent/agent.go`
- [Tool registry](https://github.com/alladinchik7/yuima_ai-agent/blob/main/internal/tools/tool.go): `internal/tools/tool.go`
- [Todo tools](https://github.com/alladinchik7/yuima_ai-agent/tree/main/internal/tools/todo): `internal/tools/todo`
- [Reminder tools](https://github.com/alladinchik7/yuima_ai-agent/tree/main/internal/tools/remindertools): `internal/tools/remindertools`
- [Weather tool](https://github.com/alladinchik7/yuima_ai-agent/blob/main/internal/tools/weathertools/weather_tool.go): `internal/tools/weathertools/weather_tool.go`
- [Web search tool](https://github.com/alladinchik7/yuima_ai-agent/blob/main/internal/tools/webtools/web_search.go): `internal/tools/webtools/web_search.go`
- [LLM provider](https://github.com/alladinchik7/yuima_ai-agent/tree/main/internal/llm): `internal/llm`

### Background services

- [Task cleanup](https://github.com/alladinchik7/yuima_ai-agent/blob/main/internal/cleaner/cleaner.go): `internal/cleaner/cleaner.go`
- [Reminder service](https://github.com/alladinchik7/yuima_ai-agent/blob/main/internal/reminder/service.go): `internal/reminder/service.go`

### Storage and integrations

- [Search client](https://github.com/alladinchik7/yuima_ai-agent/blob/main/internal/search/client.go): `internal/search/client.go`
- [Weather client](https://github.com/alladinchik7/yuima_ai-agent/blob/main/internal/weather/weather.go): `internal/weather/weather.go`
- [Storage interfaces](https://github.com/alladinchik7/yuima_ai-agent/blob/main/internal/storage/store.go): `internal/storage/store.go`
- [SQLite storage](https://github.com/alladinchik7/yuima_ai-agent/tree/main/internal/storage/sqlite): `internal/storage/sqlite`
- [In-memory storage](https://github.com/alladinchik7/yuima_ai-agent/tree/main/internal/storage/memory): `internal/storage/memory`

### Other components

- **User**
- **SearxNG**
- **Weather service**
- **System notifications**

## Connections

- User → Desktop UI: sends message (evidence: `internal/ui/app.go`)
- Desktop UI → Agent loop: submits input (evidence: `internal/ui/app.go`)
- Agent loop → LLM provider: requests completion (evidence: `internal/agent/agent.go`)
- Agent loop → Tool registry: dispatches calls (evidence: `internal/agent/agent.go`)
- Desktop UI → User: shows response (evidence: `internal/ui/app.go`)
- Application startup → Configuration: loads settings (evidence: `cmd/desktop/main.go`)
- Application startup → Dependency setup: initializes dependencies (evidence: `cmd/desktop/main.go`)
- Application startup → Desktop UI: creates and runs (evidence: `cmd/desktop/main.go`)
- Application startup → Agent loop: creates agent (evidence: `cmd/desktop/main.go`)
- Application startup → Todo tools: registers tools (evidence: `cmd/desktop/main.go`)
- Application startup → Reminder tools: registers tools (evidence: `cmd/desktop/main.go`)
- Application startup → Weather tool: registers tool (evidence: `cmd/desktop/main.go`)
- Application startup → Web search tool: registers tool (evidence: `cmd/desktop/main.go`)
- Application startup → Task cleanup: starts service (evidence: `cmd/desktop/main.go`)
- Application startup → Reminder service: starts service (evidence: `cmd/desktop/main.go`)
- Application startup → Search client: initializes search (evidence: `cmd/desktop/main.go`)
- Search client → SearxNG: queries (evidence: `internal/search/client.go`)
- Weather client → Weather service: requests weather (evidence: `internal/weather/weather.go`)
- Agent loop → Storage interfaces: loads and saves summaries (evidence: `internal/agent/agent.go`)
- Task cleanup → Storage interfaces: lists and deletes tasks
- Reminder service → Storage interfaces: reads and marks reminders (evidence: `internal/reminder/service.go`)
- Reminder service → Desktop UI: notifies through callback
- Desktop UI → System notifications: sends notification (evidence: `internal/ui/app.go`)
- Dependency setup → SQLite storage: selects storage
- Dependency setup → In-memory storage: selects storage
