# radi0n92/flextrawurst-agent architecture

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

- Interactive diagram: https://gitdiagram.com/radi0n92/flextrawurst-agent
- Repository: https://github.com/radi0n92/flextrawurst-agent

## Overview

Werkraum is a repository of AI-agent, world-simulation, and operational tools rather than one single application. The sampled code shows a few concrete workflows: authenticated workspace requests handled by a FastAPI gateway; event evaluation and memory/reflection/self-model updates in the Innenleben components; and MCP access to VPS tools, including Blender-based 3D previews. The tree also indicates a web homepage and other world, chat, and forum subsystems, but no README was provided and those implementations were not sampled; their connections are therefore not asserted.

Main entry points: [`innenleben/nodes.py`](https://github.com/radi0n92/flextrawurst-agent/blob/main/innenleben/nodes.py) (Memory And Reflection), [`app/main.py`](https://github.com/radi0n92/flextrawurst-agent/blob/main/app/main.py) (Gateway Routes), [`hauhau_client.py`](https://github.com/radi0n92/flextrawurst-agent/blob/main/hauhau_client.py) (Hauhau Client), [`innenleben/emotion_bewerter.py`](https://github.com/radi0n92/flextrawurst-agent/blob/main/innenleben/emotion_bewerter.py) (Emotion Scoring)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gateway["Workspace Gateway"]
  node_api["Gateway Routes<br/>[main.py]"]
  node_auth["Token Security<br/>[security.py]"]
  node_models["Request Models<br/>[models.py]"]
  node_services["Workspace Services<br/>[services.py]"]
end

subgraph group_inner["Agent Inner Life"]
  node_nodes["Memory And Reflection<br/>[nodes.py]"]
  node_emotion["Emotion Scoring"]
  node_score["Reflection Rules"]
  node_selfmodel[("Self Model Store<br/>[selbstmodell.py]")]
  node_state["Agent State<br/>[state.py]"]
  node_config["Inner Life Config<br/>[config.py]"]
  node_scheduler["LLM Scheduler<br/>[llm_scheduler.py]"]
  node_llmclient["Hauhau Client<br/>[hauhau_client.py]"]
end

subgraph group_ops["VPS And 3D Tools"]
  node_mcp["VPS MCP Server<br/>[vps_mcp_server.py]"]
  node_blender["Blender Pipeline"]
end

subgraph group_web["Web Experience"]
  node_homepage["Homepage App<br/>[App.tsx]"]
end

subgraph group_ecosystem["Agent Ecosystem"]
  node_world["World Services"]
  node_forum["Flarum Tools<br/>[flarum_api.py]"]
  node_obsidian["Obsidian Tools<br/>[obsidian_vault.py]"]
end

node_client(("API Client"))
node_event(("Agent Event"))
node_llm["LLM Service"]

node_client -->|"requests"| node_api
node_api -->|"checks token"| node_auth
node_api -->|"validates payloads"| node_models
node_api -->|"calls"| node_services
node_event -.->|"enters workflow"| node_nodes
node_nodes -->|"evaluates event"| node_emotion
node_nodes -->|"scores reflection"| node_score
node_nodes -->|"loads and saves"| node_selfmodel
node_nodes -->|"uses state"| node_state
node_nodes -->|"uses settings"| node_config
node_nodes -->|"references"| node_scheduler
node_emotion -->|"requests evaluation"| node_llmclient
node_nodes -.->|"requests reflection"| node_llmclient
node_llmclient -->|"sends chat requests"| node_llm
node_mcp -->|"renders preview"| node_blender
node_homepage -.->|"user interaction"| node_client

click node_api "https://github.com/radi0n92/flextrawurst-agent/blob/main/app/main.py"
click node_auth "https://github.com/radi0n92/flextrawurst-agent/blob/main/app/security.py"
click node_models "https://github.com/radi0n92/flextrawurst-agent/blob/main/app/models.py"
click node_services "https://github.com/radi0n92/flextrawurst-agent/blob/main/app/services.py"
click node_nodes "https://github.com/radi0n92/flextrawurst-agent/blob/main/innenleben/nodes.py"
click node_emotion "https://github.com/radi0n92/flextrawurst-agent/blob/main/innenleben/emotion_bewerter.py"
click node_score "https://github.com/radi0n92/flextrawurst-agent/blob/main/innenleben/reflection_score.py"
click node_selfmodel "https://github.com/radi0n92/flextrawurst-agent/blob/main/innenleben/selbstmodell.py"
click node_state "https://github.com/radi0n92/flextrawurst-agent/blob/main/innenleben/state.py"
click node_config "https://github.com/radi0n92/flextrawurst-agent/blob/main/innenleben/config.py"
click node_scheduler "https://github.com/radi0n92/flextrawurst-agent/blob/main/llm_scheduler.py"
click node_llmclient "https://github.com/radi0n92/flextrawurst-agent/blob/main/hauhau_client.py"
click node_mcp "https://github.com/radi0n92/flextrawurst-agent/blob/main/tools/vps_mcp/vps_mcp_server.py"
click node_blender "https://github.com/radi0n92/flextrawurst-agent/blob/main/tools/3d_pipeline/blender_pipeline.py"
click node_homepage "https://github.com/radi0n92/flextrawurst-agent/blob/main/homepage-von-kimiweb-desing/app/src/App.tsx"
click node_world "https://github.com/radi0n92/flextrawurst-agent/tree/main/welt"
click node_forum "https://github.com/radi0n92/flextrawurst-agent/blob/main/flarum_api.py"
click node_obsidian "https://github.com/radi0n92/flextrawurst-agent/blob/main/obsidian_vault.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_api,node_auth,node_models,node_services,node_client toneBlue
class node_nodes,node_emotion,node_score,node_selfmodel,node_state,node_config,node_scheduler,node_llmclient toneAmber
class node_mcp,node_blender toneMint
class node_homepage toneRose
class node_world,node_forum,node_obsidian,node_event,node_llm toneIndigo
```

## Components

### Workspace Gateway

- [Gateway Routes](https://github.com/radi0n92/flextrawurst-agent/blob/main/app/main.py): `app/main.py`
- [Token Security](https://github.com/radi0n92/flextrawurst-agent/blob/main/app/security.py): `app/security.py`
- [Request Models](https://github.com/radi0n92/flextrawurst-agent/blob/main/app/models.py): `app/models.py`
- [Workspace Services](https://github.com/radi0n92/flextrawurst-agent/blob/main/app/services.py): `app/services.py`

### Agent Inner Life

- [Memory And Reflection](https://github.com/radi0n92/flextrawurst-agent/blob/main/innenleben/nodes.py): `innenleben/nodes.py`
- [Emotion Scoring](https://github.com/radi0n92/flextrawurst-agent/blob/main/innenleben/emotion_bewerter.py): `innenleben/emotion_bewerter.py`
- [Reflection Rules](https://github.com/radi0n92/flextrawurst-agent/blob/main/innenleben/reflection_score.py): `innenleben/reflection_score.py`
- [Self Model Store](https://github.com/radi0n92/flextrawurst-agent/blob/main/innenleben/selbstmodell.py): `innenleben/selbstmodell.py`
- [Agent State](https://github.com/radi0n92/flextrawurst-agent/blob/main/innenleben/state.py): `innenleben/state.py`
- [Inner Life Config](https://github.com/radi0n92/flextrawurst-agent/blob/main/innenleben/config.py): `innenleben/config.py`
- [LLM Scheduler](https://github.com/radi0n92/flextrawurst-agent/blob/main/llm_scheduler.py): `llm_scheduler.py`
- [Hauhau Client](https://github.com/radi0n92/flextrawurst-agent/blob/main/hauhau_client.py): `hauhau_client.py`

### VPS And 3D Tools

- [VPS MCP Server](https://github.com/radi0n92/flextrawurst-agent/blob/main/tools/vps_mcp/vps_mcp_server.py): `tools/vps_mcp/vps_mcp_server.py`
- [Blender Pipeline](https://github.com/radi0n92/flextrawurst-agent/blob/main/tools/3d_pipeline/blender_pipeline.py): `tools/3d_pipeline/blender_pipeline.py`

### Web Experience

- [Homepage App](https://github.com/radi0n92/flextrawurst-agent/blob/main/homepage-von-kimiweb-desing/app/src/App.tsx): `homepage-von-kimiweb-desing/app/src/App.tsx`

### Agent Ecosystem

- [World Services](https://github.com/radi0n92/flextrawurst-agent/tree/main/welt): `welt`
- [Flarum Tools](https://github.com/radi0n92/flextrawurst-agent/blob/main/flarum_api.py): `flarum_api.py`
- [Obsidian Tools](https://github.com/radi0n92/flextrawurst-agent/blob/main/obsidian_vault.py): `obsidian_vault.py`

### Other components

- **API Client**
- **Agent Event**
- **LLM Service**

## Connections

- API Client → Gateway Routes: requests (evidence: `app/main.py`)
- Gateway Routes → Token Security: checks token (evidence: `app/main.py`)
- Gateway Routes → Request Models: validates payloads (evidence: `app/main.py`)
- Gateway Routes → Workspace Services: calls (evidence: `app/main.py`)
- Agent Event → Memory And Reflection: enters workflow
- Memory And Reflection → Emotion Scoring: evaluates event (evidence: `innenleben/nodes.py`)
- Memory And Reflection → Reflection Rules: scores reflection (evidence: `innenleben/nodes.py`)
- Memory And Reflection → Self Model Store: loads and saves (evidence: `innenleben/nodes.py`)
- Memory And Reflection → Agent State: uses state (evidence: `innenleben/nodes.py`)
- Memory And Reflection → Inner Life Config: uses settings (evidence: `innenleben/nodes.py`)
- Memory And Reflection → LLM Scheduler: references (evidence: `innenleben/nodes.py`)
- Emotion Scoring → Hauhau Client: requests evaluation (evidence: `innenleben/emotion_bewerter.py`)
- Memory And Reflection → Hauhau Client: requests reflection (evidence: `innenleben/nodes.py`)
- Hauhau Client → LLM Service: sends chat requests (evidence: `hauhau_client.py`)
- VPS MCP Server → Blender Pipeline: renders preview (evidence: `tools/vps_mcp/vps_mcp_server.py`)
- Homepage App → API Client: user interaction
