Skip to main content

avala-agents

PyPI version Python CI License: MIT

Build custom annotation workflow agents for the Avala platform.

Note: This repository is a read-only mirror. To report bugs or request features, please open an issue. See CONTRIBUTING.md for details.

Installation

pip install avala-agents

Quick Start

from avala_agents import TaskAgent

agent = TaskAgent(
    api_key="avk_...",
    name="quality-checker",
    project="proj_uid",  # optional: scope to a single project
)

@agent.on("result.submitted")
def check_quality(context):
    annotations = context.result_data

    if len(annotations) == 0:
        context.reject("No annotations found")
    elif context.result_metadata.get("confidence", 1.0) < 0.5:
        context.flag("Low confidence — needs manual review")
    else:
        context.approve()

agent.run()  # blocks; polls for pending executions

Supported Events

Event Context class Description
result.submitted ResultContext An annotator submitted a result
result.accepted ResultContext A result was accepted by QC
result.rejected ResultContext A result was rejected by QC
task.completed TaskContext A task reached a terminal state

Actions

All context objects expose four action methods:

Method Description
context.approve(reason="") Accept the result / task
context.reject(reason="") Reject with an optional reason
context.flag(reason="") Flag for manual review
context.skip() Acknowledge without taking action

Configuration

Parameter Env var Default
api_key AVALA_API_KEY required
base_url AVALA_BASE_URL https://api.avala.ai/api/v1
name "default-agent"
project None (all projects)
task_types None (all types)
poll_interval 5.0 seconds

Processing a single batch (non-blocking)

count = agent.run_once()
print(f"Processed {count} execution(s)")

Error handling

from avala_agents import AgentActionError, AgentRegistrationError

try:
    agent.run()
except AgentRegistrationError as exc:
    print(f"Could not register agent: {exc}")

License

MIT

Release files for avala-agents 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for avala-agents 0.1.1
File Size Uploaded
avala_agents-0.1.1.tar.gz 15.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for avala-agents 0.1.1
File Interpreter ABI Platform
avala_agents-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 26.2 kB

Release files / avala_agents-0.1.1.tar.gz

Download URL avala_agents-0.1.1.tar.gz
Size 15.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6262c9749f76b1f5fcdd35a8953dc28a8658eb8e060d40c9fe76e3c20680e462
BLAKE2b-256 checksum
How to use checksums
193fe5adbe8c3fdc7fed503fded8aabcecbd0d4e97391f5272468f96243528eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 30, 2026.

Transparency log

Release files / avala_agents-0.1.1-py3-none-any.whl

Download URL avala_agents-0.1.1-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ca6fc9d7194c91e3e69c93e19f2588328f3d819645e99a444d5b3143247596d5
BLAKE2b-256 checksum
How to use checksums
05e3cc5290bee7fe301f93a3d1bfadf1936a1fc804281d99c6b8c9c22ebfe79a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page