# phyagentos/phyagentos-core architecture

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

- Interactive diagram: https://gitdiagram.com/phyagentos/phyagentos-core
- Repository: https://github.com/phyagentos/phyagentos-core

## Overview

PhyAgentOS is an embodied-agent runtime: user requests reach a model-backed agent, which can plan physical actions through an installed Skill’s Forge runtime; task outcomes are verified and verified experience can improve later Skills and Lessons. The graph includes the documented provider, channel, Skill Runtime, verification, experience, and governed-interaction capabilities. Some subsystems are unsampled, so their internal links are omitted rather than inferred; dashed links mark documented product-level relationships whose specific caller is not shown.

Main entry points: [`PhyAgentOS/forge/task.py`](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/forge/task.py) (Agent task), [`PhyAgentOS/agent/loop.py`](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/agent/loop.py) (Agent loop), [`PhyAgentOS/verification/service.py`](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/verification/service.py) (Verification service), [`PhyAgentOS/skill_runtime/manager.py`](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/skill_runtime/manager.py) (Runtime lifecycle)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["Interfaces and models"]
  node_channels["Chat channels<br/>[manager.py]"]
  node_bus["Message bus<br/>[queue.py]"]
  node_cli["CLI commands<br/>[commands.py]"]
  node_config["Configuration<br/>[schema.py]"]
  node_provider_service["Provider management<br/>[service.py]"]
  node_provider["Model providers"]
end

subgraph group_agent["Agent and experience"]
  node_agent_loop["Agent loop<br/>[loop.py]"]
  node_agent_context["Agent context<br/>[context.py]"]
  node_agent_skills["Skill selection<br/>[skills.py]"]
  node_experience["Experience evolution<br/>[evolution.py]"]
  node_experience_store[("Experience store<br/>[store.py]")]
end

subgraph group_execution["Forge execution"]
  node_task["Agent task<br/>[task.py]"]
  node_forge_binding["Forge binding<br/>[binding.py]"]
  node_forge_tool["Forge tool API<br/>[forge_tool_api.py]"]
  node_interaction_service["Interaction governance<br/>[service.py]"]
  node_interaction_client["Forge interaction client<br/>[client.py]"]
end

subgraph group_runtime["Skill Runtime"]
  node_skill_manager["Runtime lifecycle<br/>[manager.py]"]
  node_skill_installer["Skill installer<br/>[installer.py]"]
  node_skill_catalog["Skill catalog<br/>[catalog.py]"]
end

subgraph group_governance["Verification and governance"]
  node_verification_service["Verification service<br/>[service.py]"]
  node_verification_engine["Verification engine<br/>[engine.py]"]
  node_session_verifier["Session verifier"]
  node_interaction_runner["Governed runner<br/>[runner.py]"]
  node_experience_actor["Verified experience<br/>[coordinator.py]"]
end

node_user(("User"))

node_user -.->|"sends message"| node_channels
node_channels -->|"queues messages"| node_bus
node_user -.->|"submits request"| node_cli
node_cli -->|"invokes"| node_agent_loop
node_bus -.->|"dispatches"| node_agent_loop
node_config -->|"configures"| node_provider_service
node_provider_service -->|"creates"| node_provider
node_agent_loop -.->|"requests model"| node_provider_service
node_agent_context -->|"loads skills"| node_agent_skills
node_agent_loop -.->|"plans tasks"| node_task
node_task -->|"resolves binding"| node_forge_binding
node_task -.->|"dispatches actions"| node_forge_tool
node_task -->|"checks governance"| node_interaction_service
node_interaction_service -->|"creates client"| node_interaction_client
node_interaction_client -->|"starts session"| node_task
node_skill_manager -->|"loads manifests"| node_skill_catalog
node_skill_manager -->|"manages installs"| node_skill_installer
node_agent_skills -.->|"uses runtime"| node_skill_manager
node_task -.->|"verifies outcome"| node_verification_service
node_verification_service -->|"requests evaluation"| node_verification_engine
node_verification_engine -->|"requests completion"| node_provider
node_session_verifier -->|"uses verification"| node_verification_service
node_interaction_runner -->|"coordinates"| node_interaction_service
node_task -->|"checks session"| node_session_verifier
node_experience_actor -.->|"evolves lessons"| node_experience
node_experience -->|"persists experience"| node_experience_store
node_verification_service -.->|"feeds verified outcomes"| node_experience_actor

click node_channels "https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/channels/manager.py"
click node_bus "https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/bus/queue.py"
click node_cli "https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/cli/commands.py"
click node_config "https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/config/schema.py"
click node_provider_service "https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/providers/service.py"
click node_provider "https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/providers/litellm_provider.py"
click node_agent_loop "https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/agent/loop.py"
click node_agent_context "https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/agent/context.py"
click node_agent_skills "https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/agent/skills.py"
click node_experience "https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/agent/experience/evolution.py"
click node_experience_store "https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/agent/experience/store.py"
click node_task "https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/forge/task.py"
click node_forge_binding "https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/forge/binding.py"
click node_forge_tool "https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/agent/tools/forge_tool_api.py"
click node_interaction_service "https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/forge/interaction/service.py"
click node_interaction_client "https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/forge/interaction/client.py"
click node_skill_manager "https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/skill_runtime/manager.py"
click node_skill_installer "https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/skill_runtime/installer.py"
click node_skill_catalog "https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/skill_runtime/catalog.py"
click node_verification_service "https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/verification/service.py"
click node_verification_engine "https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/verification/engine.py"
click node_session_verifier "https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/agent/session_verifier.py"
click node_interaction_runner "https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/agent/interaction/runner.py"
click node_experience_actor "https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/agent/experience/coordinator.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_channels,node_bus,node_cli,node_config,node_provider_service,node_provider,node_user toneBlue
class node_agent_loop,node_agent_context,node_agent_skills,node_experience,node_experience_store toneAmber
class node_task,node_forge_binding,node_forge_tool,node_interaction_service,node_interaction_client toneMint
class node_skill_manager,node_skill_installer,node_skill_catalog toneRose
class node_verification_service,node_verification_engine,node_session_verifier,node_interaction_runner,node_experience_actor toneIndigo
```

## Components

### Interfaces and models

- [Chat channels](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/channels/manager.py): `PhyAgentOS/channels/manager.py`
- [Message bus](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/bus/queue.py): `PhyAgentOS/bus/queue.py`
- [CLI commands](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/cli/commands.py): `PhyAgentOS/cli/commands.py`
- [Configuration](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/config/schema.py): `PhyAgentOS/config/schema.py`
- [Provider management](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/providers/service.py): `PhyAgentOS/providers/service.py`
- [Model providers](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/providers/litellm_provider.py): `PhyAgentOS/providers/litellm_provider.py`

### Agent and experience

- [Agent loop](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/agent/loop.py): `PhyAgentOS/agent/loop.py`
- [Agent context](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/agent/context.py): `PhyAgentOS/agent/context.py`
- [Skill selection](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/agent/skills.py): `PhyAgentOS/agent/skills.py`
- [Experience evolution](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/agent/experience/evolution.py): `PhyAgentOS/agent/experience/evolution.py`
- [Experience store](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/agent/experience/store.py): `PhyAgentOS/agent/experience/store.py`

### Forge execution

- [Agent task](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/forge/task.py): `PhyAgentOS/forge/task.py`
- [Forge binding](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/forge/binding.py): `PhyAgentOS/forge/binding.py`
- [Forge tool API](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/agent/tools/forge_tool_api.py): `PhyAgentOS/agent/tools/forge_tool_api.py`
- [Interaction governance](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/forge/interaction/service.py): `PhyAgentOS/forge/interaction/service.py`
- [Forge interaction client](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/forge/interaction/client.py): `PhyAgentOS/forge/interaction/client.py`

### Skill Runtime

- [Runtime lifecycle](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/skill_runtime/manager.py): `PhyAgentOS/skill_runtime/manager.py`
- [Skill installer](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/skill_runtime/installer.py): `PhyAgentOS/skill_runtime/installer.py`
- [Skill catalog](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/skill_runtime/catalog.py): `PhyAgentOS/skill_runtime/catalog.py`

### Verification and governance

- [Verification service](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/verification/service.py): `PhyAgentOS/verification/service.py`
- [Verification engine](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/verification/engine.py): `PhyAgentOS/verification/engine.py`
- [Session verifier](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/agent/session_verifier.py): `PhyAgentOS/agent/session_verifier.py`
- [Governed runner](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/agent/interaction/runner.py): `PhyAgentOS/agent/interaction/runner.py`
- [Verified experience](https://github.com/phyagentos/phyagentos-core/blob/main/PhyAgentOS/agent/experience/coordinator.py): `PhyAgentOS/agent/experience/coordinator.py`

### Other components

- **User**

## Connections

- User → Chat channels: sends message (evidence: `README.md`)
- Chat channels → Message bus: queues messages (evidence: `PhyAgentOS/channels/manager.py`)
- User → CLI commands: submits request (evidence: `README.md`)
- CLI commands → Agent loop: invokes (evidence: `PhyAgentOS/cli/commands.py`)
- Message bus → Agent loop: dispatches
- Configuration → Provider management: configures (evidence: `PhyAgentOS/providers/service.py`)
- Provider management → Model providers: creates (evidence: `PhyAgentOS/providers/service.py`)
- Agent loop → Provider management: requests model (evidence: `README.md`)
- Agent context → Skill selection: loads skills (evidence: `PhyAgentOS/agent/context.py`)
- Agent loop → Agent task: plans tasks (evidence: `README.md`)
- Agent task → Forge binding: resolves binding (evidence: `PhyAgentOS/forge/task.py`)
- Agent task → Forge tool API: dispatches actions (evidence: `README.md`)
- Agent task → Interaction governance: checks governance (evidence: `PhyAgentOS/forge/task.py`)
- Interaction governance → Forge interaction client: creates client (evidence: `PhyAgentOS/forge/interaction/service.py`)
- Forge interaction client → Agent task: starts session (evidence: `PhyAgentOS/forge/interaction/client.py`)
- Runtime lifecycle → Skill catalog: loads manifests (evidence: `PhyAgentOS/skill_runtime/manager.py`)
- Runtime lifecycle → Skill installer: manages installs (evidence: `PhyAgentOS/skill_runtime/manager.py`)
- Skill selection → Runtime lifecycle: uses runtime (evidence: `README.md`)
- Agent task → Verification service: verifies outcome (evidence: `README.md`)
- Verification service → Verification engine: requests evaluation (evidence: `PhyAgentOS/verification/service.py`)
- Verification engine → Model providers: requests completion (evidence: `PhyAgentOS/verification/engine.py`)
- Session verifier → Verification service: uses verification (evidence: `PhyAgentOS/agent/session_verifier.py`)
- Governed runner → Interaction governance: coordinates (evidence: `PhyAgentOS/forge/interaction/service.py`)
- Agent task → Session verifier: checks session (evidence: `PhyAgentOS/agent/session_verifier.py`)
- Verified experience → Experience evolution: evolves lessons (evidence: `README.md`)
- Experience evolution → Experience store: persists experience (evidence: `PhyAgentOS/agent/experience/evolution.py`)
- Verification service → Verified experience: feeds verified outcomes (evidence: `README.md`)
