# 7cc8/odoo-hr-agents architecture

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

- Interactive diagram: https://gitdiagram.com/7cc8/odoo-hr-agents
- Repository: https://github.com/7cc8/odoo-hr-agents

## Overview

The repository’s documented MVP is a guarded Excel-to-Odoo employee-creation workflow: parse and normalize input, validate it against Odoo, produce a dry-run report, bind human approval to that report, then create and read back records with audit output. Alongside it, the README describes a unified chat/dashboard and an eight-agent LangGraph experience, plus broader HR service capabilities. The graph keeps those product surfaces distinct; unsampled service internals and some dashboard wiring are represented conservatively.

Main entry points: [`agents/seraj_meta_agent.py`](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/agents/seraj_meta_agent.py) (Seraj orchestrator), [`web_service.py`](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/web_service.py) (Unified web service), [`graph/agentic_nodes.py`](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/graph/agentic_nodes.py) (LangGraph workflow), [`writer.py`](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/writer.py) (Restricted writer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mvp["Employee onboarding"]
  node_parser["Excel parser<br/>[parser.py]"]
  node_normalization["Data normalization<br/>[normalization.py]"]
  node_validator["Validation and matching<br/>[validator.py]"]
  node_dry_run["Dry-run reports<br/>[dry_run_report.py]"]
  node_approval["Approval creation<br/>[make_approval.py]"]
  node_approval_schema["Approval verification<br/>[approval_schema.py]"]
  node_writer["Restricted writer<br/>[writer.py]"]
end

subgraph group_agents["Agent orchestration"]
  node_web["Unified web service<br/>[web_service.py]"]
  node_graph["LangGraph workflow<br/>[agentic_nodes.py]"]
  node_state["Workflow state<br/>[state.py]"]
  node_seraj["Seraj orchestrator"]
  node_fahas["Fahas tools agent<br/>[fahas_agent.py]"]
  node_hares["Hares security agent<br/>[hares_agent.py]"]
  node_katib["Katib execution agent<br/>[katib_agent.py]"]
  node_mudaqqiq["Mudaqqiq compliance<br/>[mudaqqiq_agent.py]"]
  node_musleh["Musleh repair agent<br/>[musleh_agent.py]"]
  node_muwaffaq["Muwaffaq matching<br/>[muwaffaq_agent.py]"]
  node_sijil["Sijil log agent<br/>[sijil_agent.py]"]
  node_llm["LLM provider<br/>[llm_provider.py]"]
  node_llm_config["LLM configuration"]
end

subgraph group_integrations["Odoo and HR services"]
  node_write_gateway["Create/read gateway"]
  node_environment_policy["Environment guard"]
  node_readonly_repo["Odoo read repository"]
  node_law_rules["Saudi labor rules"]
  node_leave["Leave service<br/>[leave_service.py]"]
  node_attendance["Attendance service"]
  node_contracts["Contract service"]
  node_payroll["Payroll service<br/>[payroll_service.py]"]
end

subgraph group_operations["Audit and operations"]
  node_audit["JSONL audit"]
  node_events["Agent events"]
  node_event_store["Event JSONL"]
end

node_hr_user(("HR reviewer"))
node_excel["Employee workbook"]
node_odoo[("Odoo HR")]

node_hr_user -->|"provides"| node_excel
node_excel -->|"uploads"| node_parser
node_parser -->|"normalizes"| node_normalization
node_parser -->|"passes rows"| node_validator
node_validator -->|"matches against"| node_readonly_repo
node_validator -->|"reports results"| node_dry_run
node_hr_user -->|"selects accepted rows"| node_approval
node_dry_run -->|"binds approval"| node_approval
node_approval -->|"creates approval"| node_approval_schema
node_approval_schema -->|"authorizes rows"| node_writer
node_writer -->|"checks environment"| node_environment_policy
node_writer -->|"creates and reads"| node_write_gateway
node_write_gateway -->|"mutates and reads"| node_odoo
node_writer -->|"records outcome"| node_audit
node_hr_user -->|"chats or uploads"| node_web
node_web -->|"routes workflow"| node_graph
node_graph -->|"updates state"| node_state
node_graph -->|"invokes agents"| node_seraj
node_seraj -->|"delegates tools"| node_fahas
node_seraj -->|"delegates security"| node_hares
node_seraj -->|"delegates execution"| node_katib
node_seraj -->|"delegates compliance"| node_mudaqqiq
node_seraj -->|"delegates repair"| node_musleh
node_seraj -->|"delegates matching"| node_muwaffaq
node_seraj -->|"delegates logging"| node_sijil
node_graph -->|"checks write plan"| node_hares
node_graph -->|"emits events"| node_events
node_events -->|"records agent events"| node_event_store
node_seraj -.->|"uses language model"| node_llm
node_llm -->|"loads configuration"| node_llm_config
node_fahas -->|"queries Odoo"| node_readonly_repo
node_readonly_repo -->|"reads HR data"| node_odoo
node_mudaqqiq -->|"checks legal rules"| node_law_rules
node_web -->|"exposes HR service"| node_leave
node_web -->|"exposes HR service"| node_attendance
node_web -.->|"exposes HR service"| node_contracts
node_web -.->|"exposes HR service"| node_payroll

click node_parser "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/parser.py"
click node_normalization "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/normalization.py"
click node_validator "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/validator.py"
click node_dry_run "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/dry_run_report.py"
click node_approval "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/make_approval.py"
click node_approval_schema "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/approval_schema.py"
click node_writer "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/writer.py"
click node_write_gateway "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/odoo_write_gateway.py"
click node_environment_policy "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/environment_policy.py"
click node_readonly_repo "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/odoo_readonly_repository.py"
click node_audit "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/sijil_audit_service.py"
click node_web "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/web_service.py"
click node_graph "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/graph/agentic_nodes.py"
click node_state "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/graph/state.py"
click node_seraj "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/agents/seraj_meta_agent.py"
click node_fahas "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/agents/fahas_agent.py"
click node_hares "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/agents/hares_agent.py"
click node_katib "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/agents/katib_agent.py"
click node_mudaqqiq "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/agents/mudaqqiq_agent.py"
click node_musleh "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/agents/musleh_agent.py"
click node_muwaffaq "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/agents/muwaffaq_agent.py"
click node_sijil "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/agents/sijil_agent.py"
click node_llm "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/agents/llm_provider.py"
click node_llm_config "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/llm_config_manager.py"
click node_events "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/agent_events_service.py"
click node_event_store "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/agents/agent_events_service.py"
click node_law_rules "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/saudi_labor_law_rules.py"
click node_leave "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/leave_service.py"
click node_attendance "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/attendance_service.py"
click node_contracts "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/contract_service.py"
click node_payroll "https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/payroll_service.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_parser,node_normalization,node_validator,node_dry_run,node_approval,node_approval_schema,node_writer,node_hr_user toneBlue
class node_web,node_graph,node_state,node_seraj,node_fahas,node_hares,node_katib,node_mudaqqiq,node_musleh,node_muwaffaq,node_sijil,node_llm,node_llm_config,node_odoo toneAmber
class node_write_gateway,node_environment_policy,node_readonly_repo,node_law_rules,node_leave,node_attendance,node_contracts,node_payroll toneMint
class node_audit,node_events,node_event_store toneRose
class node_excel toneIndigo
```

## Components

### Employee onboarding

- [Excel parser](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/parser.py): `parser.py`
- [Data normalization](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/normalization.py): `normalization.py`
- [Validation and matching](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/validator.py): `validator.py`
- [Dry-run reports](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/dry_run_report.py): `dry_run_report.py`
- [Approval creation](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/make_approval.py): `make_approval.py`
- [Approval verification](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/approval_schema.py): `approval_schema.py`
- [Restricted writer](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/writer.py): `writer.py`

### Agent orchestration

- [Unified web service](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/web_service.py): `web_service.py`
- [LangGraph workflow](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/graph/agentic_nodes.py): `graph/agentic_nodes.py`
- [Workflow state](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/graph/state.py): `graph/state.py`
- [Seraj orchestrator](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/agents/seraj_meta_agent.py): `agents/seraj_meta_agent.py`
- [Fahas tools agent](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/agents/fahas_agent.py): `agents/fahas_agent.py`
- [Hares security agent](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/agents/hares_agent.py): `agents/hares_agent.py`
- [Katib execution agent](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/agents/katib_agent.py): `agents/katib_agent.py`
- [Mudaqqiq compliance](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/agents/mudaqqiq_agent.py): `agents/mudaqqiq_agent.py`
- [Musleh repair agent](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/agents/musleh_agent.py): `agents/musleh_agent.py`
- [Muwaffaq matching](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/agents/muwaffaq_agent.py): `agents/muwaffaq_agent.py`
- [Sijil log agent](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/agents/sijil_agent.py): `agents/sijil_agent.py`
- [LLM provider](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/agents/llm_provider.py): `agents/llm_provider.py`
- [LLM configuration](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/llm_config_manager.py): `llm_config_manager.py`

### Odoo and HR services

- [Create/read gateway](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/odoo_write_gateway.py): `odoo_write_gateway.py`
- [Environment guard](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/environment_policy.py): `environment_policy.py`
- [Odoo read repository](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/odoo_readonly_repository.py): `odoo_readonly_repository.py`
- [Saudi labor rules](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/saudi_labor_law_rules.py): `saudi_labor_law_rules.py`
- [Leave service](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/leave_service.py): `leave_service.py`
- [Attendance service](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/attendance_service.py): `attendance_service.py`
- [Contract service](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/contract_service.py): `contract_service.py`
- [Payroll service](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/payroll_service.py): `payroll_service.py`

### Audit and operations

- [JSONL audit](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/sijil_audit_service.py): `sijil_audit_service.py`
- [Agent events](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/agent_events_service.py): `agent_events_service.py`
- [Event JSONL](https://github.com/7cc8/odoo-hr-agents/blob/phase-1-5/agents/agent_events_service.py): `agents/agent_events_service.py`

### Other components

- **HR reviewer**
- **Employee workbook**
- **Odoo HR**

## Connections

- HR reviewer → Employee workbook: provides (evidence: `README.md`)
- Employee workbook → Excel parser: uploads (evidence: `README.md`)
- Excel parser → Data normalization: normalizes (evidence: `parser.py`)
- Excel parser → Validation and matching: passes rows (evidence: `README.md`)
- Validation and matching → Odoo read repository: matches against (evidence: `README.md`)
- Validation and matching → Dry-run reports: reports results (evidence: `README.md`)
- HR reviewer → Approval creation: selects accepted rows (evidence: `README.md`)
- Dry-run reports → Approval creation: binds approval (evidence: `README.md`)
- Approval creation → Approval verification: creates approval (evidence: `README.md`)
- Approval verification → Restricted writer: authorizes rows (evidence: `README.md`)
- Restricted writer → Environment guard: checks environment (evidence: `README.md`)
- Restricted writer → Create/read gateway: creates and reads (evidence: `README.md`)
- Create/read gateway → Odoo HR: mutates and reads (evidence: `README.md`)
- Restricted writer → JSONL audit: records outcome (evidence: `README.md`)
- HR reviewer → Unified web service: chats or uploads (evidence: `README.md`)
- Unified web service → LangGraph workflow: routes workflow (evidence: `web_service.py`)
- LangGraph workflow → Workflow state: updates state (evidence: `graph/agentic_nodes.py`)
- LangGraph workflow → Seraj orchestrator: invokes agents (evidence: `graph/agentic_nodes.py`)
- Seraj orchestrator → Fahas tools agent: delegates tools (evidence: `agents/seraj_meta_agent.py`)
- Seraj orchestrator → Hares security agent: delegates security (evidence: `agents/seraj_meta_agent.py`)
- Seraj orchestrator → Katib execution agent: delegates execution (evidence: `agents/seraj_meta_agent.py`)
- Seraj orchestrator → Mudaqqiq compliance: delegates compliance (evidence: `agents/seraj_meta_agent.py`)
- Seraj orchestrator → Musleh repair agent: delegates repair (evidence: `agents/seraj_meta_agent.py`)
- Seraj orchestrator → Muwaffaq matching: delegates matching (evidence: `agents/seraj_meta_agent.py`)
- Seraj orchestrator → Sijil log agent: delegates logging (evidence: `agents/seraj_meta_agent.py`)
- LangGraph workflow → Hares security agent: checks write plan (evidence: `graph/agentic_nodes.py`)
- LangGraph workflow → Agent events: emits events (evidence: `graph/agentic_nodes.py`)
- Agent events → Event JSONL: records agent events (evidence: `agent_events_service.py`)
- Seraj orchestrator → LLM provider: uses language model
- LLM provider → LLM configuration: loads configuration (evidence: `agents/llm_provider.py`)
- Fahas tools agent → Odoo read repository: queries Odoo
- Odoo read repository → Odoo HR: reads HR data (evidence: `odoo_readonly_repository.py`)
- Mudaqqiq compliance → Saudi labor rules: checks legal rules (evidence: `agents/mudaqqiq_agent.py`)
- Unified web service → Leave service: exposes HR service (evidence: `web_service.py`)
- Unified web service → Attendance service: exposes HR service (evidence: `web_service.py`)
- Unified web service → Contract service: exposes HR service (evidence: `web_service.py`)
- Unified web service → Payroll service: exposes HR service (evidence: `web_service.py`)
