Skip to main content

Areteos Python SDK

Python client for the Areteos Workflow Runtime API. Define workflows, trigger runs, and monitor execution with full type safety.

Installation

pip install areteos

Quick Start

from areteos import AreteosClient, Step, Edge, InputMapping

client = AreteosClient(
    base_url="https://areteos.example.com",
    api_key="areteos_your_key",
    engagement_id="your-engagement-uuid",
)

# Register a workflow
workflow = client.create_workflow(
    "Document Pipeline",
    steps=[
        Step.python("extract", "Extract Text", code="""
import json, sys
data = json.load(open(sys.argv[1])) if len(sys.argv) > 1 else {}
print(json.dumps({"text": data.get("raw_text", "")}))
"""),
        Step.agent(
            "summarize", "Summarize",
            system_prompt="Summarize the document concisely.",
            input_mappings=[
                InputMapping(source_step_id="extract", source_field="text", target_field="document")
            ],
        ),
    ],
    edges=[Edge(from_step_id="extract", to_step_id="summarize")],
)

# Trigger and wait
run = client.trigger(workflow.current_version_id, input={"raw_text": "..."})
result = client.wait_for_run(run.id, timeout=300)
print(result.output)

Async Usage

from areteos import AreteosAsyncClient, Step

async with AreteosAsyncClient(
    base_url="https://areteos.example.com",
    api_key="areteos_your_key",
    engagement_id="your-engagement-uuid",
) as client:
    workflow = await client.create_workflow("My Workflow", steps=[...])
    run = await client.trigger(workflow.current_version_id)
    result = await client.wait_for_run(run.id)

Step Types

Agent (LLM)

Step.agent(
    "analyze", "Analyze",
    model="capable",           # fast, capable, thinking
    strategy="react",          # react, adaptive, cot, cod, tot, got, trm
    system_prompt="You are an analyst.",
    max_turns=10,
)

Python (Inline Code)

Step.python(
    "transform", "Transform",
    code="import json, sys\ndata = json.load(open(sys.argv[1]))\nprint(json.dumps({'count': len(data)}))",
    timeout_ms=30000,
)

Human-in-the-Loop

Step.hitl(
    "review", "Manager Review",
    request_type="approval",   # approval, input, review
    timeout_minutes=1440,      # 24 hours
)

Data Flow

Connect steps with edges and input mappings:

steps = [
    Step.python("extract", "Extract", code="..."),
    Step.agent(
        "summarize", "Summarize",
        input_mappings=[
            InputMapping(source_step_id="extract", source_field="text", target_field="document"),
            InputMapping(source_step_id=None, source_field="config", target_field="settings"),  # from run input
        ],
    ),
]
edges = [Edge(from_step_id="extract", to_step_id="summarize")]

Error Handling

from areteos import AreteosError, ApiError, ForbiddenError, NotFoundError, ValidationError, TimeoutError

try:
    run = client.trigger(version_id)
    result = client.wait_for_run(run.id, timeout=60)
except ValidationError as e:
    print(f"Invalid workflow: {e}")
except ForbiddenError:
    print("Access denied — check your API key scope")
except TimeoutError:
    print("Run did not complete in time")
except ApiError as e:
    print(f"API error {e.status_code}: {e}")

Auto-Approve HITL

For CI/CD pipelines, auto-approve all human-in-the-loop requests:

result = client.wait_for_run(run.id, auto_approve=True)

Development

cd sdks/python
uv sync
uv run pytest
uv run ruff check .
uv run mypy src/

Metadata

Release files for areteos 0.2.0

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

Source distribution (sdist)

Source distribution for areteos 0.2.0
File Size Uploaded Provenance Actions
areteos-0.2.0.tar.gz 209.8 kB With provenance Details for areteos-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for areteos 0.2.0
File Interpreter ABI Platform Actions
areteos-0.2.0-py3-none-any.whl Python 3 none any Details for areteos-0.2.0-py3-none-any.whl

Total release size: 227.6 kB

Release files / areteos-0.2.0.tar.gz

Download URL areteos-0.2.0.tar.gz
Size 209.8 kB
Tags Source
SHA-256 checksum
How to use checksums
bf92abb2742a97a92b484bd493e433d4a49374551bb361773192c6ff2d1fa4fd
BLAKE2b-256 checksum
How to use checksums
cf23ccb88f116ade0544fd6be81eea89b03e2030292ab047653be185d769fcdc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 23, 2026.

Transparency log

Release files / areteos-0.2.0-py3-none-any.whl

Download URL areteos-0.2.0-py3-none-any.whl
Size 17.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b508ead12aff7a41c3649ce71ce1178e26b42d7460130913045d02e2db00199
BLAKE2b-256 checksum
How to use checksums
7ffafe14e88f60778dcc21359342ef9a56120a05dd400a61078ede0a9020b0f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 23, 2026.

Transparency log

Security for areteos 0.2.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for areteos-0.2.0.tar.gz

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 Mar 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

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