█

AI/TLDR

Buy me a coffee
Buy me a coffee

Adala

An open-source Python framework from HumanSignal for autonomous data-labeling agents that learn their instructions from a ground-truth dataset, then label new data with an LLM

Labeling & AnnotationOpen source
Language
Python
License
Apache-2.0
$pip install adala
IN SHORT

What is Adala?

Adala — short for Autonomous DAta (Labeling) Agent — is an open-source Python framework from HumanSignal, the team behind Label Studio, for building agents that process and label data. It sits in the Labeling & Annotation category of the Data & Labeling tools and is open-source, written in Python and licensed Apache-2.0.

Overview

Adala — short for Autonomous DAta (Labeling) Agent — is an open-source Python framework from HumanSignal, the team behind Label Studio, for building agents that process and label data. Instead of hand-tuning a prompt until an LLM classifies your rows correctly, you give an Adala agent a small ground-truth dataset and a first-draft instruction, and the agent iterates on that instruction itself: it predicts, checks its predictions against the ground truth, analyses the errors, and refines the instruction before trying again.

Diagram titled Training Agent Skill: an environment table of texts with ground-truth labels feeds an Adala agent whose classification skill loops through instructions, predictions, validation against ground truth, error analysis and instruction refinement, backed by a runtime and a long-term memory.
How an Adala agent learns a skill: predictions are checked against the environment's ground truth, errors are analysed, and the instructions are refined for the next pass.Adala README ↗

The framework is built from a few named pieces. An environment supplies the data and the feedback — in the simplest case a `StaticEnvironment` wrapping a pandas DataFrame of labelled examples. Skills describe the task: `ClassificationSkill`, summarization, question answering, translation, text generation and ontology creation are among the ready-made ones, each with an instruction plus input and output templates. Runtimes are the LLMs that execute a skill; the README calls a runtime "synonymous with LLM". An agent ties these together, with separate teacher runtimes used during learning so a stronger model can improve the prompts a cheaper model then runs.

In practice the loop is two calls. `agent.learn(learning_iterations=3, accuracy_threshold=0.95)` runs the self-improvement cycle until the accuracy target or the iteration cap is reached, and `agent.run(test_df)` applies the learned skill to unlabelled rows and returns a DataFrame of predictions. Skills can also be chained into skill sets for multi-step processing, and the README shows swapping the OpenAI runtime for any OpenAI-compatible endpoint such as OpenRouter to run Claude, Gemini or other models.

What it does

  • Self-improving skills: `agent.learn()` predicts on a ground-truth set, validates against it, analyses the errors and refines the skill's instructions over a set number of iterations or until an accuracy threshold is met
  • Ready-made skills for classification (with or without chain-of-thought), summarization, question answering, translation, text generation and ontology creation, each defined by instructions plus input and output templates
  • Controllable output — labels, templates and constraints are configured per skill, so results stay inside the categories you define
  • Pluggable runtimes: `OpenAIChatRuntime` out of the box, any OpenAI-compatible endpoint via `base_url`, and separate teacher runtimes for the learning phase
  • Skill sets that pass one skill's output to the next for tasks that need several processing steps
  • Works natively with pandas DataFrames in notebooks and scripts, with Colab-ready example notebooks for each skill

Getting started

Adala runs as a Python library, typically inside a notebook. The README's quickstart trains a sentiment classifier from six labelled examples and then labels three new sentences. It uses OpenAI by default; the last step shows the OpenRouter variant for other models.

Install the package

The README recommends installing from GitHub to pick up frequent updates; a Poetry-based developer install is also documented.

bashbash
pip install adala
# or, for the development version
pip install git+https://github.com/HumanSignal/Adala.git

Set your API key

bashbash
export OPENAI_API_KEY='your-openai-api-key'

Define an agent with an environment, a skill and runtimes

The environment wraps a labelled DataFrame (columns `text` and `sentiment` in the README example); the skill declares the labels and templates.

pythonpython
from adala.agents import Agent
from adala.environments import StaticEnvironment
from adala.skills import ClassificationSkill
from adala.runtimes import OpenAIChatRuntime

agent = Agent(
    environment=StaticEnvironment(df=train_df),
    skills=ClassificationSkill(
        name='sentiment',
        instructions="Label text as positive, negative or neutral.",
        labels=["Positive", "Negative", "Neutral"],
        input_template="Text: {text}",
        output_template="Sentiment: {sentiment}"
    ),
    runtimes={'openai': OpenAIChatRuntime(model='gpt-4o')},
    teacher_runtimes={'default': OpenAIChatRuntime(model='gpt-4o')},
    default_runtime='openai',
)

Learn, then label new data

`learn` refines the skill against the ground truth; `run` applies it to unlabelled rows and returns the predictions.

pythonpython
agent.learn(learning_iterations=3, accuracy_threshold=0.95)
predictions = agent.run(test_df)
print(predictions)
Diagram titled Executing Agent's Skill: an input DataFrame of texts flows through an Adala agent with classification, summarization and data generation skills, connected to an environment and to runtime and memory infrastructure, producing an output table of classification results with per-label scores.
Once a skill is learned, the agent runs it over new rows and returns structured output — here a label plus per-class scores for every text.Adala README ↗

Use another model through an OpenAI-compatible endpoint

Set `OPENROUTER_API_KEY` and point the runtime at OpenRouter to use Claude, Gemini or other models; use the same kind of runtime under `teacher_runtimes`.

pythonpython
import os

runtimes = {
    'openrouter': OpenAIChatRuntime(
        base_url="https://openrouter.ai/api/v1",
        model="anthropic/claude-3.5-haiku",
        api_key=os.getenv("OPENROUTER_API_KEY"),
        provider="Custom"
    ),
}

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Reach for it when you have a few hundred labelled rows and want an LLM to label the rest without hand-tuning the prompt yourself
  • Reach for it when a classification or summarization prompt needs to be measured against ground truth rather than judged by eye
  • Reach for it when you want a stronger teacher model to improve instructions that a cheaper model then runs across a large DataFrame
  • Reach for it when a data-processing task spans several steps that can be expressed as a chain of skills

How Adala compares

Adala alongside other open-source labeling & annotation tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Label Studio★ 28.8kA flexible open-source labeling platform for images, text, audio, video, and time series with AI-assisted labeling.
CVAT★ 17.2kA computer-vision annotation tool for labeling images and video with bounding boxes, segmentation, and tracking.
Labelme★ 16.3kA desktop image annotation tool in Python and Qt, with polygon/box/mask primitives, VOC and COCO export, and AI-assisted labeling via SAM and YOLO-World.
FiftyOne★ 11.4kAn open-source Python tool and app for visual AI: explore image, video and 3D datasets, annotate labels natively, browse embeddings, and find the samples where a model fails.
X-AnyLabeling★ 11.1kA cross-platform desktop app for AI-assisted annotation of images, video, text, point clouds and multimodal data, with multi-format export.
doccano★ 10.8kAn open-source text annotation tool for classification, sequence labeling, and sequence-to-sequence tasks.
Snorkel AI★ 6kProgrammatic data development and expert data platform (Snorkel Flow) for labeling, synthetic data, and evaluation/RLHF datasets for frontier and enterprise AI models.
Adala★ 1.7kAn open-source Python framework from HumanSignal for autonomous data-labeling agents that learn their instructions from a ground-truth dataset, then label new data with an LLM