Skip to content

Systems Overview

Ash is a Python-based personal assistant agent with modular architecture.

System Components

Agent Core

Orchestrates conversations, manages context, and coordinates tool execution.

LLM Providers

Abstraction layer for Anthropic Claude and OpenAI models.

Tool System

Extensible tools including sandboxed bash and web search.

Memory

SQLite-based storage with semantic search via embeddings.

Sandbox

Docker containers for secure command execution.

Providers

Communication channels (Telegram, CLI).

Data Flow

User Message
┌─────────────┐
│ Provider │ (Telegram, CLI)
└─────┬───────┘
┌─────────────┐
│ Agent │ Orchestrator
└─────┬───────┘
├──────────────┐
│ │
▼ ▼
┌─────────────┐ ┌─────────────┐
│ LLM │ │ Memory │
│ Provider │ │ Store │
└─────────────┘ └─────────────┘
┌─────────────┐
│ Tools │ ──► Sandbox
└─────────────┘

Tech Stack

ComponentTechnology
LanguagePython 3.12+
CLITyper
HTTP ServerFastAPI + Uvicorn
Telegramaiogram 3.x
DatabaseSQLite + sqlite-vec
ORMSQLAlchemy 2.0 (async)
LLM SDKsanthropic, openai
Containerdocker-py
ValidationPydantic

Directory Structure

src/ash/
├── cli/ # Typer CLI
├── config/ # Configuration loading
├── core/ # Agent orchestrator
├── llm/ # LLM abstraction
├── providers/ # Communication providers
├── tools/ # Tool system
├── sandbox/ # Docker sandboxing
├── db/ # Database layer
├── memory/ # Memory + retrieval
├── skills/ # Skill system
├── server/ # FastAPI server
└── service/ # Background service

Key Design Principles

  1. Async everywhere - All I/O is async using asyncio
  2. Type hints required - Full type coverage with Pydantic validation
  3. ABC for interfaces - Abstract base classes define contracts
  4. Registry pattern - Dynamic discovery for tools, skills, providers
  5. Security first - All command execution is sandboxed

Systems Documentation

SectionDescription
LLMLLM providers and model configuration
ToolsTool system and execution
SkillsConfigurable skill system
AgentsBuilt-in subagents
MemoryStorage and semantic search
SandboxDocker container isolation
ProvidersCommunication channels