# pharns/agenticos architecture

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

- Interactive diagram: https://gitdiagram.com/pharns/agenticos
- Repository: https://github.com/pharns/agenticos

## Overview

AgenticOS is a user-triggered CLI layer for routing requests to AI-assisted workflows and providers. The documented main path is a user command through the unified CLI, with auto-routing selecting a profile before execution. Supporting capabilities include persistent memory, execution logs, project isolation, and health validation. Source excerpts are limited to requirements.txt, so component interactions below rely on README documentation; unverified runtime wiring is omitted or marked dashed.

Main entry points: [`scripts/aos`](https://github.com/pharns/agenticos/blob/main/scripts/aos) (Unified CLI), [`scripts/agent`](https://github.com/pharns/agenticos/blob/main/scripts/agent) (Execution engine), [`scripts/router`](https://github.com/pharns/agenticos/blob/main/scripts/router) (Auto-router), [`scripts/memory`](https://github.com/pharns/agenticos/blob/main/scripts/memory) (Persistent memory)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Command entry"]
  node_cli["Unified CLI"]
  node_router["Auto-router"]
end

subgraph group_workflow["Workflow execution"]
  node_profiles["Agent profiles<br/>[agents.yaml]"]
  node_workflows["Workflow definitions<br/>[workflows.yaml]"]
  node_prompts["Profile prompts<br/>[prompts]"]
  node_agent["Execution engine"]
  node_providers["AI provider CLIs"]
end

subgraph group_state["State and audit"]
  node_memory["Persistent memory"]
  node_memorydata[("Memory data<br/>[memory]")]
  node_logs[("Execution logs<br/>[logs]")]
end

subgraph group_operations["Operations"]
  node_doctor["Health validation"]
  node_project["Project configuration<br/>[.agents]"]
end

node_user(("User"))

node_user -->|"runs command"| node_cli
node_cli -->|"auto-routes"| node_router
node_router -->|"selects profile"| node_profiles
node_cli -.->|"starts execution"| node_agent
node_agent -.->|"invokes provider"| node_providers
node_agent -.->|"uses definitions"| node_workflows
node_agent -.->|"uses prompts"| node_prompts
node_agent -->|"logs execution"| node_logs
node_cli -.->|"manages memory"| node_memory
node_memory -.->|"persists state"| node_memorydata
node_user -->|"requests validation"| node_doctor
node_cli -.->|"isolates project"| node_project

click node_cli "https://github.com/pharns/agenticos/blob/main/scripts/aos"
click node_router "https://github.com/pharns/agenticos/blob/main/scripts/router"
click node_profiles "https://github.com/pharns/agenticos/blob/main/.agents/agents.yaml"
click node_workflows "https://github.com/pharns/agenticos/blob/main/.agents/workflows.yaml"
click node_prompts "https://github.com/pharns/agenticos/tree/main/.agents/prompts"
click node_agent "https://github.com/pharns/agenticos/blob/main/scripts/agent"
click node_memory "https://github.com/pharns/agenticos/blob/main/scripts/memory"
click node_memorydata "https://github.com/pharns/agenticos/tree/main/.agents/memory"
click node_logs "https://github.com/pharns/agenticos/tree/main/.agents/logs"
click node_doctor "https://github.com/pharns/agenticos/blob/main/scripts/doctor"
click node_project "https://github.com/pharns/agenticos/tree/main/.agents"

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_router,node_user toneBlue
class node_profiles,node_workflows,node_prompts,node_agent,node_providers toneAmber
class node_memory,node_memorydata,node_logs toneMint
class node_doctor,node_project toneRose
```

## Components

### Command entry

- [Unified CLI](https://github.com/pharns/agenticos/blob/main/scripts/aos): `scripts/aos`
- [Auto-router](https://github.com/pharns/agenticos/blob/main/scripts/router): `scripts/router`

### Workflow execution

- [Agent profiles](https://github.com/pharns/agenticos/blob/main/.agents/agents.yaml): `.agents/agents.yaml`
- [Workflow definitions](https://github.com/pharns/agenticos/blob/main/.agents/workflows.yaml): `.agents/workflows.yaml`
- [Profile prompts](https://github.com/pharns/agenticos/tree/main/.agents/prompts): `.agents/prompts`
- [Execution engine](https://github.com/pharns/agenticos/blob/main/scripts/agent): `scripts/agent`
- **AI provider CLIs**

### State and audit

- [Persistent memory](https://github.com/pharns/agenticos/blob/main/scripts/memory): `scripts/memory`
- [Memory data](https://github.com/pharns/agenticos/tree/main/.agents/memory): `.agents/memory`
- [Execution logs](https://github.com/pharns/agenticos/tree/main/.agents/logs): `.agents/logs`

### Operations

- [Health validation](https://github.com/pharns/agenticos/blob/main/scripts/doctor): `scripts/doctor`
- [Project configuration](https://github.com/pharns/agenticos/tree/main/.agents): `.agents`

### Other components

- **User**

## Connections

- User → Unified CLI: runs command (evidence: `README.md`)
- Unified CLI → Auto-router: auto-routes (evidence: `README.md`)
- Auto-router → Agent profiles: selects profile (evidence: `README.md`)
- Unified CLI → Execution engine: starts execution
- Execution engine → AI provider CLIs: invokes provider
- Execution engine → Workflow definitions: uses definitions
- Execution engine → Profile prompts: uses prompts
- Execution engine → Execution logs: logs execution (evidence: `README.md`)
- Unified CLI → Persistent memory: manages memory
- Persistent memory → Memory data: persists state
- User → Health validation: requests validation (evidence: `README.md`)
- Unified CLI → Project configuration: isolates project
