# kirtijha/langgraph-interrupt-workflow-template architecture

> Architecture diagram of the GitHub repository kirtijha/langgraph-interrupt-workflow-template, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kirtijha/langgraph-interrupt-workflow-template
- Repository: https://github.com/kirtijha/langgraph-interrupt-workflow-template

## Overview

Repo Steward is a human-in-the-loop GitHub maintainer agent. A maintainer selects a repository and mission in the browser; the API starts a streamed LangGraph mission, which examines repository state and proposes actions. Risk policy gates public actions for approval, edit, rejection, or reply; approved work updates the board and produces a report. The README documents time travel, persistence, memory, model choices, and offline missions. Some backend wiring is unsampled, so edges below rely on explicit README statements or indexed references.

Main entry points: [`backend/steward/agent.py`](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/steward/agent.py) (Steward agent), [`backend/main.py`](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/main.py) (Mission routes), [`frontend/components/Workspace.tsx`](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/frontend/components/Workspace.tsx) (Mission workspace), [`frontend/lib/api.ts`](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/frontend/lib/api.ts) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Maintainer UI"]
  node_home["Mission home<br/>[page.tsx]"]
  node_workspace["Mission workspace<br/>[Workspace.tsx]"]
  node_mission_hook["Mission state<br/>[useMission.ts]"]
  node_decision_card["Approval controls<br/>[ApprovalCard.tsx]"]
  node_board["Board and feed<br/>[BoardPanel.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
  node_credentials["Browser credentials<br/>[github.ts]"]
  node_model_settings["Model settings<br/>[modelSettings.ts]"]
end

subgraph group_api["Mission API"]
  node_fastapi["Mission routes<br/>[main.py]"]
end

subgraph group_agent["Agent workflow"]
  node_agent["Steward agent<br/>[agent.py]"]
  node_catalog["Mission catalog<br/>[catalog.py]"]
  node_pilot["Offline pilot<br/>[pilot.py]"]
  node_tools["GitHub action tools<br/>[tools.py]"]
end

subgraph group_repo["Repository and state"]
  node_github["GitHub access<br/>[github.py]"]
  node_fixture[("Sample repository<br/>[fixture.py]")]
  node_world[("Mission board state<br/>[world.py]")]
  node_persistence[("Checkpoint storage<br/>[persistence.py]")]
  node_memory[("Repository memory<br/>[memory.py]")]
end

subgraph group_support["Models and policy"]
  node_risk["Risk policy<br/>[policy.py]"]
  node_approval_policy["Approval policy<br/>[approval_policy.py]"]
  node_client_model["Client model config<br/>[client_model.py]"]
  node_llm["Model factory<br/>[llm.py]"]
  node_evals["Mission evaluations<br/>[run_evals.py]"]
end

node_maintainer(("Maintainer"))
node_github_service[("GitHub REST")]
node_model_provider(("Model provider"))

node_maintainer -->|"selects mission"| node_home
node_home -->|"opens mission"| node_workspace
node_home -->|"loads state"| node_mission_hook
node_workspace -->|"renders decisions"| node_decision_card
node_workspace -->|"renders board"| node_board
node_workspace -->|"dispatches decisions"| node_mission_hook
node_mission_hook -->|"streams requests"| node_api_client
node_api_client -->|"calls routes"| node_fastapi
node_credentials -->|"adds GitHub header"| node_api_client
node_model_settings -->|"adds model headers"| node_api_client
node_fastapi -->|"starts and resumes"| node_agent
node_fastapi -->|"serves missions"| node_catalog
node_fastapi -->|"loads checkpointing"| node_persistence
node_fastapi -->|"stores outcomes"| node_memory
node_agent -->|"provides actions"| node_tools
node_agent -->|"gates tool calls"| node_risk
node_risk -->|"scores actions"| node_approval_policy
node_agent -->|"uses offline model"| node_pilot
node_agent -->|"uses client choice"| node_client_model
node_agent -->|"uses model factory"| node_llm
node_tools -->|"executes actions"| node_github
node_tools -->|"updates board"| node_world
node_github -->|"reads and writes"| node_github_service
node_github -->|"uses fixture backend"| node_fixture
node_agent -->|"keeps board in state"| node_world
node_llm -.->|"calls provider"| node_model_provider
node_evals -->|"evaluates missions"| node_agent

click node_home "https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/frontend/app/page.tsx"
click node_workspace "https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/frontend/components/Workspace.tsx"
click node_mission_hook "https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/frontend/lib/useMission.ts"
click node_decision_card "https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/frontend/components/ApprovalCard.tsx"
click node_board "https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/frontend/components/BoardPanel.tsx"
click node_api_client "https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/frontend/lib/api.ts"
click node_credentials "https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/frontend/lib/github.ts"
click node_model_settings "https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/frontend/lib/modelSettings.ts"
click node_fastapi "https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/main.py"
click node_agent "https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/steward/agent.py"
click node_catalog "https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/steward/catalog.py"
click node_pilot "https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/steward/pilot.py"
click node_tools "https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/steward/tools.py"
click node_risk "https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/steward/policy.py"
click node_approval_policy "https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/approval_policy.py"
click node_github "https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/steward/github.py"
click node_fixture "https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/steward/fixture.py"
click node_world "https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/steward/world.py"
click node_persistence "https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/persistence.py"
click node_memory "https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/memory.py"
click node_client_model "https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/client_model.py"
click node_llm "https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/llm.py"
click node_evals "https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/evals/run_evals.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_home,node_workspace,node_mission_hook,node_decision_card,node_board,node_api_client,node_credentials,node_model_settings toneBlue
class node_fastapi,node_github_service toneAmber
class node_agent,node_catalog,node_pilot,node_tools toneMint
class node_github,node_fixture,node_world,node_persistence,node_memory toneRose
class node_risk,node_approval_policy,node_client_model,node_llm,node_evals,node_maintainer,node_model_provider toneIndigo
```

## Components

### Maintainer UI

- [Mission home](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/frontend/app/page.tsx): `frontend/app/page.tsx`
- [Mission workspace](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/frontend/components/Workspace.tsx): `frontend/components/Workspace.tsx`
- [Mission state](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/frontend/lib/useMission.ts): `frontend/lib/useMission.ts`
- [Approval controls](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/frontend/components/ApprovalCard.tsx): `frontend/components/ApprovalCard.tsx`
- [Board and feed](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/frontend/components/BoardPanel.tsx): `frontend/components/BoardPanel.tsx`
- [API client](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/frontend/lib/api.ts): `frontend/lib/api.ts`
- [Browser credentials](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/frontend/lib/github.ts): `frontend/lib/github.ts`
- [Model settings](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/frontend/lib/modelSettings.ts): `frontend/lib/modelSettings.ts`

### Mission API

- [Mission routes](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/main.py): `backend/main.py`

### Agent workflow

- [Steward agent](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/steward/agent.py): `backend/steward/agent.py`
- [Mission catalog](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/steward/catalog.py): `backend/steward/catalog.py`
- [Offline pilot](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/steward/pilot.py): `backend/steward/pilot.py`
- [GitHub action tools](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/steward/tools.py): `backend/steward/tools.py`

### Repository and state

- [GitHub access](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/steward/github.py): `backend/steward/github.py`
- [Sample repository](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/steward/fixture.py): `backend/steward/fixture.py`
- [Mission board state](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/steward/world.py): `backend/steward/world.py`
- [Checkpoint storage](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/persistence.py): `backend/persistence.py`
- [Repository memory](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/memory.py): `backend/memory.py`

### Models and policy

- [Risk policy](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/steward/policy.py): `backend/steward/policy.py`
- [Approval policy](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/approval_policy.py): `backend/approval_policy.py`
- [Client model config](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/client_model.py): `backend/client_model.py`
- [Model factory](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/llm.py): `backend/llm.py`
- [Mission evaluations](https://github.com/kirtijha/langgraph-interrupt-workflow-template/blob/main/backend/evals/run_evals.py): `backend/evals/run_evals.py`

### Other components

- **Maintainer**
- **GitHub REST**
- **Model provider**

## Connections

- Maintainer → Mission home: selects mission (evidence: `README.md`)
- Mission home → Mission workspace: opens mission (evidence: `frontend/app/page.tsx`)
- Mission home → Mission state: loads state (evidence: `frontend/app/page.tsx`)
- Mission workspace → Approval controls: renders decisions (evidence: `frontend/components/Workspace.tsx`)
- Mission workspace → Board and feed: renders board (evidence: `frontend/components/Workspace.tsx`)
- Mission workspace → Mission state: dispatches decisions (evidence: `frontend/app/page.tsx`)
- Mission state → API client: streams requests (evidence: `frontend/lib/useMission.ts`)
- API client → Mission routes: calls routes (evidence: `README.md`)
- Browser credentials → API client: adds GitHub header
- Model settings → API client: adds model headers (evidence: `frontend/lib/modelSettings.ts`)
- Mission routes → Steward agent: starts and resumes (evidence: `backend/main.py`)
- Mission routes → Mission catalog: serves missions (evidence: `backend/main.py`)
- Mission routes → Checkpoint storage: loads checkpointing (evidence: `backend/main.py`)
- Mission routes → Repository memory: stores outcomes (evidence: `backend/main.py`)
- Steward agent → GitHub action tools: provides actions (evidence: `backend/steward/agent.py`)
- Steward agent → Risk policy: gates tool calls (evidence: `README.md`)
- Risk policy → Approval policy: scores actions (evidence: `backend/steward/policy.py`)
- Steward agent → Offline pilot: uses offline model (evidence: `backend/steward/agent.py`)
- Steward agent → Client model config: uses client choice (evidence: `backend/steward/agent.py`)
- Steward agent → Model factory: uses model factory (evidence: `backend/steward/agent.py`)
- GitHub action tools → GitHub access: executes actions (evidence: `backend/steward/tools.py`)
- GitHub action tools → Mission board state: updates board (evidence: `README.md`)
- GitHub access → GitHub REST: reads and writes (evidence: `README.md`)
- GitHub access → Sample repository: uses fixture backend (evidence: `backend/steward/github.py`)
- Steward agent → Mission board state: keeps board in state (evidence: `README.md`)
- Model factory → Model provider: calls provider
- Mission evaluations → Steward agent: evaluates missions (evidence: `backend/evals/run_evals.py`)
