# glnea/rpent architecture

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

- Interactive diagram: https://gitdiagram.com/glnea/rpent
- Repository: https://github.com/glnea/rpent

## Overview

RPent is an extensible framework for embodied agents, spanning simulated manipulation benchmarks and Franka hardware. The main workflow starts with an operator task, then uses a configured planner and robot-specific tools to observe and act through an environment service; memory and human interaction support the recursive agent loop. The README also documents evaluation and memory-distillation capabilities. The graph combines those documented product branches with sampled CLI, RPC, and environment-client behavior; several unsampled subsystem links are therefore left out.

Main entry points: [`rpent/cli/main.py`](https://github.com/glnea/rpent/blob/main/rpent/cli/main.py) (RPent CLI), [`rpent/tools/common.py`](https://github.com/glnea/rpent/blob/main/rpent/tools/common.py) (Robot Tools), [`rpent/tools/toolkit.py`](https://github.com/glnea/rpent/blob/main/rpent/tools/toolkit.py) (Toolkits), [`rpent/memory/manager.py`](https://github.com/glnea/rpent/blob/main/rpent/memory/manager.py) (Memory Manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_agent["Agent Control"]
  node_cli["RPent CLI<br/>[main.py]"]
  node_robot_specs["Robot Specs<br/>[robot_spec.py]"]
  node_planners["Planners"]
  node_toolkit["Toolkits<br/>[toolkit.py]"]
  node_tools["Robot Tools<br/>[common.py]"]
end

subgraph group_robot["Robot Runtime"]
  node_perception["Perception Services"]
  node_env_facade["Environment Facades<br/>[env_facade_base.py]"]
  node_env_clients["Environment Clients<br/>[env_client_base.py]"]
  node_benchmark_adapters["Benchmark Adapters<br/>[env_client.py]"]
  node_hardware_adapters["Franka Adapters<br/>[env_client.py]"]
  node_vla_client["VLA Client<br/>[pi05_vla_client.py]"]
  node_environment["Simulator or Robot"]
end

subgraph group_memory["Memory Learning"]
  node_memory_manager["Memory Manager<br/>[manager.py]"]
  node_memory_corpus[("Memory Corpus")]
  node_memory_tools["Memory Tools<br/>[tools.py]"]
end

subgraph group_interaction["Operator Interaction"]
  node_dashboard["Dashboard<br/>[server.py]"]
  node_human_tools["Human Input"]
end

subgraph group_evaluation["Evaluation"]
  node_evaluation["Evaluation Results<br/>[result.py]"]
  node_flywheel["Flywheel Export<br/>[export.py]"]
end

node_operator(("Operator"))

node_operator -->|"sets task"| node_cli
node_cli -->|"loads configuration"| node_robot_specs
node_cli -->|"runs solve"| node_planners
node_cli -->|"supplies tools"| node_toolkit
node_planners -->|"invokes tools"| node_toolkit
node_toolkit -->|"dispatches calls"| node_tools
node_tools -->|"requests actions"| node_env_facade
node_env_facade -->|"uses client"| node_env_clients
node_env_clients -->|"specializes"| node_benchmark_adapters
node_env_clients -->|"specializes"| node_hardware_adapters
node_benchmark_adapters -->|"RPC calls"| node_environment
node_hardware_adapters -->|"RPC calls"| node_environment
node_tools -.->|"requests perception"| node_perception
node_tools -.->|"requests actions"| node_vla_client
node_cli -->|"configures memory"| node_memory_manager
node_memory_manager -->|"reads and merges"| node_memory_corpus
node_memory_tools -->|"accesses corpus"| node_memory_manager
node_cli -.->|"starts dashboard"| node_dashboard
node_dashboard -.->|"receives interaction"| node_operator
node_toolkit -.->|"offers approval"| node_human_tools
node_cli -->|"finalizes run"| node_evaluation
node_memory_manager -.->|"supports distillation"| node_flywheel

click node_cli "https://github.com/glnea/rpent/blob/main/rpent/cli/main.py"
click node_robot_specs "https://github.com/glnea/rpent/blob/main/rpent/robots/robot_spec.py"
click node_planners "https://github.com/glnea/rpent/tree/main/rpent/planner"
click node_toolkit "https://github.com/glnea/rpent/blob/main/rpent/tools/toolkit.py"
click node_tools "https://github.com/glnea/rpent/blob/main/rpent/tools/common.py"
click node_perception "https://github.com/glnea/rpent/tree/main/rpent/robots/components"
click node_env_facade "https://github.com/glnea/rpent/blob/main/rpent/robots/components/env_facade_base.py"
click node_env_clients "https://github.com/glnea/rpent/blob/main/rpent/robots/components/env_client_base.py"
click node_benchmark_adapters "https://github.com/glnea/rpent/blob/main/robots/libero/env_client.py"
click node_hardware_adapters "https://github.com/glnea/rpent/blob/main/robots/franka/env_client.py"
click node_vla_client "https://github.com/glnea/rpent/blob/main/rpent/robots/components/pi05_vla_client.py"
click node_memory_manager "https://github.com/glnea/rpent/blob/main/rpent/memory/manager.py"
click node_memory_tools "https://github.com/glnea/rpent/blob/main/rpent/memory/tools.py"
click node_dashboard "https://github.com/glnea/rpent/blob/main/rpent/dashboard/server.py"
click node_human_tools "https://github.com/glnea/rpent/blob/main/rpent/tools/human_in_the_loop.py"
click node_evaluation "https://github.com/glnea/rpent/blob/main/rpent/evaluation/result.py"
click node_flywheel "https://github.com/glnea/rpent/blob/main/rpent/flywheel/export.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_robot_specs,node_planners,node_toolkit,node_tools toneBlue
class node_perception,node_env_facade,node_env_clients,node_benchmark_adapters,node_hardware_adapters,node_vla_client,node_environment toneAmber
class node_memory_manager,node_memory_corpus,node_memory_tools toneMint
class node_dashboard,node_human_tools toneRose
class node_evaluation,node_flywheel,node_operator toneIndigo
```

## Components

### Agent Control

- [RPent CLI](https://github.com/glnea/rpent/blob/main/rpent/cli/main.py): `rpent/cli/main.py`
- [Robot Specs](https://github.com/glnea/rpent/blob/main/rpent/robots/robot_spec.py): `rpent/robots/robot_spec.py`
- [Planners](https://github.com/glnea/rpent/tree/main/rpent/planner): `rpent/planner`
- [Toolkits](https://github.com/glnea/rpent/blob/main/rpent/tools/toolkit.py): `rpent/tools/toolkit.py`
- [Robot Tools](https://github.com/glnea/rpent/blob/main/rpent/tools/common.py): `rpent/tools/common.py`

### Robot Runtime

- [Perception Services](https://github.com/glnea/rpent/tree/main/rpent/robots/components): `rpent/robots/components`
- [Environment Facades](https://github.com/glnea/rpent/blob/main/rpent/robots/components/env_facade_base.py): `rpent/robots/components/env_facade_base.py`
- [Environment Clients](https://github.com/glnea/rpent/blob/main/rpent/robots/components/env_client_base.py): `rpent/robots/components/env_client_base.py`
- [Benchmark Adapters](https://github.com/glnea/rpent/blob/main/robots/libero/env_client.py): `robots/libero/env_client.py`
- [Franka Adapters](https://github.com/glnea/rpent/blob/main/robots/franka/env_client.py): `robots/franka/env_client.py`
- [VLA Client](https://github.com/glnea/rpent/blob/main/rpent/robots/components/pi05_vla_client.py): `rpent/robots/components/pi05_vla_client.py`
- **Simulator or Robot**

### Memory Learning

- [Memory Manager](https://github.com/glnea/rpent/blob/main/rpent/memory/manager.py): `rpent/memory/manager.py`
- **Memory Corpus**
- [Memory Tools](https://github.com/glnea/rpent/blob/main/rpent/memory/tools.py): `rpent/memory/tools.py`

### Operator Interaction

- [Dashboard](https://github.com/glnea/rpent/blob/main/rpent/dashboard/server.py): `rpent/dashboard/server.py`
- [Human Input](https://github.com/glnea/rpent/blob/main/rpent/tools/human_in_the_loop.py): `rpent/tools/human_in_the_loop.py`

### Evaluation

- [Evaluation Results](https://github.com/glnea/rpent/blob/main/rpent/evaluation/result.py): `rpent/evaluation/result.py`
- [Flywheel Export](https://github.com/glnea/rpent/blob/main/rpent/flywheel/export.py): `rpent/flywheel/export.py`

### Other components

- **Operator**

## Connections

- Operator → RPent CLI: sets task
- RPent CLI → Robot Specs: loads configuration
- RPent CLI → Planners: runs solve
- RPent CLI → Toolkits: supplies tools
- Planners → Toolkits: invokes tools
- Toolkits → Robot Tools: dispatches calls
- Robot Tools → Environment Facades: requests actions
- Environment Facades → Environment Clients: uses client
- Environment Clients → Benchmark Adapters: specializes
- Environment Clients → Franka Adapters: specializes
- Benchmark Adapters → Simulator or Robot: RPC calls
- Franka Adapters → Simulator or Robot: RPC calls
- Robot Tools → Perception Services: requests perception
- Robot Tools → VLA Client: requests actions
- RPent CLI → Memory Manager: configures memory
- Memory Manager → Memory Corpus: reads and merges
- Memory Tools → Memory Manager: accesses corpus
- RPent CLI → Dashboard: starts dashboard
- Dashboard → Operator: receives interaction
- Toolkits → Human Input: offers approval
- RPent CLI → Evaluation Results: finalizes run
- Memory Manager → Flywheel Export: supports distillation
