# microsoft/fara architecture

> Architecture diagram of the GitHub repository microsoft/fara, 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/microsoft/fara
- Repository: https://github.com/microsoft/fara

## Overview

Fara is a visual computer-use agent: a user task enters through the CLI, the agent consults a model, acts on a browser, and records the run. The repository also includes WebEval, a separate evaluation and trajectory-verification package; the README identifies WebTailBench and the Universal Verifier as major capabilities. Some runtime modules are not sampled, so the graph omits uncertain implementation-level links and uses the README for documented workflows.

Main entry points: [`src/fara/run_fara.py`](https://github.com/microsoft/fara/blob/main/src/fara/run_fara.py) (Fara CLI), [`src/fara/agents/fara/fara15_agent.py`](https://github.com/microsoft/fara/blob/main/src/fara/agents/fara/fara15_agent.py) (Fara 1.5 agent), [`src/fara/core/run_context.py`](https://github.com/microsoft/fara/blob/main/src/fara/core/run_context.py) (Run context), [`webeval/src/webeval/systems/websurfer.py`](https://github.com/microsoft/fara/blob/main/webeval/src/webeval/systems/websurfer.py) (Web surfer system)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_agent_runtime["Agent runtime"]
  node_cli["Fara CLI<br/>[run_fara.py]"]
  node_fara15["Fara 1.5 agent<br/>[fara15_agent.py]"]
  node_fara7b["Fara 7B agent<br/>[fara_agent.py]"]
  node_prompts["Action prompts<br/>[_prompts.py]"]
  node_model_client["Model client<br/>[wrapper.py]"]
end

subgraph group_browser["Browser interaction"]
  node_environment["Browser environment<br/>[environment.py]"]
  node_controller["Playwright controller"]
  node_legacy_controller["7B browser controller"]
end

subgraph group_run_data["Run data"]
  node_context["Run context<br/>[run_context.py]"]
  node_datapoint["Trajectory data<br/>[data_point.py]"]
end

subgraph group_evaluation["Evaluation and verification"]
  node_eval_core["Evaluation core<br/>[core.py]"]
  node_eval_system["System interface<br/>[basesystem.py]"]
  node_websurfer["Web surfer system<br/>[websurfer.py]"]
  node_trajectory["Trajectory format<br/>[trajectory.py]"]
  node_verify_cli["Trajectory verifier CLI"]
  node_rubric_agent["Universal Verifier<br/>[mm_rubric_agent.py]"]
  node_eval_client["Evaluation LLM client<br/>[graceful_client.py]"]
end

node_user(("Task user"))
node_model_service["Model endpoint"]
node_benchmark_tasks[("WebTailBench tasks")]

node_user -->|"submits task"| node_cli
node_cli -->|"initializes browser"| node_environment
node_cli -->|"runs agent"| node_fara15
node_cli -->|"selects agent"| node_fara7b
node_cli -->|"creates run"| node_context
node_fara15 -->|"uses prompts"| node_prompts
node_fara15 -->|"requests completion"| node_model_client
node_model_client -.->|"calls endpoint"| node_model_service
node_fara15 -->|"logs actions"| node_context
node_context -->|"writes events"| node_datapoint
node_fara15 -.->|"acts through browser"| node_environment
node_fara7b -->|"uses controller"| node_legacy_controller
node_eval_core -->|"uses interface"| node_eval_system
node_websurfer -->|"implements interface"| node_eval_system
node_websurfer -->|"records trajectory"| node_trajectory
node_verify_cli -->|"runs verifier"| node_rubric_agent
node_rubric_agent -->|"requests judgments"| node_eval_client
node_benchmark_tasks -.->|"supplies tasks"| node_verify_cli

click node_cli "https://github.com/microsoft/fara/blob/main/src/fara/run_fara.py"
click node_fara15 "https://github.com/microsoft/fara/blob/main/src/fara/agents/fara/fara15_agent.py"
click node_fara7b "https://github.com/microsoft/fara/blob/main/src/fara/fara_7b/fara_agent.py"
click node_prompts "https://github.com/microsoft/fara/blob/main/src/fara/agents/fara/_prompts.py"
click node_model_client "https://github.com/microsoft/fara/blob/main/src/fara/clients/wrapper.py"
click node_environment "https://github.com/microsoft/fara/blob/main/src/fara/environments/playwright/environment.py"
click node_controller "https://github.com/microsoft/fara/blob/main/src/fara/environments/playwright/playwright_controller.py"
click node_legacy_controller "https://github.com/microsoft/fara/blob/main/src/fara/fara_7b/browser/playwright_controller.py"
click node_context "https://github.com/microsoft/fara/blob/main/src/fara/core/run_context.py"
click node_datapoint "https://github.com/microsoft/fara/blob/main/src/fara/core/data_point.py"
click node_eval_core "https://github.com/microsoft/fara/blob/main/webeval/src/webeval/core.py"
click node_eval_system "https://github.com/microsoft/fara/blob/main/webeval/src/webeval/basesystem.py"
click node_websurfer "https://github.com/microsoft/fara/blob/main/webeval/src/webeval/systems/websurfer.py"
click node_trajectory "https://github.com/microsoft/fara/blob/main/webeval/src/webeval/trajectory.py"
click node_verify_cli "https://github.com/microsoft/fara/blob/main/webeval/scripts/verify_trajectories.py"
click node_rubric_agent "https://github.com/microsoft/fara/blob/main/webeval/src/webeval/rubric_agent/mm_rubric_agent.py"
click node_eval_client "https://github.com/microsoft/fara/blob/main/webeval/src/webeval/oai_clients/graceful_client.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_cli,node_fara15,node_fara7b,node_prompts,node_model_client toneBlue
class node_environment,node_controller,node_legacy_controller,node_benchmark_tasks toneAmber
class node_context,node_datapoint toneMint
class node_eval_core,node_eval_system,node_websurfer,node_trajectory,node_verify_cli,node_rubric_agent,node_eval_client,node_user toneRose
class node_model_service toneIndigo
```

## Components

### Agent runtime

- [Fara CLI](https://github.com/microsoft/fara/blob/main/src/fara/run_fara.py): `src/fara/run_fara.py`
- [Fara 1.5 agent](https://github.com/microsoft/fara/blob/main/src/fara/agents/fara/fara15_agent.py): `src/fara/agents/fara/fara15_agent.py`
- [Fara 7B agent](https://github.com/microsoft/fara/blob/main/src/fara/fara_7b/fara_agent.py): `src/fara/fara_7b/fara_agent.py`
- [Action prompts](https://github.com/microsoft/fara/blob/main/src/fara/agents/fara/_prompts.py): `src/fara/agents/fara/_prompts.py`
- [Model client](https://github.com/microsoft/fara/blob/main/src/fara/clients/wrapper.py): `src/fara/clients/wrapper.py`

### Browser interaction

- [Browser environment](https://github.com/microsoft/fara/blob/main/src/fara/environments/playwright/environment.py): `src/fara/environments/playwright/environment.py`
- [Playwright controller](https://github.com/microsoft/fara/blob/main/src/fara/environments/playwright/playwright_controller.py): `src/fara/environments/playwright/playwright_controller.py`
- [7B browser controller](https://github.com/microsoft/fara/blob/main/src/fara/fara_7b/browser/playwright_controller.py): `src/fara/fara_7b/browser/playwright_controller.py`

### Run data

- [Run context](https://github.com/microsoft/fara/blob/main/src/fara/core/run_context.py): `src/fara/core/run_context.py`
- [Trajectory data](https://github.com/microsoft/fara/blob/main/src/fara/core/data_point.py): `src/fara/core/data_point.py`

### Evaluation and verification

- [Evaluation core](https://github.com/microsoft/fara/blob/main/webeval/src/webeval/core.py): `webeval/src/webeval/core.py`
- [System interface](https://github.com/microsoft/fara/blob/main/webeval/src/webeval/basesystem.py): `webeval/src/webeval/basesystem.py`
- [Web surfer system](https://github.com/microsoft/fara/blob/main/webeval/src/webeval/systems/websurfer.py): `webeval/src/webeval/systems/websurfer.py`
- [Trajectory format](https://github.com/microsoft/fara/blob/main/webeval/src/webeval/trajectory.py): `webeval/src/webeval/trajectory.py`
- [Trajectory verifier CLI](https://github.com/microsoft/fara/blob/main/webeval/scripts/verify_trajectories.py): `webeval/scripts/verify_trajectories.py`
- [Universal Verifier](https://github.com/microsoft/fara/blob/main/webeval/src/webeval/rubric_agent/mm_rubric_agent.py): `webeval/src/webeval/rubric_agent/mm_rubric_agent.py`
- [Evaluation LLM client](https://github.com/microsoft/fara/blob/main/webeval/src/webeval/oai_clients/graceful_client.py): `webeval/src/webeval/oai_clients/graceful_client.py`

### Other components

- **Task user**
- **Model endpoint**
- **WebTailBench tasks**

## Connections

- Task user → Fara CLI: submits task (evidence: `README.md`)
- Fara CLI → Browser environment: initializes browser (evidence: `src/fara/run_fara.py`)
- Fara CLI → Fara 1.5 agent: runs agent (evidence: `src/fara/run_fara.py`)
- Fara CLI → Fara 7B agent: selects agent (evidence: `src/fara/run_fara.py`)
- Fara CLI → Run context: creates run (evidence: `src/fara/run_fara.py`)
- Fara 1.5 agent → Action prompts: uses prompts (evidence: `src/fara/agents/fara/fara15_agent.py`)
- Fara 1.5 agent → Model client: requests completion (evidence: `src/fara/agents/fara/fara15_agent.py`)
- Model client → Model endpoint: calls endpoint (evidence: `README.md`)
- Fara 1.5 agent → Run context: logs actions (evidence: `src/fara/agents/fara/fara15_agent.py`)
- Run context → Trajectory data: writes events (evidence: `src/fara/core/run_context.py`)
- Fara 1.5 agent → Browser environment: acts through browser
- Fara 7B agent → 7B browser controller: uses controller (evidence: `src/fara/fara_7b/fara_agent.py`)
- Evaluation core → System interface: uses interface (evidence: `webeval/src/webeval/core.py`)
- Web surfer system → System interface: implements interface (evidence: `webeval/src/webeval/systems/websurfer.py`)
- Web surfer system → Trajectory format: records trajectory (evidence: `webeval/src/webeval/systems/websurfer.py`)
- Trajectory verifier CLI → Universal Verifier: runs verifier (evidence: `webeval/scripts/verify_trajectories.py`)
- Universal Verifier → Evaluation LLM client: requests judgments (evidence: `webeval/src/webeval/rubric_agent/mm_rubric_agent.py`)
- WebTailBench tasks → Trajectory verifier CLI: supplies tasks (evidence: `README.md`)
