# brantansp/taf-aiagent architecture

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

- Interactive diagram: https://gitdiagram.com/brantansp/taf-aiagent
- Repository: https://github.com/brantansp/taf-aiagent

## Overview

TAF AI Agent is a small Python browser-automation project with basic and advanced agent configurations. Both define a Sauce Demo order-completion task, run it through browser-use, save the run history, and assert a successful final result. The advanced configuration additionally sets up a restricted browser session, an initial navigation action, and a separate planner model. The workflow stages come from the task prompts; the browser-use internals were not sampled.

Main entry points: [`Agent_Advanced_Configurations.py`](https://github.com/brantansp/taf-aiagent/blob/master/Agent_Advanced_Configurations.py) (Advanced configuration), [`Agent_Basic_Configurations.py`](https://github.com/brantansp/taf-aiagent/blob/master/Agent_Basic_Configurations.py) (Basic configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entrypoints["Agent configurations"]
  node_basic["Basic configuration"]
  node_advanced["Advanced configuration"]
end

subgraph group_runtime["Automation runtime"]
  node_agent["Browser-use agent"]
  node_llm["OpenAI models"]
  node_session["Restricted browser session"]
  node_history["Run history"]
  node_result["Success assertion"]
end

subgraph group_workflow["Order workflow"]
  node_login["Login"]
  node_cart["Select and review cart"]
  node_checkout["Checkout details"]
  node_order["Finish and verify"]
end

node_operator(("Automation engineer"))
node_site["Sauce Demo"]

node_operator -->|"runs"| node_basic
node_operator -->|"runs"| node_advanced
node_basic -->|"configures"| node_agent
node_advanced -->|"configures"| node_agent
node_basic -->|"selects model"| node_llm
node_advanced -->|"selects models"| node_llm
node_advanced -->|"configures"| node_session
node_agent -->|"executes task"| node_login
node_login -->|"then"| node_cart
node_cart -->|"then"| node_checkout
node_checkout -->|"then"| node_order
node_agent -->|"interacts with"| node_site
node_advanced -->|"initial navigation"| node_site
node_basic -->|"saves"| node_history
node_advanced -->|"saves"| node_history
node_basic -->|"asserts"| node_result
node_advanced -->|"asserts"| node_result

click node_basic "https://github.com/brantansp/taf-aiagent/blob/master/Agent_Basic_Configurations.py"
click node_advanced "https://github.com/brantansp/taf-aiagent/blob/master/Agent_Advanced_Configurations.py"
click node_session "https://github.com/brantansp/taf-aiagent/blob/master/Agent_Advanced_Configurations.py"
click node_login "https://github.com/brantansp/taf-aiagent/blob/master/Agent_Basic_Configurations.py"
click node_cart "https://github.com/brantansp/taf-aiagent/blob/master/Agent_Basic_Configurations.py"
click node_checkout "https://github.com/brantansp/taf-aiagent/blob/master/Agent_Basic_Configurations.py"
click node_order "https://github.com/brantansp/taf-aiagent/blob/master/Agent_Basic_Configurations.py"
click node_history "https://github.com/brantansp/taf-aiagent/blob/master/Agent_Basic_Configurations.py"
click node_result "https://github.com/brantansp/taf-aiagent/blob/master/Agent_Basic_Configurations.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_basic,node_advanced toneBlue
class node_agent,node_llm,node_session,node_history,node_result toneAmber
class node_login,node_cart,node_checkout,node_order toneMint
class node_operator,node_site toneIndigo
```

## Components

### Agent configurations

- [Basic configuration](https://github.com/brantansp/taf-aiagent/blob/master/Agent_Basic_Configurations.py): `Agent_Basic_Configurations.py`
- [Advanced configuration](https://github.com/brantansp/taf-aiagent/blob/master/Agent_Advanced_Configurations.py): `Agent_Advanced_Configurations.py`

### Automation runtime

- **Browser-use agent**
- **OpenAI models**
- [Restricted browser session](https://github.com/brantansp/taf-aiagent/blob/master/Agent_Advanced_Configurations.py): `Agent_Advanced_Configurations.py`
- [Run history](https://github.com/brantansp/taf-aiagent/blob/master/Agent_Basic_Configurations.py): `Agent_Basic_Configurations.py`
- [Success assertion](https://github.com/brantansp/taf-aiagent/blob/master/Agent_Basic_Configurations.py): `Agent_Basic_Configurations.py`

### Order workflow

- [Login](https://github.com/brantansp/taf-aiagent/blob/master/Agent_Basic_Configurations.py): `Agent_Basic_Configurations.py`
- [Select and review cart](https://github.com/brantansp/taf-aiagent/blob/master/Agent_Basic_Configurations.py): `Agent_Basic_Configurations.py`
- [Checkout details](https://github.com/brantansp/taf-aiagent/blob/master/Agent_Basic_Configurations.py): `Agent_Basic_Configurations.py`
- [Finish and verify](https://github.com/brantansp/taf-aiagent/blob/master/Agent_Basic_Configurations.py): `Agent_Basic_Configurations.py`

### Other components

- **Automation engineer**
- **Sauce Demo**

## Connections

- Automation engineer → Basic configuration: runs (evidence: `README.md`)
- Automation engineer → Advanced configuration: runs (evidence: `README.md`)
- Basic configuration → Browser-use agent: configures (evidence: `Agent_Basic_Configurations.py`)
- Advanced configuration → Browser-use agent: configures (evidence: `Agent_Advanced_Configurations.py`)
- Basic configuration → OpenAI models: selects model (evidence: `Agent_Basic_Configurations.py`)
- Advanced configuration → OpenAI models: selects models (evidence: `Agent_Advanced_Configurations.py`)
- Advanced configuration → Restricted browser session: configures (evidence: `Agent_Advanced_Configurations.py`)
- Browser-use agent → Login: executes task (evidence: `Agent_Basic_Configurations.py`)
- Login → Select and review cart: then (evidence: `Agent_Basic_Configurations.py`)
- Select and review cart → Checkout details: then (evidence: `Agent_Basic_Configurations.py`)
- Checkout details → Finish and verify: then (evidence: `Agent_Basic_Configurations.py`)
- Browser-use agent → Sauce Demo: interacts with
- Advanced configuration → Sauce Demo: initial navigation (evidence: `Agent_Advanced_Configurations.py`)
- Basic configuration → Run history: saves (evidence: `Agent_Basic_Configurations.py`)
- Advanced configuration → Run history: saves (evidence: `Agent_Advanced_Configurations.py`)
- Basic configuration → Success assertion: asserts (evidence: `Agent_Basic_Configurations.py`)
- Advanced configuration → Success assertion: asserts (evidence: `Agent_Advanced_Configurations.py`)
