Skip to main content

Documentation | Try it Now | Blog | Join our Community

Encord logo

Easily build agents for the Encord echo system. With just few lines of code, you can take automation to the next level.

python -m pip install encord-agents

Key features:

  1. ⚡ Easy: Multiple template agents to be adapted and hosted via GCP, own infra, or cloud.
  2. ⏩ Convenient: The library conveniently loads data via the Encord SDK upon request.
  3. 👨‍💻 Focused: With essential resources readily available, you can focus on what matters. Create agents with pre-existing (or custom) dependencies for loading labels and data.
  4. 🤏 Slim: the library is slim at it's core and should not conflict with the dependencies of most projects.

💡 For the full documentation and end-to-end examples, please see here.

Here are some use-cases:

Decision tree for which agent to use

Here's how to build an Agent:

from uuid import UUID
from encord.objects.ontology_labels_impl import LabelRowV2
from encord_agents.tasks import Runner

runner = Runner(project_hash="<your_project_hash>")


@runner.stage("<your_agent_stage_uuid>")
def by_file_name(lr: LabelRowV2) -> UUID | None:
    # Assuming the data_title is of the format "%d.jpg"
    # and in the range [0; 100]
    priority = int(lr.data_title.split(".")[0]) / 100
    lr.set_priority(priority=priority)
    return "<your_pathway_uuid>"


if __name__ == "__main__":
    runner.run()

You can also inject dependencies:

from typing_extensions import Annotated

from encord.objects import LabelRowV2
from encord_agents.tasks import Runner, Depends

runner = Runner(project_hash="<your_project_hash>")

def my_custom_dependency(label_row: LabelRowV2) -> dict:
    # e.g., look up additional data in own db
    return db.query("whatever")

@runner.stage(stage="<my_stage_name>")
def by_custom_data(
    custom_data: Annotated[dict, Depends(my_custom_dependency)]
) -> str:
    # `custom_data` automatically injected here.
    # ... do your thing
    # then, return name of task pathway.


if __name__ == "__main__":
    runner.run()

Please visit our 📖 Documentation for a complete reference to how to use the agents library.

Release files for encord-agents 0.1.6

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

Source distribution (sdist)

Source distribution for encord-agents 0.1.6
File Size Uploaded
encord_agents-0.1.6.tar.gz 43.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for encord-agents 0.1.6
File Interpreter ABI Platform
encord_agents-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 98.2 kB

Release files / encord_agents-0.1.6.tar.gz

Download URL encord_agents-0.1.6.tar.gz
Size 43.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fa8a5e394adfdc8321bfe686834d593af8109e1059be395f02c462b1d7ad21ee
BLAKE2b-256 checksum
How to use checksums
839e78cba833b7f98049042b239f47e49cf7eafa7c62e4a459cd6367d48d8f2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.6 Linux/6.8.0-1017-azure

Release files / encord_agents-0.1.6-py3-none-any.whl

Download URL encord_agents-0.1.6-py3-none-any.whl
Size 55.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d7e2b91cf328050c1503bb4c4a31b6eb3f148f508eda5459e47f9fc33a902514
BLAKE2b-256 checksum
How to use checksums
ed7c80fd0713a2cdf01ac3f3e0d2373209e64e0a4999a33e79144b2ce65c53cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.6 Linux/6.8.0-1017-azure

Release history Release notifications | RSS feed

0.2.10

2 release files

0.2.9

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

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