# mgalen007/skye architecture

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

- Interactive diagram: https://gitdiagram.com/mgalen007/skye
- Repository: https://github.com/mgalen007/skye

## Overview

Skye is an early-stage conversational CLI assistant. Its main workflow is a user prompt entering the Rich loop, passing through the PydanticAI agent to a configured model, and returning a response while the loop retains message history. The agent can invoke sandboxed file tools, fetch and extract web pages, and use provider web search. The file and fetch tools are registered through imports in the CLI. Memory and session modules are empty scaffolds; cross-session memory and several other capabilities remain planned, not implemented.

Main entry points: [`src/agent/core.py`](https://github.com/mgalen007/skye/blob/main/src/agent/core.py) (Skye agent), [`src/main.py`](https://github.com/mgalen007/skye/blob/main/src/main.py) (Interactive loop), [`src/tools/files.py`](https://github.com/mgalen007/skye/blob/main/src/tools/files.py) (Sandboxed file tools), [`src/tools/fetch.py`](https://github.com/mgalen007/skye/blob/main/src/tools/fetch.py) (Page fetch and extract)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["CLI interaction"]
  node_cli["Interactive loop<br/>[main.py]"]
  node_history["Message history<br/>[main.py]"]
  node_session_scaffold["Session scaffold<br/>[history.py]"]
end

subgraph group_agent_runtime["Agent runtime"]
  node_agent["Skye agent<br/>[core.py]"]
  node_deps["Workspace dependency<br/>[deps.py]"]
  node_memory_scaffold["Memory scaffold<br/>[store.py]"]
end

subgraph group_tools["Agent tools"]
  node_files["Sandboxed file tools<br/>[files.py]"]
  node_fetch["Page fetch and extract<br/>[fetch.py]"]
end

subgraph group_integrations["External services"]
  node_model["OpenRouter model"]
  node_websearch["Provider web search"]
end

node_user(("User"))
node_workspace["Workspace files"]
node_web(("Web pages"))

node_user -->|"enters prompt"| node_cli
node_cli -->|"runs agent"| node_agent
node_cli -->|"passes and updates"| node_history
node_cli -->|"imports registration"| node_files
node_cli -->|"imports registration"| node_fetch
node_cli -->|"creates dependencies"| node_deps
node_agent -->|"receives dependencies"| node_deps
node_agent -->|"sends requests"| node_model
node_agent -->|"uses capability"| node_websearch
node_agent -->|"invokes tools"| node_files
node_agent -->|"invokes tool"| node_fetch
node_files -->|"reads and writes"| node_workspace
node_files -->|"gets workspace root"| node_deps
node_fetch -->|"fetches page"| node_web
node_fetch -->|"returns extraction"| node_agent

click node_cli "https://github.com/mgalen007/skye/blob/main/src/main.py"
click node_history "https://github.com/mgalen007/skye/blob/main/src/main.py"
click node_workspace "https://github.com/mgalen007/skye/tree/main/workspace"
click node_agent "https://github.com/mgalen007/skye/blob/main/src/agent/core.py"
click node_deps "https://github.com/mgalen007/skye/blob/main/src/agent/deps.py"
click node_files "https://github.com/mgalen007/skye/blob/main/src/tools/files.py"
click node_fetch "https://github.com/mgalen007/skye/blob/main/src/tools/fetch.py"
click node_memory_scaffold "https://github.com/mgalen007/skye/blob/main/src/memory/store.py"
click node_session_scaffold "https://github.com/mgalen007/skye/blob/main/src/session/history.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_cli,node_history,node_session_scaffold,node_user toneBlue
class node_agent,node_deps,node_memory_scaffold toneAmber
class node_files,node_fetch toneMint
class node_model,node_websearch toneRose
class node_workspace toneTeal
class node_web toneIndigo
```

## Components

### CLI interaction

- [Interactive loop](https://github.com/mgalen007/skye/blob/main/src/main.py): `src/main.py`
- [Message history](https://github.com/mgalen007/skye/blob/main/src/main.py): `src/main.py`
- [Session scaffold](https://github.com/mgalen007/skye/blob/main/src/session/history.py): `src/session/history.py`

### Agent runtime

- [Skye agent](https://github.com/mgalen007/skye/blob/main/src/agent/core.py): `src/agent/core.py`
- [Workspace dependency](https://github.com/mgalen007/skye/blob/main/src/agent/deps.py): `src/agent/deps.py`
- [Memory scaffold](https://github.com/mgalen007/skye/blob/main/src/memory/store.py): `src/memory/store.py`

### Agent tools

- [Sandboxed file tools](https://github.com/mgalen007/skye/blob/main/src/tools/files.py): `src/tools/files.py`
- [Page fetch and extract](https://github.com/mgalen007/skye/blob/main/src/tools/fetch.py): `src/tools/fetch.py`

### External services

- **OpenRouter model**
- **Provider web search**

### Other components

- **User**
- [Workspace files](https://github.com/mgalen007/skye/tree/main/workspace): `workspace`
- **Web pages**

## Connections

- User → Interactive loop: enters prompt
- Interactive loop → Skye agent: runs agent
- Interactive loop → Message history: passes and updates
- Interactive loop → Sandboxed file tools: imports registration
- Interactive loop → Page fetch and extract: imports registration
- Interactive loop → Workspace dependency: creates dependencies
- Skye agent → Workspace dependency: receives dependencies
- Skye agent → OpenRouter model: sends requests
- Skye agent → Provider web search: uses capability
- Skye agent → Sandboxed file tools: invokes tools
- Skye agent → Page fetch and extract: invokes tool
- Sandboxed file tools → Workspace files: reads and writes
- Sandboxed file tools → Workspace dependency: gets workspace root
- Page fetch and extract → Web pages: fetches page
- Page fetch and extract → Skye agent: returns extraction
