# argilla-io/argilla architecture

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

- Interactive diagram: https://gitdiagram.com/argilla-io/argilla
- Repository: https://github.com/argilla-io/argilla

## Overview

Argilla is a collaborative platform for building and improving AI datasets. The main workflow is to configure a dataset, then let domain experts review and annotate records using filtering and feedback tools; teams can also manage progress and export or use datasets through the SDK. The repository includes a browser application, an API server, and both current and legacy Python clients. Some feature-level frontend and server implementations were not sampled, so their internal call paths are not asserted.

Main entry points: [`argilla-frontend/components/features/annotation/container`](https://github.com/argilla-io/argilla/tree/develop/argilla-frontend/components/features/annotation/container) (Record annotation), [`argilla-server/src/argilla_server/api/routes.py`](https://github.com/argilla-io/argilla/blob/develop/argilla-server/src/argilla_server/api/routes.py) (REST API routing), [`argilla-server/src/argilla_server/api/handlers/v1`](https://github.com/argilla-io/argilla/tree/develop/argilla-server/src/argilla_server/api/handlers/v1) (API handlers), [`argilla/src/argilla/client.py`](https://github.com/argilla-io/argilla/blob/develop/argilla/src/argilla/client.py) (Python SDK)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Browser application"]
  node_dataset_setup["Dataset setup"]
  node_dataset_home["Dataset discovery"]
  node_annotation["Record annotation"]
  node_record_fields["Record fields"]
  node_questions["Feedback questions"]
  node_filters["Search and filters"]
  node_similarity["Semantic similarity"]
  node_progress["Team progress"]
  node_dataset_settings["Dataset settings"]
  node_frontend_pages["Page coordination"]
  node_oauth["OAuth login"]
end

subgraph group_server["API server"]
  node_api_routes["REST API routing<br/>[routes.py]"]
  node_api_handlers["API handlers"]
  node_server_errors["API error handling"]
  node_database_models[("Dataset data model<br/>[database.py]")]
  node_webhook_jobs["Webhook jobs<br/>[webhook_jobs.py]"]
end

subgraph group_clients["Python clients"]
  node_new_sdk["Python SDK<br/>[client.py]"]
  node_sdk_api["SDK API resources"]
  node_sdk_webhooks["Webhook support<br/>[_webhooks.py]"]
  node_legacy_client["Legacy Python client<br/>[client.py]"]
  node_legacy_transport["Legacy HTTP transport<br/>[client.py]"]
  node_cli["Command line<br/>[app.py]"]
end

subgraph group_shared["Domain and state"]
end

node_annotator(("Domain expert"))
node_engineer(("AI engineer"))

node_engineer -->|"configures dataset"| node_dataset_setup
node_annotator -->|"labels records"| node_annotation
node_filters -->|"narrows records"| node_annotation
node_similarity -->|"finds similar"| node_annotation
node_frontend_pages -.->|"presents setup"| node_dataset_setup
node_frontend_pages -->|"presents datasets"| node_dataset_home
node_annotation -.->|"renders fields"| node_record_fields
node_annotation -.->|"collects answers"| node_questions
node_annotation -.->|"uses filters"| node_filters
node_annotation -.->|"uses similarity"| node_similarity
node_engineer -->|"uses client"| node_new_sdk
node_new_sdk -->|"accesses resources"| node_sdk_api
node_sdk_api -->|"exposes webhooks"| node_sdk_webhooks
node_new_sdk -.->|"sends API requests"| node_api_routes
node_legacy_client -->|"uses transport"| node_legacy_transport
node_legacy_client -.->|"sends API requests"| node_api_routes
node_cli -.->|"offers client commands"| node_legacy_client
node_api_routes -->|"registers routers"| node_api_handlers
node_api_routes -->|"configures errors"| node_server_errors
node_api_handlers -.->|"uses data models"| node_database_models
node_api_handlers -.->|"dispatches jobs"| node_webhook_jobs
node_annotator -.->|"signs in"| node_oauth

click node_dataset_setup "https://github.com/argilla-io/argilla/tree/develop/argilla-frontend/components/features/dataset-creation/configuration"
click node_dataset_home "https://github.com/argilla-io/argilla/tree/develop/argilla-frontend/components/features/home"
click node_annotation "https://github.com/argilla-io/argilla/tree/develop/argilla-frontend/components/features/annotation/container"
click node_record_fields "https://github.com/argilla-io/argilla/tree/develop/argilla-frontend/components/features/annotation/container/fields"
click node_questions "https://github.com/argilla-io/argilla/tree/develop/argilla-frontend/components/features/annotation/container/questions"
click node_filters "https://github.com/argilla-io/argilla/tree/develop/argilla-frontend/components/features/annotation/header"
click node_similarity "https://github.com/argilla-io/argilla/tree/develop/argilla-frontend/components/features/annotation/container/similarity"
click node_progress "https://github.com/argilla-io/argilla/tree/develop/argilla-frontend/components/features/annotation/progress"
click node_dataset_settings "https://github.com/argilla-io/argilla/tree/develop/argilla-frontend/components/features/annotation/settings"
click node_frontend_pages "https://github.com/argilla-io/argilla/tree/develop/argilla-frontend/pages"
click node_api_routes "https://github.com/argilla-io/argilla/blob/develop/argilla-server/src/argilla_server/api/routes.py"
click node_api_handlers "https://github.com/argilla-io/argilla/tree/develop/argilla-server/src/argilla_server/api/handlers/v1"
click node_server_errors "https://github.com/argilla-io/argilla/blob/develop/argilla-server/src/argilla_server/api/errors/v1/exception_handlers.py"
click node_database_models "https://github.com/argilla-io/argilla/blob/develop/argilla-server/src/argilla_server/models/database.py"
click node_new_sdk "https://github.com/argilla-io/argilla/blob/develop/argilla/src/argilla/client.py"
click node_sdk_api "https://github.com/argilla-io/argilla/tree/develop/argilla/src/argilla/_api"
click node_sdk_webhooks "https://github.com/argilla-io/argilla/blob/develop/argilla/src/argilla/_api/_webhooks.py"
click node_legacy_client "https://github.com/argilla-io/argilla/blob/develop/argilla-v1/src/argilla_v1/client/client.py"
click node_legacy_transport "https://github.com/argilla-io/argilla/blob/develop/argilla-v1/src/argilla_v1/client/sdk/client.py"
click node_cli "https://github.com/argilla-io/argilla/blob/develop/argilla-v1/src/argilla_v1/cli/app.py"
click node_webhook_jobs "https://github.com/argilla-io/argilla/blob/develop/argilla-server/src/argilla_server/jobs/webhook_jobs.py"
click node_oauth "https://github.com/argilla-io/argilla/blob/develop/argilla-frontend/pages/oauth/_provider/useOAuthViewModel.ts"

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_dataset_setup,node_dataset_home,node_annotation,node_record_fields,node_questions,node_filters,node_similarity,node_progress,node_dataset_settings,node_frontend_pages,node_oauth toneBlue
class node_api_routes,node_api_handlers,node_server_errors,node_database_models,node_webhook_jobs toneAmber
class node_new_sdk,node_sdk_api,node_sdk_webhooks,node_legacy_client,node_legacy_transport,node_cli toneMint
class node_annotator,node_engineer toneIndigo
```

## Components

### Browser application

- [Dataset setup](https://github.com/argilla-io/argilla/tree/develop/argilla-frontend/components/features/dataset-creation/configuration): `argilla-frontend/components/features/dataset-creation/configuration`
- [Dataset discovery](https://github.com/argilla-io/argilla/tree/develop/argilla-frontend/components/features/home): `argilla-frontend/components/features/home`
- [Record annotation](https://github.com/argilla-io/argilla/tree/develop/argilla-frontend/components/features/annotation/container): `argilla-frontend/components/features/annotation/container`
- [Record fields](https://github.com/argilla-io/argilla/tree/develop/argilla-frontend/components/features/annotation/container/fields): `argilla-frontend/components/features/annotation/container/fields`
- [Feedback questions](https://github.com/argilla-io/argilla/tree/develop/argilla-frontend/components/features/annotation/container/questions): `argilla-frontend/components/features/annotation/container/questions`
- [Search and filters](https://github.com/argilla-io/argilla/tree/develop/argilla-frontend/components/features/annotation/header): `argilla-frontend/components/features/annotation/header`
- [Semantic similarity](https://github.com/argilla-io/argilla/tree/develop/argilla-frontend/components/features/annotation/container/similarity): `argilla-frontend/components/features/annotation/container/similarity`
- [Team progress](https://github.com/argilla-io/argilla/tree/develop/argilla-frontend/components/features/annotation/progress): `argilla-frontend/components/features/annotation/progress`
- [Dataset settings](https://github.com/argilla-io/argilla/tree/develop/argilla-frontend/components/features/annotation/settings): `argilla-frontend/components/features/annotation/settings`
- [Page coordination](https://github.com/argilla-io/argilla/tree/develop/argilla-frontend/pages): `argilla-frontend/pages`
- [OAuth login](https://github.com/argilla-io/argilla/blob/develop/argilla-frontend/pages/oauth/_provider/useOAuthViewModel.ts): `argilla-frontend/pages/oauth/_provider/useOAuthViewModel.ts`

### API server

- [REST API routing](https://github.com/argilla-io/argilla/blob/develop/argilla-server/src/argilla_server/api/routes.py): `argilla-server/src/argilla_server/api/routes.py`
- [API handlers](https://github.com/argilla-io/argilla/tree/develop/argilla-server/src/argilla_server/api/handlers/v1): `argilla-server/src/argilla_server/api/handlers/v1`
- [API error handling](https://github.com/argilla-io/argilla/blob/develop/argilla-server/src/argilla_server/api/errors/v1/exception_handlers.py): `argilla-server/src/argilla_server/api/errors/v1/exception_handlers.py`
- [Dataset data model](https://github.com/argilla-io/argilla/blob/develop/argilla-server/src/argilla_server/models/database.py): `argilla-server/src/argilla_server/models/database.py`
- [Webhook jobs](https://github.com/argilla-io/argilla/blob/develop/argilla-server/src/argilla_server/jobs/webhook_jobs.py): `argilla-server/src/argilla_server/jobs/webhook_jobs.py`

### Python clients

- [Python SDK](https://github.com/argilla-io/argilla/blob/develop/argilla/src/argilla/client.py): `argilla/src/argilla/client.py`
- [SDK API resources](https://github.com/argilla-io/argilla/tree/develop/argilla/src/argilla/_api): `argilla/src/argilla/_api`
- [Webhook support](https://github.com/argilla-io/argilla/blob/develop/argilla/src/argilla/_api/_webhooks.py): `argilla/src/argilla/_api/_webhooks.py`
- [Legacy Python client](https://github.com/argilla-io/argilla/blob/develop/argilla-v1/src/argilla_v1/client/client.py): `argilla-v1/src/argilla_v1/client/client.py`
- [Legacy HTTP transport](https://github.com/argilla-io/argilla/blob/develop/argilla-v1/src/argilla_v1/client/sdk/client.py): `argilla-v1/src/argilla_v1/client/sdk/client.py`
- [Command line](https://github.com/argilla-io/argilla/blob/develop/argilla-v1/src/argilla_v1/cli/app.py): `argilla-v1/src/argilla_v1/cli/app.py`

### Other components

- **Domain expert**
- **AI engineer**

## Connections

- AI engineer → Dataset setup: configures dataset
- Domain expert → Record annotation: labels records
- Search and filters → Record annotation: narrows records
- Semantic similarity → Record annotation: finds similar
- Page coordination → Dataset setup: presents setup
- Page coordination → Dataset discovery: presents datasets (evidence: `argilla-frontend/pages/index.vue`)
- Record annotation → Record fields: renders fields
- Record annotation → Feedback questions: collects answers
- Record annotation → Search and filters: uses filters
- Record annotation → Semantic similarity: uses similarity
- AI engineer → Python SDK: uses client
- Python SDK → SDK API resources: accesses resources (evidence: `argilla/src/argilla/client.py`)
- SDK API resources → Webhook support: exposes webhooks (evidence: `argilla/src/argilla/_api/_client.py`)
- Python SDK → REST API routing: sends API requests
- Legacy Python client → Legacy HTTP transport: uses transport (evidence: `argilla-v1/src/argilla_v1/client/client.py`)
- Legacy Python client → REST API routing: sends API requests
- Command line → Legacy Python client: offers client commands
- REST API routing → API handlers: registers routers (evidence: `argilla-server/src/argilla_server/api/routes.py`)
- REST API routing → API error handling: configures errors (evidence: `argilla-server/src/argilla_server/api/routes.py`)
- API handlers → Dataset data model: uses data models
- API handlers → Webhook jobs: dispatches jobs
- Domain expert → OAuth login: signs in
