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.pyaggregatesTOOL_DEFINITIONSfrom feature modules (filesystem, bash, memory, web, …);ToolManager(inproviders/) merges controller, MCP, and plugin tool providerssrc/integrations/— per-integration packages, each providing aBaseConnectorsubclass and a controllersrc/gateway/— HTTP server, lifecycle, auth tokens, channel base classes (channels/base.py: BaseChannel,channel_processing.py: BaseChannelProcessor), routessrc/core/—IntegrationManager, release verification, cloud account, OAuth helperssrc/llm/— LLM providers (OpenAI, Claude, Groq, Moonshot, …) behind a common interfacemicroservices/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, audityoukore-releases— Youkore client builds, signaturesyoukore-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.