랭킹으로 돌아가기

HumanSignal/Adala

Pythonhumansignal.github.io/Adala/

Adala: Autonomous DAta (Labeling) Agent framework

agentagent-based-frameworkagent-oriented-programmingautonomous-agentsgpt-4
스타 성장
스타
1.6k
포크
156
주간 성장
이슈
9
5001k1.5k
2023년 10월2024년 9월2025년 8월2026년 7월
아티팩트PyPIpip install adala
README

PyPI version Python Version GitHub GitHub Repo stars

Shows Adala logo in light mode and dark mode.

Adala is an Autonomous DAta (Labeling) Agent framework.

Adala offers a robust framework for implementing agents specialized in data processing, with an emphasis on diverse data labeling tasks. These agents are autonomous, meaning they can independently acquire one or more skills through iterative learning. This learning process is influenced by their operating environment, observations, and reflections. Users define the environment by providing a ground truth dataset. Every agent learns and applies its skills in what we refer to as a "runtime", synonymous with LLM.

Training Agent Skill

📢 Why choose Adala?

  • 🌟 Reliable agents: Agents are built upon a foundation of ground truth data. This ensures consistent and trustworthy results, making Adala a reliable choice for your data processing needs.

  • 🎮 Controllable output: For every skill, you can configure the desired output and set specific constraints with varying degrees of flexibility. Whether you want strict adherence to particular guidelines or more adaptive outputs based on the agent's learning, Adala allows you to tailor results to your exact needs.

  • 🎯 Specialized in data processing: While agents excel in diverse data labeling tasks, they can be customized for a wide range of data processing needs.

  • 🧠 Autonomous learning: Adala agents aren't just automated; they're intelligent. They iteratively and independently develop skills based on environment, observations, and reflections.

  • Flexible and extensible runtime: Adala's runtime environment is adaptable. A single skill can be deployed across multiple runtimes, facilitating dynamic scenarios like the student/teacher architecture. Moreover, the openness of framework invites the community to extend and tailor runtimes, ensuring continuous evolution and adaptability to diverse needs.

  • 🚀 Easily customizable: Quickly customize and develop agents to address challenges specific to your needs, without facing a steep learning curve.

🫵 Who is Adala for?

Adala is a versatile framework designed for individuals and professionals in the field of AI and machine learning. Here's who can benefit:

  • 🧡 AI engineers: Architect and design AI agent systems with modular, interconnected skills. Build production-level agent systems, abstracting low-level ML to Adala and LLMs.
  • 💻 Machine learning researchers: Experiment with complex problem decomposition and causal reasoning.
  • 📈 Data scientists: Apply agents to preprocess and postprocess your data. Interact with Adala natively through Python notebooks when working with large Dataframes.
  • 🏫 Educators and students: Use Adala as a teaching tool or as a base for advanced projects and research.

While the roles highlighted above are central, it's pivotal to note that Adala is intricately designed to streamline and elevate the AI development journey, catering to all enthusiasts, irrespective of their specific niche in the field. 🥰

🔌Installation

Install Adala:

pip install adala

Adala frequently releases updates. In order to ensure that you are using the most up-to-date version, it is recommended that you install it from GitHub:

pip install git+https://github.com/HumanSignal/Adala.git

Developer installation:

git clone https://github.com/HumanSignal/Adala.git
cd Adala/
poetry install

📝 Prerequisites

Set OPENAI_API_KEY (see instructions here)

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

🎬 Quickstart

In this example we will use Adala as a standalone library directly inside Python notebook.

Click here to see an extended quickstart example.

import pandas as pd

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

# Train dataset
train_df = pd.DataFrame([
    ["It was the negative first impressions, and then it started working.", "Positive"],
    ["Not loud enough and doesn't turn on like it should.", "Negative"],
    ["I don't know what to say.", "Neutral"],
    ["Manager was rude, but the most important that mic shows very flat frequency response.", "Positive"],
    ["The phone doesn't seem to accept anything except CBR mp3s.", "Negative"],
    ["I tried it before, I bought this device for my son.", "Neutral"],
], columns=["text", "sentiment"])

# Test dataset
test_df = pd.DataFrame([
    "All three broke within two months of use.",
    "The device worked for a long time, can't say anything bad.",
    "Just a random line of text."
], columns=["text"])

agent = Agent(
    # connect to a dataset
    environment=StaticEnvironment(df=train_df),

    # define a skill
    skills=ClassificationSkill(
        name='sentiment',
        instructions="Label text as positive, negative or neutral.",
        labels=["Positive", "Negative", "Neutral"],
        input_template="Text: {text}",
        output_template="Sentiment: {sentiment}"
    ),

    # define all the different runtimes your skills may use
    runtimes = {
        # You can specify your OPENAI API KEY here via `OpenAIRuntime(..., api_key='your-api-key')`
        'openai': OpenAIChatRuntime(model='gpt-4o'),
    },
    teacher_runtimes = {
        # You can specify your OPENAI API KEY here via `OpenAIRuntime(..., api_key='your-api-key')`
        'default': OpenAIChatRuntime(model='gpt-4o'),
    },
    default_runtime='openai',
)

print(agent)
print(agent.skills)

agent.learn(learning_iterations=3, accuracy_threshold=0.95)

print('\n=> Run tests ...')
predictions = agent.run(test_df)
print('\n => Test results:')
print(predictions)

However, if you prefer to use Adala with Claude, Gemini, or other OpenAI compatible LLMs, you can do so by using OpenRouter.ai. Below is an example of how to use the OpenRouter API:

Start by setting the OPENROUTER_API_KEY environment variable, which you can get from OpenRouter.

export OPENROUTER_API_KEY='your-openrouter-api-key'

Then, let's see how to modify the previous example to use OpenRouter with Claude 3.5 Haiku.

import os
import pandas as pd

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

# Train dataset
train_df = pd.DataFrame([
    ["It was the negative first impressions, and then it started working.", "Positive"],
    ["Not loud enough and doesn't turn on like it should.", "Negative"],
    ["I don't know what to say.", "Neutral"],
    ["Manager was rude, but the most important that mic shows very flat frequency response.", "Positive"],
    ["The phone doesn't seem to accept anything except CBR mp3s.", "Negative"],
    ["I tried it before, I bought this device for my son.", "Neutral"],
], columns=["text", "sentiment"])

# Test dataset
test_df = pd.DataFrame([
    "All three broke within two months of use.",
    "The device worked for a long time, can't say anything bad.",
    "Just a random line of text."
], columns=["text"])

agent = Agent(
    # connect to a dataset
    environment=StaticEnvironment(df=train_df),

    # define a skill
    skills=ClassificationSkill(
        name='sentiment',
        instructions="Label text as positive, negative or neutral.",
        labels=["Positive", "Negative", "Neutral"],
        input_template="Text: {text}",
        output_template="Sentiment: {sentiment}"
    ),

    # define all the different runtimes your skills may use
    runtimes = {
        # You can specify your OpenRouter API Key here or set it ahead of time in your environment variable, OPENROUTER_API_KEY
        'openrouter': OpenAIChatRuntime(
            base_url="https://openrouter.ai/api/v1",
            model="anthropic/claude-3.5-haiku",
            api_key=os.getenv("OPENROUTER_API_KEY"),
            provider="Custom"
            ),
    },

    default_runtime='openrouter',

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

print(agent)
print(agent.skills)

agent.learn(learning_iterations=3, accuracy_threshold=0.95)

print('\n=> Run tests ...')
predictions = agent.run(test_df)
print('\n => Test results:')
print(predictions)

👉 Examples

Skill Description Colab
ClassificationSkill Classify text into a set of predefined labels. Open In Colab
ClassificationSkillWithCoT Classify text into a set of predefined labels, using Chain-of-Thoughts reasoning. Open In Colab
SummarizationSkill Summarize text into a shorter text. Open In Colab
QuestionAnsweringSkill Answer questions based on a given context. Open In Colab
TranslationSkill Translate text from one language to another. Open In Colab
TextGenerationSkill Generate text based on a given prompt. Open In Colab
Skill sets Process complex tasks through a sequence of skills. Open In Colab
OntologyCreator Infer ontology from a set of text examples. Open In Colab
Math reasoning Solve grade-school math problems on GSM8k dataset. Open In Colab

Executing Agent Skill

🗺 Roadmap

  • Low-level skill management (i.e. agent.get_skill("name")) [COMPLETE @niklub]
  • Make every notebook example to run in Google Collab and add a badge into README
  • Extend environment with one more example
  • Multi-task learning (learn multiple skills at once)
  • Calculate and store top line Agent metrics (predictions created, runtime executions, learning loops, etc)
  • Create Named Entity Recognition Skill
  • Command line utility (see the source for this readme for example)
  • REST API to interact with Adala
  • Vision and multi-modal agent skills

🤩 Contributing to Adala

Enhance skills, optimize runtimes, or pioneer new agent types. Whether you're crafting nuanced tasks, refining computational environments, or sculpting specialized agents for unique domains, your contributions will power Adala's evolution. Join us in shaping the future of intelligent systems and making Adala more versatile and impactful for users across the globe.

Read more here.

💬 Support

Do you need help or are you looking to engage with community? Check out Discord channel! Whether you have questions, need clarification, or simply want to discuss topics related to the project, the Discord community is welcoming!

관련 저장소
Snailclimb/JavaGuide

Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发

JavaScriptnpmApache License 2.0javainterview
javaguide.cn
157.2k46.2k
langgenius/dify

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

TypeScriptnpmOtheraigpt
dify.ai
149.7k23.6k
TauricResearch/TradingAgents

TradingAgents: Multi-Agents LLM Financial Trading Framework

PythonPyPIApache License 2.0agentfinance
arxiv.org/pdf/2412.20138
94k18.2k
OpenHands/OpenHands

🙌 OpenHands: AI-Driven Development

PythonPyPIOtheragentartificial-intelligence
openhands.dev
81.6k10.4k
lobehub/lobehub

🤯 LobeHub is your Chief Agent Operator, organizing your agents into 7×24 operations by hiring, scheduling, and reporting on your entire AI team.

TypeScriptnpmOtherchatgptopenai
lobehub.com
80.6k15.7k
bytedance/deer-flow

An open-source long-horizon SuperAgent harness that researches, codes, and creates. With the help of sandboxes, memories, tools, skill, subagents and message gateway, it handles different levels of tasks that could take minutes to hours.

PythonPyPIMIT Licenseagentagentic
deerflow.tech
77.6k10.6k
dair-ai/Prompt-Engineering-Guide

🐙 Guides, papers, lessons, notebooks and resources for prompt engineering, context engineering, RAG, and AI Agents.

MDXMIT Licensedeep-learningprompt-engineering
promptingguide.ai
76.8k8.4k
hiyouga/LlamaFactory

Unified Efficient Fine-Tuning of 100+ LLMs & VLMs (ACL 2024)

PythonPyPIApache License 2.0fine-tuningllama
llamafactory.readthedocs.io
73.4k9k
shareAI-lab/learn-claude-code

Bash is all you need - A nano claude code–like 「agent harness」, built from 0 to 1

PythonPyPIMIT Licenseagentclaude-code
learn.shareai.run
71.9k11.7k
FoundationAgents/MetaGPT

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

PythonPyPIMIT Licenseagentgpt
atoms.dev
69.5k8.9k
unslothai/unsloth

Unsloth is a local UI for training and running Gemma 4, Qwen3.6, DeepSeek, Kimi, GLM and other models.

PythonPyPIApache License 2.0fine-tuningllama
unsloth.ai/docs
68.7k6.2k
datawhalechina/hello-agents

📚 《从零开始构建智能体》——从零开始的智能体原理与实践教程

PythonPyPIOtheragenttutorial
hello-agents.datawhale.cc
67.8k8.4k