---
title: Architecture - Automation Flow
area: infrastructure
tags: [infrastructure, architecture, diagrams, automation]
created: 2026-04-16
updated: 2026-05-19
status: active
related: [[Infrastructure/Architecture]], [[Infrastructure/Architecture - Overview]], [[Infrastructure/Architecture - Service Topology]], [[Infrastructure/Automation/Cron Jobs]], [[Infrastructure/Automation/n8n Workflows]]
---

# Architecture - Automation Flow

Flow-oriented view of how messages, memory, automations, and storage move through the system.

```mermaid
flowchart TB
    subgraph Inputs[Inputs]
        direction LR
        Discord[Discord]
        Telegram[Telegram]
        Webchat[Web chat]
    end

    subgraph OpenClaw[OpenClaw orchestration]
        direction TB
        Routing[Session and message routing]
        Agents[Main agent and subagents]
        Memory[Memory search and note handling]
        Cron[OpenClaw cron]
        Scripts[Workspace scripts]
    end

    subgraph Services[Execution services]
        direction LR
        SearchNet[Search backends]
        GoogleWS[Google Workspace]
        LLM[Local Gemma]
        Embeddings[Ollama embeddings]
        Voice[Whisper and Kokoro]
        N8N[n8n-agent]
    end

    subgraph Knowledge[Knowledge and storage]
        direction LR
        Daily[memory daily notes]
        Longterm[MEMORY.md]
        Vault[Obsidian shared vault]
        Backup[MinIO backups]
        Repo[Gitea repo]
    end

    Discord --> Routing
    Telegram --> Routing
    Webchat --> Routing

    Routing --> Agents
    Agents --> Memory
    Agents --> SearchNet
    Agents --> GoogleWS
    Agents --> LLM
    Agents --> Voice
    Agents --> N8N

    Memory --> Embeddings
    Memory --> Daily
    Memory --> Longterm
    Agents --> Vault

    Cron --> Agents
    Cron --> Scripts
    Scripts --> Backup
    Scripts --> Repo
    N8N --> GoogleWS
    N8N --> Vault

    classDef input fill:#dcecff,stroke:#4a78b8,color:#17365d;
    classDef core fill:#e8f5e9,stroke:#4f8a5b,color:#1f4d2d;
    classDef svc fill:#eef3ff,stroke:#6a7fb8,color:#25324a;
    classDef store fill:#f7e8ff,stroke:#8b62b3,color:#44235e;

    class Discord,Telegram,Webchat input;
    class Routing,Agents,Memory,Cron,Scripts core;
    class SearchNet,GoogleWS,LLM,Embeddings,Voice,N8N svc;
    class Daily,Longterm,Vault,Backup,Repo store;
```
