# yinoni/verilays architecture

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

- Interactive diagram: https://gitdiagram.com/yinoni/verilays
- Repository: https://github.com/yinoni/verilays

## Overview

Verilays wraps agent tools, records their claims, then asynchronously checks the claimed outcome against a real system and reports verdicts. The main flow runs from a tool call through the action store and worker to a system-specific verifier; users then inspect results through reports, MCP, or optional alerts and observability. The README also documents LangGraph wrappers and Google Calendar checks. Some worker and integration source is excerpted only in part, so links rely on the shown calls, explicit documentation, or source-index references.

Main entry points: [`verilays/worker.py`](https://github.com/yinoni/verilays/blob/main/verilays/worker.py) (Verification worker), [`verilays/cli.py`](https://github.com/yinoni/verilays/blob/main/verilays/cli.py) (CLI commands), [`verilays/__init__.py`](https://github.com/yinoni/verilays/blob/main/verilays/__init__.py) (Action decorators), [`verilays/systems/__init__.py`](https://github.com/yinoni/verilays/blob/main/verilays/systems/__init__.py) (System check registry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Action capture"]
  node_action_api["Action decorators<br/>[__init__.py]"]
  node_store_code["Action persistence<br/>[store.py]"]
  node_action_db[("Action store")]
end

subgraph group_verification["Verification"]
  node_worker["Verification worker<br/>[worker.py]"]
  node_check_results["Check results<br/>[checks.py]"]
  node_system_dispatch["System check registry<br/>[__init__.py]"]
  node_pg_check["Postgres checker<br/>[postgres.py]"]
  node_calendar_check["Calendar checker<br/>[google_calendar.py]"]
end

subgraph group_inspection["Inspection"]
  node_cli["CLI commands<br/>[cli.py]"]
  node_report["Verdict report<br/>[report.py]"]
  node_mcp["Read-only MCP server<br/>[mcp.py]"]
end

subgraph group_integrations["Integrations"]
  node_platforms["Observability platforms<br/>[platforms.py]"]
  node_webhook["Failure webhook sender<br/>[webhook.py]"]
end

node_agent(("Agent tool caller"))
node_app_postgres[("Application Postgres")]
node_google_calendar[("Google Calendar")]
node_langfuse["Langfuse"]
node_webhook_target["Webhook endpoint"]

node_agent -->|"calls wrapped tool"| node_action_api
node_action_api -->|"records action"| node_store_code
node_store_code -->|"writes action rows"| node_action_db
node_action_api -->|"runs tool write"| node_app_postgres
node_worker -->|"reads and updates"| node_action_db
node_worker -->|"selects verifier"| node_system_dispatch
node_system_dispatch -->|"dispatches checks"| node_pg_check
node_system_dispatch -->|"dispatches checks"| node_calendar_check
node_pg_check -->|"reads records"| node_app_postgres
node_calendar_check -->|"reads events"| node_google_calendar
node_worker -->|"uses verdict types"| node_check_results
node_cli -->|"starts worker"| node_worker
node_cli -->|"runs report"| node_report
node_cli -->|"starts MCP"| node_mcp
node_report -->|"queries verdicts"| node_action_db
node_mcp -->|"queries actions"| node_action_db
node_worker -->|"sends verdicts"| node_platforms
node_platforms -.->|"scores tool trace"| node_langfuse
node_worker -->|"sends final failures"| node_webhook
node_webhook -->|"POSTs alert"| node_webhook_target

click node_action_api "https://github.com/yinoni/verilays/blob/main/verilays/__init__.py"
click node_store_code "https://github.com/yinoni/verilays/blob/main/verilays/store.py"
click node_worker "https://github.com/yinoni/verilays/blob/main/verilays/worker.py"
click node_check_results "https://github.com/yinoni/verilays/blob/main/verilays/checks.py"
click node_system_dispatch "https://github.com/yinoni/verilays/blob/main/verilays/systems/__init__.py"
click node_pg_check "https://github.com/yinoni/verilays/blob/main/verilays/systems/postgres.py"
click node_calendar_check "https://github.com/yinoni/verilays/blob/main/verilays/systems/google_calendar.py"
click node_cli "https://github.com/yinoni/verilays/blob/main/verilays/cli.py"
click node_report "https://github.com/yinoni/verilays/blob/main/verilays/report.py"
click node_mcp "https://github.com/yinoni/verilays/blob/main/verilays/mcp.py"
click node_platforms "https://github.com/yinoni/verilays/blob/main/verilays/platforms.py"
click node_webhook "https://github.com/yinoni/verilays/blob/main/verilays/webhook.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_action_api,node_store_code,node_action_db toneBlue
class node_worker,node_check_results,node_system_dispatch,node_pg_check,node_calendar_check,node_app_postgres,node_google_calendar toneAmber
class node_cli,node_report,node_mcp,node_webhook_target toneMint
class node_platforms,node_webhook toneRose
class node_agent,node_langfuse toneIndigo
```

## Components

### Action capture

- [Action decorators](https://github.com/yinoni/verilays/blob/main/verilays/__init__.py): `verilays/__init__.py`
- [Action persistence](https://github.com/yinoni/verilays/blob/main/verilays/store.py): `verilays/store.py`
- **Action store**

### Verification

- [Verification worker](https://github.com/yinoni/verilays/blob/main/verilays/worker.py): `verilays/worker.py`
- [Check results](https://github.com/yinoni/verilays/blob/main/verilays/checks.py): `verilays/checks.py`
- [System check registry](https://github.com/yinoni/verilays/blob/main/verilays/systems/__init__.py): `verilays/systems/__init__.py`
- [Postgres checker](https://github.com/yinoni/verilays/blob/main/verilays/systems/postgres.py): `verilays/systems/postgres.py`
- [Calendar checker](https://github.com/yinoni/verilays/blob/main/verilays/systems/google_calendar.py): `verilays/systems/google_calendar.py`

### Inspection

- [CLI commands](https://github.com/yinoni/verilays/blob/main/verilays/cli.py): `verilays/cli.py`
- [Verdict report](https://github.com/yinoni/verilays/blob/main/verilays/report.py): `verilays/report.py`
- [Read-only MCP server](https://github.com/yinoni/verilays/blob/main/verilays/mcp.py): `verilays/mcp.py`

### Integrations

- [Observability platforms](https://github.com/yinoni/verilays/blob/main/verilays/platforms.py): `verilays/platforms.py`
- [Failure webhook sender](https://github.com/yinoni/verilays/blob/main/verilays/webhook.py): `verilays/webhook.py`

### Other components

- **Agent tool caller**
- **Application Postgres**
- **Google Calendar**
- **Langfuse**
- **Webhook endpoint**

## Connections

- Agent tool caller → Action decorators: calls wrapped tool (evidence: `README.md`)
- Action decorators → Action persistence: records action (evidence: `README.md`)
- Action persistence → Action store: writes action rows (evidence: `verilays/store.py`)
- Action decorators → Application Postgres: runs tool write (evidence: `README.md`)
- Verification worker → Action store: reads and updates (evidence: `verilays/worker.py`)
- Verification worker → System check registry: selects verifier (evidence: `verilays/worker.py`)
- System check registry → Postgres checker: dispatches checks (evidence: `verilays/systems/__init__.py`)
- System check registry → Calendar checker: dispatches checks (evidence: `verilays/systems/__init__.py`)
- Postgres checker → Application Postgres: reads records (evidence: `verilays/systems/postgres.py`)
- Calendar checker → Google Calendar: reads events (evidence: `verilays/systems/google_calendar.py`)
- Verification worker → Check results: uses verdict types (evidence: `verilays/worker.py`)
- CLI commands → Verification worker: starts worker (evidence: `verilays/cli.py`)
- CLI commands → Verdict report: runs report (evidence: `verilays/cli.py`)
- CLI commands → Read-only MCP server: starts MCP (evidence: `verilays/cli.py`)
- Verdict report → Action store: queries verdicts (evidence: `verilays/report.py`)
- Read-only MCP server → Action store: queries actions (evidence: `verilays/mcp.py`)
- Verification worker → Observability platforms: sends verdicts (evidence: `verilays/worker.py`)
- Observability platforms → Langfuse: scores tool trace (evidence: `verilays/platforms.py`)
- Verification worker → Failure webhook sender: sends final failures (evidence: `verilays/worker.py`)
- Failure webhook sender → Webhook endpoint: POSTs alert (evidence: `verilays/webhook.py`)
