Skip to main content

Architecture

A high-level look at the Youkore system. For details, dive into the per-module pages linked below.

Three layers

┌─────────────────────────────────────────────────────┐
│ Flutter client (desktop, mobile coming) │
│ – chat UI, settings, plugin store, voice │
└────────────────────────┬────────────────────────────┘
│ HTTP + WebSocket

┌─────────────────────────────────────────────────────┐
│ Gateway (Python, Nuitka-compiled) │
│ – agent runner, tool dispatch │
│ – integration manager, channel processors │
│ – local DB (SQLite + ChromaDB) │
└────────────────────────┬────────────────────────────┘
│ HTTPS

┌─────────────────────────────────────────────────────┐
│ Cloudflare workers (cloud) │
│ – accounts (auth, OAuth, support) │
│ – releases (signed Youkore builds) │
│ – plugins (signed plugin store) │
│ – admin (multi-DB dashboard) │
└─────────────────────────────────────────────────────┘

Major modules in the gateway

  • src/agent/ — agent definitions (AgentDefinition), per-call runs (AgentRun), prompt assembly (PromptBuilder), context vars (run_scope)
  • src/tools/controller_tools.py aggregates TOOL_DEFINITIONS from feature modules (filesystem, bash, memory, web, …); ToolManager (in providers/) merges controller, MCP, and plugin tool providers
  • src/integrations/ — per-integration packages, each providing a BaseConnector subclass and a controller
  • src/gateway/ — HTTP server, lifecycle, auth tokens, channel base classes (channels/base.py: BaseChannel, channel_processing.py: BaseChannelProcessor), routes
  • src/core/IntegrationManager, release verification, cloud account, OAuth helpers
  • src/llm/ — LLM providers (OpenAI, Claude, Groq, Moonshot, …) behind a common interface
  • microservices/app.py — STT/TTS/memory subprocess on port 8100, piped through structured logging

Data layout

User data lives under ~/.youkore/: agents (config/agents/), conversations (sessions/), plugins, vector memory (memory/), credentials, projects, skills, wiki.

Platform-specific app data (browser profile, caches) lives under PLATFORM_DATA_DIR, which resolves to %APPDATA%/Youkore/ on Windows, ~/Library/Application Support/Youkore/ on macOS, and $XDG_DATA_HOME/youkore/ on Linux. Transient working files go in <system-temp>/youkore/.

All paths are centralized in src/config/paths.py.

Cloud workers

Three D1 databases, three workers, three R2 buckets — kept separate for compromise isolation:

  • youkore-accounts — users, auth, OAuth, support, audit
  • youkore-releases — Youkore client builds, signatures
  • youkore-plugins — plugin catalog, versioned bundles, signatures

The signing keys (RSA-4096) are offline on a USB drive (or hardware token); the public keys are embedded in workers and the client.