Skip to main content

Core workflow engine and OSS runtime for Ari

Project description

ari-core

AI workflows for engineer that actually work.

Python Version

Quick links: Getting Started · Core Concepts · API Cheatsheet

What is ari-core?

ari-core is the open workflow framework layer of Ari.

It provides:

  • workflow primitives (Step, Segment, DataModel)
  • interaction primitives (prompt, choice, confirm, ui)
  • local workflow orchestration/runtime for execution

It is designed for (citizen) developers in civil engineering who want to build practical AI workflows.

Why use it?

  • Built for real workflows, not demos
    Structured Step/Segment execution for predictable flow.
  • Low friction for (citizen) developers
    Simple primitives to author workflows without heavy framework overhead.
  • Human-in-the-loop by default
    prompt, choice, confirm, and ui make guided interactions easy.
  • Local-first execution
    Run and iterate quickly on your own machine.
  • Domain fit for civil engineering teams
    Good for repeatable process support, review flows, and decision guidance.
  • Composable and extensible
    Add new steps/components as workflow needs grow.

Installation

Requirements

  • Python 3.12+
  • uv (recommended)

Install

uv add ari-core

Verify

python -c "import ari_core; print('ari-core installed')"

Quick Start (2-minute example)

Create a new workflow project:

uv run ari new my-workflow
cd my-workflow

Run locally:

uv run main.py

What happens:

  • You select a segment
  • Steps run in order
  • Prompts/UI appear as defined by the workflow

Next:

Core Concepts

ari-core workflows are built from a few core primitives:

  • DataModel: typed value object passed between steps
  • Step: unit of workflow logic (execute(ctx))
  • Segment: user-selectable flow of ordered step classes
  • SegmentRegistry: registry of available segments
  • State tables:
    • Table.WORKFLOW for per-run/session data
    • Table.PROJECT for persistent project-level data

Execution lifecycle:

  1. User selects a segment
  2. Steps run in order
  3. Each step loads declared requires, executes, then persists declared produces
  4. User can select another segment or finish

Rule of thumb:

  • Default to Table.WORKFLOW
  • Use Table.PROJECT only when data must persist across runs

Interaction & UI primitives

Use Ari interaction primitives inside Step.execute(...):

  • prompt(message) for free-form input
  • choice(message, choices) for selecting from known options
  • confirm(message, default=False) for yes/no decisions
  • ui(component) for richer browser-rendered interactions

Notes:

  • Keep interaction logic close to the step that owns the decision
  • ui(component) requires component.render_html() -> str
  • Return values from browser UI should be posted back to the runtime

For building custom UI components, see UI Components.

Running locally

Run your workflow project locally:

uv run main.py

Local runtime behavior:

  • Terminal interactions for prompt(...), choice(...), and confirm(...)
  • Browser-based rendering for ui(...) components

This is the default mode for fast development and iteration.

Web based version

Besides local execution, you can publish your workflow to a hosted web demo so users can run it directly in the browser.

To request access to the demo environment, go to: https://brugnaarai.nl

Publish flow

From your workflow project directory:

uv run ari demo-push

This demo web environment is designed for easy sharing with colleagues, making workflow usage and distribution straightforward.

CLI usage

Common commands:

uv run ari new <project-name>
uv run ari demo-push

Use new to scaffold a workflow project and demo-push to publish it to the web demo environment.

Documentation map

Detailed guides are available in ari_core/docs/:

Contributing / development

Contributions are welcome — bug fixes, improvements, docs updates, and new workflow capabilities.

Before you start

  • Check existing guidance in Issues and Questions
  • If you are unsure about direction, open an issue first to discuss approach

Local development

cd packages/ari-core
uv sync

Run tests

uv run pytest

Submitting a PR

  • Keep PRs focused and small where possible
  • Include/update tests when behavior changes
  • Update docs when user-facing behavior changes
  • Use clear PR titles and descriptions (what changed, why, and how to test)
  • Request @tom as reviewer before merging

Raising issues

If you hit a bug, unclear behavior, or documentation gap, open an issue and follow the structure in:

Versioning & stability notes

Current package version: 0.1.0b1.

ari-core is in beta and actively evolving. Some APIs and conventions may change as the framework matures, especially around runtime and workflow authoring ergonomics.

For now:

  • Pin versions for production workflows
  • Review changelogs/release notes before upgrading
  • Re-run tests after each upgrade

License

This project is licensed under the terms of the license defined in this repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ari_core-0.1.0b1.tar.gz (36.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ari_core-0.1.0b1-py3-none-any.whl (40.3 kB view details)

Uploaded Python 3

File details

Details for the file ari_core-0.1.0b1.tar.gz.

File metadata

  • Download URL: ari_core-0.1.0b1.tar.gz
  • Upload date:
  • Size: 36.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for ari_core-0.1.0b1.tar.gz
Algorithm Hash digest
SHA256 5854aba2c12382ce205f63c2ec1bfef0d412b6aa008a6696bff2575923aac9a2
MD5 2ae29fbe483421c52820eafecc403568
BLAKE2b-256 1cc1a09ac91dbb9adbca24aa52118e10ba8e8d65375ab7f458a452a67cf4869c

See more details on using hashes here.

File details

Details for the file ari_core-0.1.0b1-py3-none-any.whl.

File metadata

  • Download URL: ari_core-0.1.0b1-py3-none-any.whl
  • Upload date:
  • Size: 40.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for ari_core-0.1.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 f627e62792a3e31a21549038743e59861e6feda2684b46e47b1d5069ffc473fb
MD5 4c921488c2432089e2961daacdf30ca9
BLAKE2b-256 2ac1b866ac75cd113a1d30f82563695997b63623ec477de81d5bbda2b5734fe5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page