# hanish9193/agentic-ai-automation-handoff architecture

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

- Interactive diagram: https://gitdiagram.com/hanish9193/agentic-ai-automation-handoff
- Repository: https://github.com/hanish9193/agentic-ai-automation-handoff

## Overview

This is an AI test-automation platform: users create projects and ingest requirements, generate and review scenarios and test cases, then generate Playwright scripts, execute tests, analyze failures, and review reports. FastAPI serves the browser UI and API; a LangGraph workflow routes shared state through specialized agents, while services handle execution, persistence, security, and integrations. The README documents major capabilities beyond the sampled code; edges for those are documented relationships, not claims that unsampled implementations were inspected.

Main entry points: [`backend/graph/workflow.py`](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/graph/workflow.py) (LangGraph workflow), [`backend/main.py`](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/main.py) (REST API), [`backend/repository/project_repository.py`](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/repository/project_repository.py) (Project repository), [`backend/services/batch_queue_manager.py`](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/services/batch_queue_manager.py) (Batch execution)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_product["User product"]
  node_frontend["Web dashboard<br/>[app.js]"]
  node_api["REST API<br/>[main.py]"]
  node_project["Project workspace<br/>[project_service.py]"]
  node_reports["Reports and metrics<br/>[report_service.py]"]
end

subgraph group_workflow["AI workflow"]
  node_requirements["Requirements<br/>[requirement.py]"]
  node_workflow_service["Workflow service"]
  node_graph["LangGraph workflow<br/>[workflow.py]"]
  node_scenario["Scenario generation<br/>[scenario_agent.py]"]
  node_testcase["Test case generation"]
  node_evaluation["Quality evaluation"]
  node_approval["Human review"]
  node_script["Script generation"]
  node_state["Workflow state<br/>[state.py]"]
end

subgraph group_execution["Test execution"]
  node_batch["Batch execution"]
  node_runner["Playwright runner"]
  node_runner_api["Runner API<br/>[route.ts]"]
  node_engine["Execution engine"]
  node_analysis["Failure analysis"]
end

subgraph group_platform["Platform services"]
  node_repository["Project repository"]
  node_postgres["PostgreSQL repository"]
  node_json_store[("JSON store")]
  node_auth["Authentication<br/>[auth_service.py]"]
end

subgraph group_integrations["Integrations"]
  node_jira["JIRA integration<br/>[jira_service.py]"]
  node_rag["RAG knowledge base<br/>[rag_service.py]"]
  node_llm["LLM providers<br/>[llm.py]"]
end

node_user(("QA user"))
node_browser(("Target application"))

node_user -->|"uses"| node_frontend
node_frontend -->|"HTTP requests"| node_api
node_api -->|"manages projects"| node_project
node_api -->|"starts workflows"| node_workflow_service
node_api -->|"authenticates"| node_auth
node_api -->|"serves metrics"| node_reports
node_api -.->|"stores records"| node_repository
node_project -.->|"persists projects"| node_repository
node_repository -->|"reads and writes"| node_json_store
node_repository -.->|"selects provider"| node_postgres
node_workflow_service -.->|"invokes workflow"| node_graph
node_graph -->|"routes state"| node_state
node_graph -->|"dispatches"| node_scenario
node_graph -->|"dispatches"| node_testcase
node_graph -->|"dispatches"| node_evaluation
node_graph -->|"dispatches"| node_approval
node_graph -->|"dispatches"| node_script
node_requirements -->|"starts pipeline"| node_graph
node_graph -->|"generates scenarios"| node_scenario
node_graph -->|"creates test cases"| node_testcase
node_graph -->|"scores quality"| node_evaluation
node_graph -->|"requests review"| node_approval
node_graph -->|"generates scripts"| node_script
node_script -.->|"queues approved tests"| node_batch
node_batch -->|"runs scripts"| node_runner
node_runner -.->|"delegates execution"| node_runner_api
node_runner_api -.->|"starts execution"| node_engine
node_engine -.->|"drives browser"| node_browser
node_batch -->|"loads test scripts"| node_repository
node_graph -->|"analyzes failures"| node_analysis
node_graph -->|"produces results"| node_reports
node_graph -->|"syncs issues"| node_jira
node_graph -.->|"requests completions"| node_llm
node_graph -.->|"retrieves context"| node_rag

click node_frontend "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/frontend/js/app.js"
click node_api "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/main.py"
click node_project "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/services/project_service.py"
click node_requirements "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/models/requirement.py"
click node_workflow_service "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/services/workflow_service.py"
click node_graph "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/graph/workflow.py"
click node_scenario "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/agents/scenario_agent.py"
click node_testcase "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/agents/supervisor_agent.py"
click node_evaluation "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/agents/evaluation_agent.py"
click node_approval "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/agents/human_approval_agent.py"
click node_script "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/agents/playwright_agent.py"
click node_state "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/models/state.py"
click node_batch "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/services/batch_queue_manager.py"
click node_runner "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/services/playwright_runner.py"
click node_runner_api "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/playwrightt/app/api/execute/route.ts"
click node_engine "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/playwrightt/lib/execution-engine.ts"
click node_analysis "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/agents/execution_analysis_agent.py"
click node_reports "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/services/report_service.py"
click node_repository "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/repository/project_repository.py"
click node_postgres "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/repository/postgres_project_repository.py"
click node_json_store "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/repository/project_repository.py"
click node_auth "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/services/auth_service.py"
click node_jira "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/services/jira_service.py"
click node_rag "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/services/rag_service.py"
click node_llm "https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/services/llm.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_frontend,node_api,node_project,node_reports,node_user toneBlue
class node_requirements,node_workflow_service,node_graph,node_scenario,node_testcase,node_evaluation,node_approval,node_script,node_state toneAmber
class node_batch,node_runner,node_runner_api,node_engine,node_analysis toneMint
class node_repository,node_postgres,node_json_store,node_auth toneRose
class node_jira,node_rag,node_llm,node_browser toneIndigo
```

## Components

### User product

- [Web dashboard](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/frontend/js/app.js): `frontend/js/app.js`
- [REST API](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/main.py): `backend/main.py`
- [Project workspace](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/services/project_service.py): `backend/services/project_service.py`
- [Reports and metrics](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/services/report_service.py): `backend/services/report_service.py`

### AI workflow

- [Requirements](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/models/requirement.py): `backend/models/requirement.py`
- [Workflow service](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/services/workflow_service.py): `backend/services/workflow_service.py`
- [LangGraph workflow](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/graph/workflow.py): `backend/graph/workflow.py`
- [Scenario generation](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/agents/scenario_agent.py): `backend/agents/scenario_agent.py`
- [Test case generation](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/agents/supervisor_agent.py): `backend/agents/supervisor_agent.py`
- [Quality evaluation](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/agents/evaluation_agent.py): `backend/agents/evaluation_agent.py`
- [Human review](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/agents/human_approval_agent.py): `backend/agents/human_approval_agent.py`
- [Script generation](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/agents/playwright_agent.py): `backend/agents/playwright_agent.py`
- [Workflow state](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/models/state.py): `backend/models/state.py`

### Test execution

- [Batch execution](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/services/batch_queue_manager.py): `backend/services/batch_queue_manager.py`
- [Playwright runner](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/services/playwright_runner.py): `backend/services/playwright_runner.py`
- [Runner API](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/playwrightt/app/api/execute/route.ts): `backend/playwrightt/app/api/execute/route.ts`
- [Execution engine](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/playwrightt/lib/execution-engine.ts): `backend/playwrightt/lib/execution-engine.ts`
- [Failure analysis](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/agents/execution_analysis_agent.py): `backend/agents/execution_analysis_agent.py`

### Platform services

- [Project repository](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/repository/project_repository.py): `backend/repository/project_repository.py`
- [PostgreSQL repository](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/repository/postgres_project_repository.py): `backend/repository/postgres_project_repository.py`
- [JSON store](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/repository/project_repository.py): `backend/repository/project_repository.py`
- [Authentication](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/services/auth_service.py): `backend/services/auth_service.py`

### Integrations

- [JIRA integration](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/services/jira_service.py): `backend/services/jira_service.py`
- [RAG knowledge base](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/services/rag_service.py): `backend/services/rag_service.py`
- [LLM providers](https://github.com/hanish9193/agentic-ai-automation-handoff/blob/main/backend/services/llm.py): `backend/services/llm.py`

### Other components

- **QA user**
- **Target application**

## Connections

- QA user → Web dashboard: uses (evidence: `README.md`)
- Web dashboard → REST API: HTTP requests (evidence: `README.md`)
- REST API → Project workspace: manages projects (evidence: `backend/main.py`)
- REST API → Workflow service: starts workflows (evidence: `backend/main.py`)
- REST API → Authentication: authenticates (evidence: `backend/main.py`)
- REST API → Reports and metrics: serves metrics (evidence: `backend/main.py`)
- REST API → Project repository: stores records (evidence: `backend/main.py`)
- Project workspace → Project repository: persists projects
- Project repository → JSON store: reads and writes (evidence: `backend/repository/project_repository.py`)
- Project repository → PostgreSQL repository: selects provider (evidence: `backend/repository/project_repository.py`)
- Workflow service → LangGraph workflow: invokes workflow
- LangGraph workflow → Workflow state: routes state (evidence: `backend/graph/workflow.py`)
- LangGraph workflow → Scenario generation: dispatches (evidence: `backend/graph/workflow.py`)
- LangGraph workflow → Test case generation: dispatches (evidence: `backend/graph/workflow.py`)
- LangGraph workflow → Quality evaluation: dispatches (evidence: `backend/graph/workflow.py`)
- LangGraph workflow → Human review: dispatches (evidence: `backend/graph/workflow.py`)
- LangGraph workflow → Script generation: dispatches (evidence: `backend/graph/workflow.py`)
- Requirements → LangGraph workflow: starts pipeline (evidence: `README.md`)
- LangGraph workflow → Scenario generation: generates scenarios (evidence: `README.md`)
- LangGraph workflow → Test case generation: creates test cases (evidence: `README.md`)
- LangGraph workflow → Quality evaluation: scores quality (evidence: `README.md`)
- LangGraph workflow → Human review: requests review (evidence: `README.md`)
- LangGraph workflow → Script generation: generates scripts (evidence: `README.md`)
- Script generation → Batch execution: queues approved tests
- Batch execution → Playwright runner: runs scripts (evidence: `backend/services/batch_queue_manager.py`)
- Playwright runner → Runner API: delegates execution
- Runner API → Execution engine: starts execution
- Execution engine → Target application: drives browser
- Batch execution → Project repository: loads test scripts (evidence: `backend/services/batch_queue_manager.py`)
- LangGraph workflow → Failure analysis: analyzes failures (evidence: `README.md`)
- LangGraph workflow → Reports and metrics: produces results (evidence: `README.md`)
- LangGraph workflow → JIRA integration: syncs issues (evidence: `README.md`)
- LangGraph workflow → LLM providers: requests completions
- LangGraph workflow → RAG knowledge base: retrieves context (evidence: `README.md`)
