Core workflow engine and OSS runtime for Ari
Project description
ari-core
AI workflows for engineer that actually work.
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
StructuredStep/Segmentexecution 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, anduimake 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.WORKFLOWfor per-run/session dataTable.PROJECTfor persistent project-level data
Execution lifecycle:
- User selects a segment
- Steps run in order
- Each step loads declared
requires, executes, then persists declaredproduces - User can select another segment or finish
Rule of thumb:
- Default to
Table.WORKFLOW - Use
Table.PROJECTonly when data must persist across runs
Interaction & UI primitives
Use Ari interaction primitives inside Step.execute(...):
prompt(message)for free-form inputchoice(message, choices)for selecting from known optionsconfirm(message, default=False)for yes/no decisionsui(component)for richer browser-rendered interactions
Notes:
- Keep interaction logic close to the step that owns the decision
ui(component)requirescomponent.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(...), andconfirm(...) - 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/:
- Core Concepts
- API Cheatsheet
- Getting Started
- Step Authoring
- Step Contracts and Errors
- UI Components
- Segment Guide
- Database Guide
- Publish to Demo
- Issues and Questions
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5854aba2c12382ce205f63c2ec1bfef0d412b6aa008a6696bff2575923aac9a2
|
|
| MD5 |
2ae29fbe483421c52820eafecc403568
|
|
| BLAKE2b-256 |
1cc1a09ac91dbb9adbca24aa52118e10ba8e8d65375ab7f458a452a67cf4869c
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f627e62792a3e31a21549038743e59861e6feda2684b46e47b1d5069ffc473fb
|
|
| MD5 |
4c921488c2432089e2961daacdf30ca9
|
|
| BLAKE2b-256 |
2ac1b866ac75cd113a1d30f82563695997b63623ec477de81d5bbda2b5734fe5
|