# msitarzewski/agency-agents-app architecture

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

- Interactive diagram: https://gitdiagram.com/msitarzewski/agency-agents-app
- Repository: https://github.com/msitarzewski/agency-agents-app

## Overview

Agency Agents is a local-first native desktop control surface for browsing an upstream agent-persona catalog and deploying deterministic persona files into supported coding tools. The principal workflow is catalog discovery and inspection, followed by rendering, installation, and ledger-based reconciliation; dashboard, teams, projects, settings, GitHub, and updates are supporting capabilities. The README and sampled backend excerpts establish the core data flow; frontend-to-command details and several unsampled modules are represented only where documented, so unsupported call edges are omitted.

Main entry points: [`src-tauri/src/install/mod.rs`](https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/install/mod.rs) (Install and reconcile), [`src-tauri/src/commands/github.rs`](https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/commands/github.rs) (GitHub commands), [`src-tauri/src/corpus/mod.rs`](https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/corpus/mod.rs) (Catalog source and index), [`src-tauri/src/commands/settings.rs`](https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/commands/settings.rs) (Settings commands)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend experience"]
  node_workspace["Agents workspace"]
  node_tools["Tools panel<br/>[ToolsView.svelte]"]
  node_teams["Teams<br/>[Teams.svelte]"]
  node_projects["Projects<br/>[Projects.svelte]"]
  node_dashboard["Dashboard views"]
  node_frontend_api["Tauri API client<br/>[api.ts]"]
  node_teams_data["Preset teams<br/>[presetTeams.ts]"]
  node_settings_ui["Settings UI<br/>[Settings.svelte]"]
  node_github_ui["GitHub store<br/>[github.svelte.ts]"]
  node_updater_ui["Updater store<br/>[updater.svelte.ts]"]
end

subgraph group_catalog["Catalog management"]
  node_corpus["Catalog source and index<br/>[mod.rs]"]
  node_parser["Persona parser<br/>[parse.rs]"]
end

subgraph group_deployment["Install lifecycle"]
  node_install["Install and reconcile<br/>[mod.rs]"]
  node_renderer["Tool renderers<br/>[mod.rs]"]
  node_registry["Tool registry<br/>[registry.rs]"]
  node_local_ledger[("Install ledger<br/>[mod.rs]")]
end

subgraph group_platform["Native services"]
  node_settings_cmd["Settings commands<br/>[settings.rs]"]
  node_state["Shared app state<br/>[state.rs]"]
  node_github_cmd["GitHub commands<br/>[github.rs]"]
  node_github_auth["GitHub Device Flow<br/>[auth.rs]"]
  node_github_actions["GitHub actions<br/>[actions.rs]"]
  node_github_stats["GitHub statistics<br/>[stats.rs]"]
  node_github_url["GitHub URL handling<br/>[url.rs]"]
  node_updater_cmd["Updater commands<br/>[updater.rs]"]
  node_filesystem["Filesystem helpers<br/>[fs.rs]"]
  node_process_utils["Process utilities<br/>[process.rs]"]
  node_process_env["AppImage process hygiene<br/>[proc.rs]"]
  node_ipc["Tauri command boundary<br/>[lib.rs]"]
  node_settings_store[("Persisted settings<br/>[settings.rs]")]
end

node_user(("User"))
node_agent_tools["Installed coding tools"]
node_keychain[("Platform keychain")]
node_github["GitHub"]
node_update_service["Signed update service"]

node_user -->|"browses and selects"| node_workspace
node_workspace -.->|"requests catalog"| node_frontend_api
node_frontend_api -.->|"invokes commands"| node_ipc
node_ipc -->|"routes catalog requests"| node_corpus
node_corpus -->|"parses personas"| node_parser
node_user -->|"requests deployment"| node_workspace
node_workspace -.->|"starts install"| node_install
node_tools -.->|"requests bulk operations"| node_install
node_teams -->|"deploys team"| node_install
node_projects -->|"manages scoped installs"| node_install
node_install -->|"reads persona source"| node_corpus
node_install -->|"renders persona"| node_renderer
node_install -->|"detects tool targets"| node_registry
node_renderer -->|"reads tool metadata"| node_registry
node_install -->|"tracks and reconciles"| node_local_ledger
node_install -->|"writes and detects files"| node_agent_tools
node_dashboard -->|"surfaces install health"| node_install
node_teams -.->|"uses bundled presets"| node_teams_data
node_settings_ui -.->|"manages preferences"| node_settings_cmd
node_settings_cmd -->|"persists settings"| node_settings_store
node_state -->|"loads settings"| node_settings_cmd
node_github_ui -.->|"requests GitHub features"| node_github_cmd
node_github_cmd -.->|"uses authentication"| node_github_auth
node_github_auth -->|"stores credentials"| node_keychain
node_github_auth -->|"performs Device Flow"| node_github
node_github_cmd -.->|"dispatches actions"| node_github_actions
node_github_cmd -.->|"requests statistics"| node_github_stats
node_github_cmd -.->|"uses URL handling"| node_github_url
node_updater_ui -.->|"checks and installs"| node_updater_cmd
node_updater_cmd -->|"checks signed manifest"| node_update_service
node_updater_cmd -->|"reads update preferences"| node_settings_cmd
node_settings_cmd -->|"reads and writes settings"| node_filesystem
node_state -->|"caches catalog state"| node_corpus
node_corpus -.->|"manages local catalog"| node_filesystem
node_install -.->|"uses safe file operations"| node_filesystem
node_install -->|"queries tool versions"| node_process_utils
node_process_utils -.->|"sanitizes child environment"| node_process_env
node_user -->|"inspects tool status"| node_tools
node_user -->|"selects team"| node_teams
node_user -->|"manages project installs"| node_projects
node_user -->|"reviews coverage"| node_dashboard

click node_workspace "https://github.com/msitarzewski/agency-agents-app/blob/main/src/lib/components/AgentsWorkspace.svelte"
click node_tools "https://github.com/msitarzewski/agency-agents-app/blob/main/src/lib/components/ToolsView.svelte"
click node_teams "https://github.com/msitarzewski/agency-agents-app/blob/main/src/lib/components/Teams.svelte"
click node_projects "https://github.com/msitarzewski/agency-agents-app/blob/main/src/lib/components/Projects.svelte"
click node_dashboard "https://github.com/msitarzewski/agency-agents-app/blob/main/src/lib/components/AgencyDashboard.svelte"
click node_frontend_api "https://github.com/msitarzewski/agency-agents-app/blob/main/src/lib/api.ts"
click node_corpus "https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/corpus/mod.rs"
click node_parser "https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/corpus/parse.rs"
click node_install "https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/install/mod.rs"
click node_renderer "https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/render/mod.rs"
click node_registry "https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/registry.rs"
click node_teams_data "https://github.com/msitarzewski/agency-agents-app/blob/main/src/lib/data/presetTeams.ts"
click node_settings_ui "https://github.com/msitarzewski/agency-agents-app/blob/main/src/lib/components/Settings.svelte"
click node_settings_cmd "https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/commands/settings.rs"
click node_state "https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/state.rs"
click node_github_ui "https://github.com/msitarzewski/agency-agents-app/blob/main/src/lib/stores/github.svelte.ts"
click node_github_cmd "https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/commands/github.rs"
click node_github_auth "https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/github/auth.rs"
click node_github_actions "https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/github/actions.rs"
click node_github_stats "https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/github/stats.rs"
click node_github_url "https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/github/url.rs"
click node_updater_ui "https://github.com/msitarzewski/agency-agents-app/blob/main/src/lib/stores/updater.svelte.ts"
click node_updater_cmd "https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/commands/updater.rs"
click node_filesystem "https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/util/fs.rs"
click node_process_utils "https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/util/process.rs"
click node_process_env "https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/util/proc.rs"
click node_ipc "https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/lib.rs"
click node_local_ledger "https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/install/mod.rs"
click node_settings_store "https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/commands/settings.rs"

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_workspace,node_tools,node_teams,node_projects,node_dashboard,node_frontend_api,node_teams_data,node_settings_ui,node_github_ui,node_updater_ui,node_user toneBlue
class node_corpus,node_parser,node_keychain toneAmber
class node_install,node_renderer,node_registry,node_local_ledger toneMint
class node_settings_cmd,node_state,node_github_cmd,node_github_auth,node_github_actions,node_github_stats,node_github_url,node_updater_cmd,node_filesystem,node_process_utils,node_process_env,node_ipc,node_settings_store toneRose
class node_agent_tools,node_github,node_update_service toneIndigo
```

## Components

### Frontend experience

- [Agents workspace](https://github.com/msitarzewski/agency-agents-app/blob/main/src/lib/components/AgentsWorkspace.svelte): `src/lib/components/AgentsWorkspace.svelte`
- [Tools panel](https://github.com/msitarzewski/agency-agents-app/blob/main/src/lib/components/ToolsView.svelte): `src/lib/components/ToolsView.svelte`
- [Teams](https://github.com/msitarzewski/agency-agents-app/blob/main/src/lib/components/Teams.svelte): `src/lib/components/Teams.svelte`
- [Projects](https://github.com/msitarzewski/agency-agents-app/blob/main/src/lib/components/Projects.svelte): `src/lib/components/Projects.svelte`
- [Dashboard views](https://github.com/msitarzewski/agency-agents-app/blob/main/src/lib/components/AgencyDashboard.svelte): `src/lib/components/AgencyDashboard.svelte`
- [Tauri API client](https://github.com/msitarzewski/agency-agents-app/blob/main/src/lib/api.ts): `src/lib/api.ts`
- [Preset teams](https://github.com/msitarzewski/agency-agents-app/blob/main/src/lib/data/presetTeams.ts): `src/lib/data/presetTeams.ts`
- [Settings UI](https://github.com/msitarzewski/agency-agents-app/blob/main/src/lib/components/Settings.svelte): `src/lib/components/Settings.svelte`
- [GitHub store](https://github.com/msitarzewski/agency-agents-app/blob/main/src/lib/stores/github.svelte.ts): `src/lib/stores/github.svelte.ts`
- [Updater store](https://github.com/msitarzewski/agency-agents-app/blob/main/src/lib/stores/updater.svelte.ts): `src/lib/stores/updater.svelte.ts`

### Catalog management

- [Catalog source and index](https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/corpus/mod.rs): `src-tauri/src/corpus/mod.rs`
- [Persona parser](https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/corpus/parse.rs): `src-tauri/src/corpus/parse.rs`

### Install lifecycle

- [Install and reconcile](https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/install/mod.rs): `src-tauri/src/install/mod.rs`
- [Tool renderers](https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/render/mod.rs): `src-tauri/src/render/mod.rs`
- [Tool registry](https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/registry.rs): `src-tauri/src/registry.rs`
- [Install ledger](https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/install/mod.rs): `src-tauri/src/install/mod.rs`

### Native services

- [Settings commands](https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/commands/settings.rs): `src-tauri/src/commands/settings.rs`
- [Shared app state](https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/state.rs): `src-tauri/src/state.rs`
- [GitHub commands](https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/commands/github.rs): `src-tauri/src/commands/github.rs`
- [GitHub Device Flow](https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/github/auth.rs): `src-tauri/src/github/auth.rs`
- [GitHub actions](https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/github/actions.rs): `src-tauri/src/github/actions.rs`
- [GitHub statistics](https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/github/stats.rs): `src-tauri/src/github/stats.rs`
- [GitHub URL handling](https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/github/url.rs): `src-tauri/src/github/url.rs`
- [Updater commands](https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/commands/updater.rs): `src-tauri/src/commands/updater.rs`
- [Filesystem helpers](https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/util/fs.rs): `src-tauri/src/util/fs.rs`
- [Process utilities](https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/util/process.rs): `src-tauri/src/util/process.rs`
- [AppImage process hygiene](https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/util/proc.rs): `src-tauri/src/util/proc.rs`
- [Tauri command boundary](https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Persisted settings](https://github.com/msitarzewski/agency-agents-app/blob/main/src-tauri/src/commands/settings.rs): `src-tauri/src/commands/settings.rs`

### Other components

- **User**
- **Installed coding tools**
- **Platform keychain**
- **GitHub**
- **Signed update service**

## Connections

- User → Agents workspace: browses and selects (evidence: `README.md`)
- Agents workspace → Tauri API client: requests catalog
- Tauri API client → Tauri command boundary: invokes commands
- Tauri command boundary → Catalog source and index: routes catalog requests (evidence: `src-tauri/src/lib.rs`)
- Catalog source and index → Persona parser: parses personas (evidence: `src-tauri/src/corpus/mod.rs`)
- User → Agents workspace: requests deployment (evidence: `README.md`)
- Agents workspace → Install and reconcile: starts install
- Tools panel → Install and reconcile: requests bulk operations
- Teams → Install and reconcile: deploys team (evidence: `README.md`)
- Projects → Install and reconcile: manages scoped installs (evidence: `README.md`)
- Install and reconcile → Catalog source and index: reads persona source (evidence: `src-tauri/src/install/mod.rs`)
- Install and reconcile → Tool renderers: renders persona (evidence: `src-tauri/src/install/mod.rs`)
- Install and reconcile → Tool registry: detects tool targets (evidence: `src-tauri/src/install/mod.rs`)
- Tool renderers → Tool registry: reads tool metadata (evidence: `src-tauri/src/render/mod.rs`)
- Install and reconcile → Install ledger: tracks and reconciles (evidence: `README.md`)
- Install and reconcile → Installed coding tools: writes and detects files (evidence: `README.md`)
- Dashboard views → Install and reconcile: surfaces install health (evidence: `README.md`)
- Teams → Preset teams: uses bundled presets
- Settings UI → Settings commands: manages preferences
- Settings commands → Persisted settings: persists settings (evidence: `src-tauri/src/commands/settings.rs`)
- Shared app state → Settings commands: loads settings (evidence: `src-tauri/src/state.rs`)
- GitHub store → GitHub commands: requests GitHub features
- GitHub commands → GitHub Device Flow: uses authentication
- GitHub Device Flow → Platform keychain: stores credentials (evidence: `src-tauri/src/github/auth.rs`)
- GitHub Device Flow → GitHub: performs Device Flow (evidence: `src-tauri/src/github/auth.rs`)
- GitHub commands → GitHub actions: dispatches actions
- GitHub commands → GitHub statistics: requests statistics
- GitHub commands → GitHub URL handling: uses URL handling
- Updater store → Updater commands: checks and installs
- Updater commands → Signed update service: checks signed manifest (evidence: `README.md`)
- Updater commands → Settings commands: reads update preferences (evidence: `src-tauri/src/commands/updater.rs`)
- Settings commands → Filesystem helpers: reads and writes settings (evidence: `src-tauri/src/commands/settings.rs`)
- Shared app state → Catalog source and index: caches catalog state (evidence: `src-tauri/src/state.rs`)
- Catalog source and index → Filesystem helpers: manages local catalog (evidence: `src-tauri/src/corpus/mod.rs`)
- Install and reconcile → Filesystem helpers: uses safe file operations (evidence: `src-tauri/src/install/mod.rs`)
- Install and reconcile → Process utilities: queries tool versions (evidence: `src-tauri/src/install/mod.rs`)
- Process utilities → AppImage process hygiene: sanitizes child environment
- User → Tools panel: inspects tool status (evidence: `README.md`)
- User → Teams: selects team (evidence: `README.md`)
- User → Projects: manages project installs (evidence: `README.md`)
- User → Dashboard views: reviews coverage (evidence: `README.md`)
