# citedy/adclaw architecture

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

- Interactive diagram: https://gitdiagram.com/citedy/adclaw
- Repository: https://github.com/citedy/adclaw

## Overview

AdClaw is a multi-agent AI marketing platform operated through chat channels and a browser console. Users submit requests to specialized personas; agents can delegate work, use skills and MCP tools, and share memory, then return results through their channel. Scheduled jobs and heartbeat runs provide a second initiating path. The graph preserves the documented console, model, skill-security, memory, publishing, and channel capabilities. Several backend links are documented only at product level because their implementation files were not sampled.

Main entry points: [`src/adclaw/agents/react_agent.py`](https://github.com/citedy/adclaw/blob/main/src/adclaw/agents/react_agent.py) (Agent Runtime), [`src/adclaw/app/runner`](https://github.com/citedy/adclaw/tree/main/src/adclaw/app/runner) (Session Runner), [`src/adclaw/app/channels`](https://github.com/citedy/adclaw/tree/main/src/adclaw/app/channels) (Chat Channels), [`src/adclaw/app/channels/manager.py`](https://github.com/citedy/adclaw/blob/main/src/adclaw/app/channels/manager.py) (Channel Manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User Experience"]
  node_channels["Chat Channels"]
  node_channel_manager["Channel Manager<br/>[manager.py]"]
  node_console["Web Console"]
  node_console_api["Console API Client<br/>[index.ts]"]
  node_http_api["HTTP Routers"]
end

subgraph group_runtime["Agent Runtime"]
  node_runner["Session Runner"]
  node_agent["Agent Runtime<br/>[react_agent.py]"]
  node_coordinator["Agent Coordinator"]
  node_personas["Personas<br/>[persona_manager.py]"]
end

subgraph group_capabilities["Agent Capabilities"]
  node_skills["Skills Library"]
  node_skill_management["Skill Management<br/>[skills_manager.py]"]
  node_skill_scanning["Skill Security<br/>[skill_scanner.py]"]
  node_mcp["MCP Integrations"]
  node_tools["Agent Tools"]
  node_publisher["File Publishing<br/>[herenow_publish.py]"]
end

subgraph group_operations["Operations &amp; Configuration"]
  node_providers["Model Providers"]
  node_local_models["Local Models"]
  node_config["Configuration<br/>[config.py]"]
  node_scheduler["Scheduled Jobs<br/>[manager.py]"]
end

subgraph group_memory["Memory"]
  node_memory_manager["Memory Agent<br/>[manager.py]"]
  node_memory_store[("Memory Store<br/>[store.py]")]
end

node_user(("User"))
node_external_services{{"External Services"}}

node_user -->|"sends request"| node_channels
node_user -->|"uses console"| node_console
node_channels -->|"delivers messages"| node_channel_manager
node_channel_manager -.->|"dispatches sessions"| node_runner
node_console -.->|"requests operations"| node_console_api
node_console_api -.->|"calls endpoints"| node_http_api
node_runner -.->|"runs agent"| node_agent
node_agent -->|"uses identity"| node_personas
node_agent -->|"delegates tasks"| node_coordinator
node_agent -->|"uses skills"| node_skills
node_skill_management -->|"scans skills"| node_skill_scanning
node_agent -->|"uses integrations"| node_mcp
node_agent -->|"invokes tools"| node_tools
node_tools -->|"publishes files"| node_publisher
node_agent -->|"requests completions"| node_providers
node_agent -->|"uses local models"| node_local_models
node_agent -->|"shares memory"| node_memory_manager
node_memory_manager -->|"reads and writes"| node_memory_store
node_scheduler -.->|"starts scheduled runs"| node_runner
node_config -->|"configures heartbeat"| node_scheduler
node_providers -->|"connects models"| node_external_services
node_mcp -->|"connects services"| node_external_services

click node_channels "https://github.com/citedy/adclaw/tree/main/src/adclaw/app/channels"
click node_channel_manager "https://github.com/citedy/adclaw/blob/main/src/adclaw/app/channels/manager.py"
click node_console "https://github.com/citedy/adclaw/tree/main/console/src/pages"
click node_console_api "https://github.com/citedy/adclaw/blob/main/console/src/api/index.ts"
click node_http_api "https://github.com/citedy/adclaw/tree/main/src/adclaw/app/routers"
click node_runner "https://github.com/citedy/adclaw/tree/main/src/adclaw/app/runner"
click node_agent "https://github.com/citedy/adclaw/blob/main/src/adclaw/agents/react_agent.py"
click node_coordinator "https://github.com/citedy/adclaw/tree/main/src/adclaw/agents/coordinator"
click node_personas "https://github.com/citedy/adclaw/blob/main/src/adclaw/agents/persona_manager.py"
click node_skills "https://github.com/citedy/adclaw/tree/main/src/adclaw/agents/skills"
click node_skill_management "https://github.com/citedy/adclaw/blob/main/src/adclaw/agents/skills_manager.py"
click node_skill_scanning "https://github.com/citedy/adclaw/blob/main/src/adclaw/agents/skill_scanner.py"
click node_mcp "https://github.com/citedy/adclaw/tree/main/src/adclaw/app/mcp"
click node_tools "https://github.com/citedy/adclaw/tree/main/src/adclaw/agents/tools"
click node_publisher "https://github.com/citedy/adclaw/blob/main/src/adclaw/agents/tools/herenow_publish.py"
click node_providers "https://github.com/citedy/adclaw/tree/main/src/adclaw/providers"
click node_local_models "https://github.com/citedy/adclaw/tree/main/src/adclaw/local_models"
click node_config "https://github.com/citedy/adclaw/blob/main/src/adclaw/config/config.py"
click node_scheduler "https://github.com/citedy/adclaw/blob/main/src/adclaw/app/crons/manager.py"
click node_memory_manager "https://github.com/citedy/adclaw/blob/main/src/adclaw/memory_agent/manager.py"
click node_memory_store "https://github.com/citedy/adclaw/blob/main/src/adclaw/memory_agent/store.py"

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_channels,node_channel_manager,node_console,node_console_api,node_http_api,node_user toneBlue
class node_runner,node_agent,node_coordinator,node_personas toneAmber
class node_skills,node_skill_management,node_skill_scanning,node_mcp,node_tools,node_publisher toneMint
class node_providers,node_local_models,node_config,node_scheduler toneRose
class node_memory_manager,node_memory_store,node_external_services toneIndigo
```

## Components

### User Experience

- [Chat Channels](https://github.com/citedy/adclaw/tree/main/src/adclaw/app/channels): `src/adclaw/app/channels`
- [Channel Manager](https://github.com/citedy/adclaw/blob/main/src/adclaw/app/channels/manager.py): `src/adclaw/app/channels/manager.py`
- [Web Console](https://github.com/citedy/adclaw/tree/main/console/src/pages): `console/src/pages`
- [Console API Client](https://github.com/citedy/adclaw/blob/main/console/src/api/index.ts): `console/src/api/index.ts`
- [HTTP Routers](https://github.com/citedy/adclaw/tree/main/src/adclaw/app/routers): `src/adclaw/app/routers`

### Agent Runtime

- [Session Runner](https://github.com/citedy/adclaw/tree/main/src/adclaw/app/runner): `src/adclaw/app/runner`
- [Agent Runtime](https://github.com/citedy/adclaw/blob/main/src/adclaw/agents/react_agent.py): `src/adclaw/agents/react_agent.py`
- [Agent Coordinator](https://github.com/citedy/adclaw/tree/main/src/adclaw/agents/coordinator): `src/adclaw/agents/coordinator`
- [Personas](https://github.com/citedy/adclaw/blob/main/src/adclaw/agents/persona_manager.py): `src/adclaw/agents/persona_manager.py`

### Agent Capabilities

- [Skills Library](https://github.com/citedy/adclaw/tree/main/src/adclaw/agents/skills): `src/adclaw/agents/skills`
- [Skill Management](https://github.com/citedy/adclaw/blob/main/src/adclaw/agents/skills_manager.py): `src/adclaw/agents/skills_manager.py`
- [Skill Security](https://github.com/citedy/adclaw/blob/main/src/adclaw/agents/skill_scanner.py): `src/adclaw/agents/skill_scanner.py`
- [MCP Integrations](https://github.com/citedy/adclaw/tree/main/src/adclaw/app/mcp): `src/adclaw/app/mcp`
- [Agent Tools](https://github.com/citedy/adclaw/tree/main/src/adclaw/agents/tools): `src/adclaw/agents/tools`
- [File Publishing](https://github.com/citedy/adclaw/blob/main/src/adclaw/agents/tools/herenow_publish.py): `src/adclaw/agents/tools/herenow_publish.py`

### Operations & Configuration

- [Model Providers](https://github.com/citedy/adclaw/tree/main/src/adclaw/providers): `src/adclaw/providers`
- [Local Models](https://github.com/citedy/adclaw/tree/main/src/adclaw/local_models): `src/adclaw/local_models`
- [Configuration](https://github.com/citedy/adclaw/blob/main/src/adclaw/config/config.py): `src/adclaw/config/config.py`
- [Scheduled Jobs](https://github.com/citedy/adclaw/blob/main/src/adclaw/app/crons/manager.py): `src/adclaw/app/crons/manager.py`

### Memory

- [Memory Agent](https://github.com/citedy/adclaw/blob/main/src/adclaw/memory_agent/manager.py): `src/adclaw/memory_agent/manager.py`
- [Memory Store](https://github.com/citedy/adclaw/blob/main/src/adclaw/memory_agent/store.py): `src/adclaw/memory_agent/store.py`

### Other components

- **User**
- **External Services**

## Connections

- User → Chat Channels: sends request
- User → Web Console: uses console
- Chat Channels → Channel Manager: delivers messages (evidence: `src/adclaw/app/channels/manager.py`)
- Channel Manager → Session Runner: dispatches sessions
- Web Console → Console API Client: requests operations (evidence: `console/src/pages/Control/Sessions/useSessions.ts`)
- Console API Client → HTTP Routers: calls endpoints
- Session Runner → Agent Runtime: runs agent
- Agent Runtime → Personas: uses identity
- Agent Runtime → Agent Coordinator: delegates tasks
- Agent Runtime → Skills Library: uses skills
- Skill Management → Skill Security: scans skills (evidence: `src/adclaw/agents/skills_manager.py`)
- Agent Runtime → MCP Integrations: uses integrations
- Agent Runtime → Agent Tools: invokes tools
- Agent Tools → File Publishing: publishes files
- Agent Runtime → Model Providers: requests completions
- Agent Runtime → Local Models: uses local models
- Agent Runtime → Memory Agent: shares memory
- Memory Agent → Memory Store: reads and writes (evidence: `src/adclaw/memory_agent/manager.py`)
- Scheduled Jobs → Session Runner: starts scheduled runs
- Configuration → Scheduled Jobs: configures heartbeat (evidence: `src/adclaw/app/crons/manager.py`)
- Model Providers → External Services: connects models
- MCP Integrations → External Services: connects services
