# bugraakdemir/memo architecture

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

- Interactive diagram: https://gitdiagram.com/bugraakdemir/memo
- Repository: https://github.com/bugraakdemir/memo

## Overview

Memo is a local-first AI assistant: a user chats with it, it retrieves long-term context, routes model requests, and can perform permission-gated actions. Its documented product branches include projects, skills and sub-agents, mail and digital-twin workflows, proactive suggestions and briefings, voice, and synchronization. The excerpts show agent execution and selected subsystem behavior, but not application wiring or the Dart UI; uncertain connections are therefore omitted or marked unverified.

Main entry points: [`internal/app/chat.go`](https://github.com/bugraakdemir/memo/blob/main/internal/app/chat.go) (Chat handling), [`internal/agent/pipeline.go`](https://github.com/bugraakdemir/memo/blob/main/internal/agent/pipeline.go) (Agent execution), [`main.go`](https://github.com/bugraakdemir/memo/blob/main/main.go) (App bootstrap), [`internal/webserver/server.go`](https://github.com/bugraakdemir/memo/blob/main/internal/webserver/server.go) (App server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["App interaction"]
  node_app["App bootstrap<br/>[main.go]"]
  node_web["App server<br/>[server.go]"]
  node_linux["Linux runner<br/>[my_application.h]"]
  node_windows["Windows runner<br/>[flutter_window.h]"]
  node_chat["Chat handling<br/>[chat.go]"]
end

subgraph group_agent["Assistant runtime"]
  node_llm["Model routing<br/>[llm.go]"]
  node_provider["Model providers<br/>[router.go]"]
  node_pipeline["Agent execution<br/>[pipeline.go]"]
  node_toolset["Action tools<br/>[tools.go]"]
  node_skills["Skills<br/>[manager.go]"]
  node_subagents["Sub-agents<br/>[manager.go]"]
end

subgraph group_personal["Personal context"]
  node_memory[("Conversation memory<br/>[store.go]")]
  node_projects["Project context<br/>[manager.go]"]
end

subgraph group_automation["Automation"]
  node_mail["Mail handling<br/>[manager.go]"]
  node_twin["Digital twin<br/>[actions.go]"]
  node_autonomy["Autonomy engine<br/>[engine.go]"]
  node_proactive["Proactive engine<br/>[engine.go]"]
  node_taskloop["Task execution<br/>[engine.go]"]
end

subgraph group_platform["Integrations"]
  node_calendar["Calendar<br/>[bridge.go]"]
  node_voice["Voice input/output<br/>[router.go]"]
  node_sync["Cloud sync<br/>[sync_manager.go]"]
  node_browser["Web research<br/>[search.go]"]
end

node_user(("User"))

node_user -.->|"chats with"| node_chat
node_app -.->|"starts"| node_web
node_web -.->|"routes chat"| node_chat
node_linux -.->|"launches"| node_app
node_windows -.->|"launches"| node_app
node_chat -.->|"requests response"| node_llm
node_llm -.->|"routes model calls"| node_provider
node_chat -->|"retrieves context"| node_memory
node_chat -->|"runs agent turns"| node_pipeline
node_pipeline -->|"executes tools"| node_toolset
node_pipeline -->|"uses skills"| node_skills
node_pipeline -->|"delegates work"| node_subagents
node_chat -->|"uses project context"| node_projects
node_mail -->|"drafts in user style"| node_twin
node_autonomy -->|"creates events"| node_calendar
node_proactive -.->|"runs auto actions"| node_pipeline
node_chat -->|"manages task lists"| node_taskloop
node_chat -->|"accepts voice input"| node_voice
node_chat -->|"enriches replies"| node_browser
node_app -.->|"syncs data"| node_sync

click node_app "https://github.com/bugraakdemir/memo/blob/main/main.go"
click node_web "https://github.com/bugraakdemir/memo/blob/main/internal/webserver/server.go"
click node_linux "https://github.com/bugraakdemir/memo/blob/main/frontend/linux/runner/my_application.h"
click node_windows "https://github.com/bugraakdemir/memo/blob/main/frontend/windows/runner/flutter_window.h"
click node_chat "https://github.com/bugraakdemir/memo/blob/main/internal/app/chat.go"
click node_llm "https://github.com/bugraakdemir/memo/blob/main/internal/app/llm.go"
click node_provider "https://github.com/bugraakdemir/memo/blob/main/internal/provider/router.go"
click node_pipeline "https://github.com/bugraakdemir/memo/blob/main/internal/agent/pipeline.go"
click node_toolset "https://github.com/bugraakdemir/memo/blob/main/internal/agent/tools.go"
click node_memory "https://github.com/bugraakdemir/memo/blob/main/internal/memory/store.go"
click node_projects "https://github.com/bugraakdemir/memo/blob/main/internal/project/manager.go"
click node_skills "https://github.com/bugraakdemir/memo/blob/main/internal/skill/manager.go"
click node_subagents "https://github.com/bugraakdemir/memo/blob/main/internal/subagents/manager.go"
click node_mail "https://github.com/bugraakdemir/memo/blob/main/internal/mail/manager.go"
click node_twin "https://github.com/bugraakdemir/memo/blob/main/internal/twin/actions.go"
click node_autonomy "https://github.com/bugraakdemir/memo/blob/main/internal/autonomy/engine.go"
click node_calendar "https://github.com/bugraakdemir/memo/blob/main/internal/calendar/bridge.go"
click node_proactive "https://github.com/bugraakdemir/memo/blob/main/internal/proactive/engine.go"
click node_taskloop "https://github.com/bugraakdemir/memo/blob/main/internal/taskloop/engine.go"
click node_voice "https://github.com/bugraakdemir/memo/blob/main/internal/stt/router.go"
click node_sync "https://github.com/bugraakdemir/memo/blob/main/internal/cloudsync/sync_manager.go"
click node_browser "https://github.com/bugraakdemir/memo/blob/main/internal/websearch/search.go"

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_app,node_web,node_linux,node_windows,node_chat,node_user toneBlue
class node_llm,node_provider,node_pipeline,node_toolset,node_skills,node_subagents toneAmber
class node_memory,node_projects toneMint
class node_mail,node_twin,node_autonomy,node_proactive,node_taskloop toneRose
class node_calendar,node_voice,node_sync,node_browser toneIndigo
```

## Components

### App interaction

- [App bootstrap](https://github.com/bugraakdemir/memo/blob/main/main.go): `main.go`
- [App server](https://github.com/bugraakdemir/memo/blob/main/internal/webserver/server.go): `internal/webserver/server.go`
- [Linux runner](https://github.com/bugraakdemir/memo/blob/main/frontend/linux/runner/my_application.h): `frontend/linux/runner/my_application.h`
- [Windows runner](https://github.com/bugraakdemir/memo/blob/main/frontend/windows/runner/flutter_window.h): `frontend/windows/runner/flutter_window.h`
- [Chat handling](https://github.com/bugraakdemir/memo/blob/main/internal/app/chat.go): `internal/app/chat.go`

### Assistant runtime

- [Model routing](https://github.com/bugraakdemir/memo/blob/main/internal/app/llm.go): `internal/app/llm.go`
- [Model providers](https://github.com/bugraakdemir/memo/blob/main/internal/provider/router.go): `internal/provider/router.go`
- [Agent execution](https://github.com/bugraakdemir/memo/blob/main/internal/agent/pipeline.go): `internal/agent/pipeline.go`
- [Action tools](https://github.com/bugraakdemir/memo/blob/main/internal/agent/tools.go): `internal/agent/tools.go`
- [Skills](https://github.com/bugraakdemir/memo/blob/main/internal/skill/manager.go): `internal/skill/manager.go`
- [Sub-agents](https://github.com/bugraakdemir/memo/blob/main/internal/subagents/manager.go): `internal/subagents/manager.go`

### Personal context

- [Conversation memory](https://github.com/bugraakdemir/memo/blob/main/internal/memory/store.go): `internal/memory/store.go`
- [Project context](https://github.com/bugraakdemir/memo/blob/main/internal/project/manager.go): `internal/project/manager.go`

### Automation

- [Mail handling](https://github.com/bugraakdemir/memo/blob/main/internal/mail/manager.go): `internal/mail/manager.go`
- [Digital twin](https://github.com/bugraakdemir/memo/blob/main/internal/twin/actions.go): `internal/twin/actions.go`
- [Autonomy engine](https://github.com/bugraakdemir/memo/blob/main/internal/autonomy/engine.go): `internal/autonomy/engine.go`
- [Proactive engine](https://github.com/bugraakdemir/memo/blob/main/internal/proactive/engine.go): `internal/proactive/engine.go`
- [Task execution](https://github.com/bugraakdemir/memo/blob/main/internal/taskloop/engine.go): `internal/taskloop/engine.go`

### Integrations

- [Calendar](https://github.com/bugraakdemir/memo/blob/main/internal/calendar/bridge.go): `internal/calendar/bridge.go`
- [Voice input/output](https://github.com/bugraakdemir/memo/blob/main/internal/stt/router.go): `internal/stt/router.go`
- [Cloud sync](https://github.com/bugraakdemir/memo/blob/main/internal/cloudsync/sync_manager.go): `internal/cloudsync/sync_manager.go`
- [Web research](https://github.com/bugraakdemir/memo/blob/main/internal/websearch/search.go): `internal/websearch/search.go`

### Other components

- **User**

## Connections

- User → Chat handling: chats with
- App bootstrap → App server: starts
- App server → Chat handling: routes chat
- Linux runner → App bootstrap: launches
- Windows runner → App bootstrap: launches
- Chat handling → Model routing: requests response
- Model routing → Model providers: routes model calls
- Chat handling → Conversation memory: retrieves context (evidence: `README.md`)
- Chat handling → Agent execution: runs agent turns (evidence: `README.md`)
- Agent execution → Action tools: executes tools (evidence: `internal/agent/pipeline.go`)
- Agent execution → Skills: uses skills (evidence: `README.md`)
- Agent execution → Sub-agents: delegates work (evidence: `README.md`)
- Chat handling → Project context: uses project context (evidence: `README.md`)
- Mail handling → Digital twin: drafts in user style (evidence: `README.md`)
- Autonomy engine → Calendar: creates events (evidence: `internal/autonomy/engine.go`)
- Proactive engine → Agent execution: runs auto actions (evidence: `internal/proactive/engine.go`)
- Chat handling → Task execution: manages task lists (evidence: `README.md`)
- Chat handling → Voice input/output: accepts voice input (evidence: `README.md`)
- Chat handling → Web research: enriches replies (evidence: `README.md`)
- App bootstrap → Cloud sync: syncs data
