# dushu2006/arise_cc architecture

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

- Interactive diagram: https://gitdiagram.com/dushu2006/arise_cc
- Repository: https://github.com/dushu2006/arise_cc

## Overview

ARISE is an AI-powered automation platform exposed through a FastAPI runtime. The main workflow is an API request entering a domain endpoint, then being handled by task orchestration and execution, with model routing or other domain services supporting the operation. The repository also includes memory, policy, voice, automation, agent, security, and event capabilities. Several of these are represented by their tree paths and documented imports, but their detailed runtime wiring was not excerpted; those links are omitted where evidence is insufficient.

Main entry points: [`core/runtime/main.py`](https://github.com/dushu2006/arise_cc/blob/main/core/runtime/main.py) (FastAPI Runtime), [`core/task_engine/engine.py`](https://github.com/dushu2006/arise_cc/blob/main/core/task_engine/engine.py) (Task Engine), [`core/models/engine.py`](https://github.com/dushu2006/arise_cc/blob/main/core/models/engine.py) (Model Router), [`core/events/bus.py`](https://github.com/dushu2006/arise_cc/blob/main/core/events/bus.py) (Event Bus)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime API"]
  node_app["FastAPI Runtime<br/>[main.py]"]
  node_task_api["Task API<br/>[tasks.py]"]
  node_other_apis["Domain APIs"]
  node_voice["Voice API<br/>[voice.py]"]
  node_automation["Automation API<br/>[automation.py]"]
  node_agents["Agent API<br/>[agents.py]"]
end

subgraph group_execution["Task Execution"]
  node_task_engine["Task Engine<br/>[engine.py]"]
  node_task_queue["Task Queue<br/>[queue.py]"]
  node_checkpoint[("Task Checkpoints<br/>[checkpoint.py]")]
  node_executor["Task Executor<br/>[executor.py]"]
  node_task_kinds["Task Kinds<br/>[__init__.py]"]
end

subgraph group_intelligence["AI Services"]
  node_model_router["Model Router<br/>[engine.py]"]
  node_providers["Model Providers"]
  node_policy["Policy Engine<br/>[engine.py]"]
  node_memory["Memory Services"]
end

subgraph group_state["Events and State"]
  node_events["Event Bus<br/>[bus.py]"]
  node_event_handlers["Event Handlers<br/>[handlers.py]"]
  node_projections["Event Projections<br/>[projections.py]"]
  node_event_store[("Event Store<br/>[store.py]")]
  node_database[("Database Layer<br/>[base.py]")]
end

subgraph group_crosscut["Security and Operations"]
  node_config["Configuration"]
  node_security["Security Services"]
  node_errors["Error Handling"]
end

node_user(("API Client"))

node_user -->|"sends requests"| node_app
node_app -->|"routes to"| node_task_api
node_app -->|"registers routes"| node_other_apis
node_app -->|"initializes"| node_database
node_app -->|"initializes"| node_event_store
node_app -->|"starts workers"| node_events
node_task_api -->|"submits tasks"| node_task_engine
node_task_engine -->|"delegates queueing"| node_task_queue
node_task_engine -->|"initializes checkpoints"| node_checkpoint
node_task_engine -->|"dispatches execution"| node_executor
node_task_engine -->|"uses task kinds"| node_task_kinds
node_executor -->|"uses definitions"| node_task_kinds
node_model_router -->|"selects providers"| node_providers
node_memory -->|"reads and writes"| node_database
node_memory -->|"uses models"| node_model_router
node_event_handlers -->|"subscribes"| node_events
node_projections -->|"reads events"| node_event_store
node_events -.->|"persists events"| node_event_store
node_config -->|"configures routing"| node_model_router
node_security -->|"uses persistence"| node_database
node_errors -->|"formats HTTP errors"| node_app
node_app -->|"registers routes"| node_voice
node_app -->|"registers routes"| node_automation
node_app -->|"registers routes"| node_agents

click node_app "https://github.com/dushu2006/arise_cc/blob/main/core/runtime/main.py"
click node_task_api "https://github.com/dushu2006/arise_cc/blob/main/core/runtime/api/tasks.py"
click node_other_apis "https://github.com/dushu2006/arise_cc/tree/main/core/runtime/api"
click node_task_engine "https://github.com/dushu2006/arise_cc/blob/main/core/task_engine/engine.py"
click node_task_queue "https://github.com/dushu2006/arise_cc/blob/main/core/task_engine/queue.py"
click node_checkpoint "https://github.com/dushu2006/arise_cc/blob/main/core/task_engine/checkpoint.py"
click node_executor "https://github.com/dushu2006/arise_cc/blob/main/core/task_engine/executor.py"
click node_task_kinds "https://github.com/dushu2006/arise_cc/blob/main/core/task_engine/kinds/__init__.py"
click node_model_router "https://github.com/dushu2006/arise_cc/blob/main/core/models/engine.py"
click node_providers "https://github.com/dushu2006/arise_cc/tree/main/core/models/providers"
click node_policy "https://github.com/dushu2006/arise_cc/blob/main/core/policy_engine/engine.py"
click node_memory "https://github.com/dushu2006/arise_cc/tree/main/core/memory"
click node_events "https://github.com/dushu2006/arise_cc/blob/main/core/events/bus.py"
click node_event_handlers "https://github.com/dushu2006/arise_cc/blob/main/core/events/handlers.py"
click node_projections "https://github.com/dushu2006/arise_cc/blob/main/core/events/projections.py"
click node_event_store "https://github.com/dushu2006/arise_cc/blob/main/core/events/store.py"
click node_database "https://github.com/dushu2006/arise_cc/blob/main/core/database/base.py"
click node_config "https://github.com/dushu2006/arise_cc/tree/main/core/config"
click node_security "https://github.com/dushu2006/arise_cc/tree/main/core/security"
click node_errors "https://github.com/dushu2006/arise_cc/tree/main/core/errors"
click node_voice "https://github.com/dushu2006/arise_cc/blob/main/core/runtime/api/voice.py"
click node_automation "https://github.com/dushu2006/arise_cc/blob/main/core/runtime/api/automation.py"
click node_agents "https://github.com/dushu2006/arise_cc/blob/main/core/runtime/api/agents.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_app,node_task_api,node_other_apis,node_voice,node_automation,node_agents,node_user toneBlue
class node_task_engine,node_task_queue,node_checkpoint,node_executor,node_task_kinds toneAmber
class node_model_router,node_providers,node_policy,node_memory toneMint
class node_events,node_event_handlers,node_projections,node_event_store,node_database toneRose
class node_config,node_security,node_errors toneIndigo
```

## Components

### Runtime API

- [FastAPI Runtime](https://github.com/dushu2006/arise_cc/blob/main/core/runtime/main.py): `core/runtime/main.py`
- [Task API](https://github.com/dushu2006/arise_cc/blob/main/core/runtime/api/tasks.py): `core/runtime/api/tasks.py`
- [Domain APIs](https://github.com/dushu2006/arise_cc/tree/main/core/runtime/api): `core/runtime/api`
- [Voice API](https://github.com/dushu2006/arise_cc/blob/main/core/runtime/api/voice.py): `core/runtime/api/voice.py`
- [Automation API](https://github.com/dushu2006/arise_cc/blob/main/core/runtime/api/automation.py): `core/runtime/api/automation.py`
- [Agent API](https://github.com/dushu2006/arise_cc/blob/main/core/runtime/api/agents.py): `core/runtime/api/agents.py`

### Task Execution

- [Task Engine](https://github.com/dushu2006/arise_cc/blob/main/core/task_engine/engine.py): `core/task_engine/engine.py`
- [Task Queue](https://github.com/dushu2006/arise_cc/blob/main/core/task_engine/queue.py): `core/task_engine/queue.py`
- [Task Checkpoints](https://github.com/dushu2006/arise_cc/blob/main/core/task_engine/checkpoint.py): `core/task_engine/checkpoint.py`
- [Task Executor](https://github.com/dushu2006/arise_cc/blob/main/core/task_engine/executor.py): `core/task_engine/executor.py`
- [Task Kinds](https://github.com/dushu2006/arise_cc/blob/main/core/task_engine/kinds/__init__.py): `core/task_engine/kinds/__init__.py`

### AI Services

- [Model Router](https://github.com/dushu2006/arise_cc/blob/main/core/models/engine.py): `core/models/engine.py`
- [Model Providers](https://github.com/dushu2006/arise_cc/tree/main/core/models/providers): `core/models/providers`
- [Policy Engine](https://github.com/dushu2006/arise_cc/blob/main/core/policy_engine/engine.py): `core/policy_engine/engine.py`
- [Memory Services](https://github.com/dushu2006/arise_cc/tree/main/core/memory): `core/memory`

### Events and State

- [Event Bus](https://github.com/dushu2006/arise_cc/blob/main/core/events/bus.py): `core/events/bus.py`
- [Event Handlers](https://github.com/dushu2006/arise_cc/blob/main/core/events/handlers.py): `core/events/handlers.py`
- [Event Projections](https://github.com/dushu2006/arise_cc/blob/main/core/events/projections.py): `core/events/projections.py`
- [Event Store](https://github.com/dushu2006/arise_cc/blob/main/core/events/store.py): `core/events/store.py`
- [Database Layer](https://github.com/dushu2006/arise_cc/blob/main/core/database/base.py): `core/database/base.py`

### Security and Operations

- [Configuration](https://github.com/dushu2006/arise_cc/tree/main/core/config): `core/config`
- [Security Services](https://github.com/dushu2006/arise_cc/tree/main/core/security): `core/security`
- [Error Handling](https://github.com/dushu2006/arise_cc/tree/main/core/errors): `core/errors`

### Other components

- **API Client**

## Connections

- API Client → FastAPI Runtime: sends requests (evidence: `core/runtime/main.py`)
- FastAPI Runtime → Task API: routes to (evidence: `core/runtime/main.py`)
- FastAPI Runtime → Domain APIs: registers routes (evidence: `core/runtime/main.py`)
- FastAPI Runtime → Database Layer: initializes (evidence: `core/runtime/main.py`)
- FastAPI Runtime → Event Store: initializes (evidence: `core/runtime/main.py`)
- FastAPI Runtime → Event Bus: starts workers (evidence: `core/runtime/main.py`)
- Task API → Task Engine: submits tasks (evidence: `core/runtime/api/tasks.py`)
- Task Engine → Task Queue: delegates queueing (evidence: `core/task_engine/engine.py`)
- Task Engine → Task Checkpoints: initializes checkpoints (evidence: `core/task_engine/engine.py`)
- Task Engine → Task Executor: dispatches execution (evidence: `core/task_engine/engine.py`)
- Task Engine → Task Kinds: uses task kinds (evidence: `core/task_engine/engine.py`)
- Task Executor → Task Kinds: uses definitions (evidence: `core/task_engine/kinds/__init__.py`)
- Model Router → Model Providers: selects providers (evidence: `core/models/engine.py`)
- Memory Services → Database Layer: reads and writes (evidence: `core/memory/store.py`)
- Memory Services → Model Router: uses models (evidence: `core/memory/consolidation.py`)
- Event Handlers → Event Bus: subscribes (evidence: `core/events/handlers.py`)
- Event Projections → Event Store: reads events (evidence: `core/events/projections.py`)
- Event Bus → Event Store: persists events
- Configuration → Model Router: configures routing (evidence: `core/models/engine.py`)
- Security Services → Database Layer: uses persistence (evidence: `core/security/audit.py`)
- Error Handling → FastAPI Runtime: formats HTTP errors (evidence: `core/runtime/main.py`)
- FastAPI Runtime → Voice API: registers routes (evidence: `core/runtime/main.py`)
- FastAPI Runtime → Automation API: registers routes (evidence: `core/runtime/main.py`)
- FastAPI Runtime → Agent API: registers routes (evidence: `core/runtime/main.py`)
