stroblmeandClaude Fable 5 19bc2810cf Add a Python SDK: flows declared in your own repository
A data scientist keeps their code where it is and decorates it: `@node`
declares a function's ports beside the function, `Flow(name, nodes=[...])`
says which of them make a flow, and `use(fn, wire=..., **settings)` rebinds
one for a single flow. `fluksio sync` uploads the document plus a generated
import shim per node, so the store still holds a complete, runnable,
git-versioned definition while the code it imports stays theirs.

`fluksio login|run|runs` and `flow.submit().wait()` are the client half, over
the run endpoints that already existed. Runs record the user repository's
commit beside the store's, so "what code produced this number" is answerable
on the side that now holds the code.

- `fluksio/sdk/`: ports, decorators, the flow builder and its checks, the shim
  generator, an HTTP client and sync. Standard library only at import, so
  `from fluksio import node` in a training script pulls in no engine.
- `FlowDef.origin` marks a flow code-defined; `Run.origin_commit` carries the
  repository's commit; `POST /modules/refresh` retires the workers without an
  install, which every sync calls — a worker holds the imported package in
  memory, so an edit to it is invisible until the process goes.
- The canvas shows a generated body read-only and names the repository to edit
  instead; a body edited there stops the next sync rather than being discarded.
- The worker's reporter carries inert `Port`, `node`, `use` and `Flow`, since
  the shim imports a module whose first line declares them.
- `examples/myresearch` is the worked example, `make sync-example` uploads it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ue1tkFWB1bcGy3aWhCKpU
2026-08-23 20:16:08 +02:00
2026-02-03 21:43:09 +01:00
2026-02-03 21:43:09 +01:00

Fluksio App

Fluksio has the goal to build a revolutionary system to tackle any sort of automation challenge.

The core of Fluksio: a node-based, test-driven automation software built to scale. This repo holds the FastAPI backend, the flow engine, and the dashboard SPA. It is served on app.${DOMAIN} (SPA) and api.${DOMAIN} (API); the marketing site lives in the sibling index repo.

Layout

backend/        FastAPI + SQLModel + Alembic + SQLite — the `fluksio` distribution
  fluksio/flow/ the flow engine (nodes, pipeline, state backends, controller)
  fluksio/cli.py  `fluksio serve` / `enroll` / `worker`
worker/         the `fluksio-worker` distribution: the agent and the node runner
frontend/       React 19 + TanStack Router + Tailwind 4 + shadcn/ui
docs/           the public documentation site (zensical), served on docs.${DOMAIN}
docker/         compose.yml → compose.dev.yml → compose.local.yml (+ compose.traefik.yml)
scripts/        generate-client.sh, test.sh

Install without Docker

pip install fluksio
fluksio serve                       # ~/.fluksio, SQLite, prints an admin password once
fluksio enroll <code> --portal https://hub.fluksio.com   # watch it from the portal

Nothing else has to be running. --data-dir puts the installation somewhere else — worth it on a cluster, where $HOME is often a network filesystem SQLite cannot use. git is not required but is worth having: flows are files either way, and it is what turns each save into a commit. The dashboard is served by the portal, so a machine with no inbound route is reached without opening a port: it dials out.

A machine that should only run nodes for an engine elsewhere installs less:

pip install fluksio-worker
fluksio-worker --url wss://api.example.com/api/v1/workers/attach --token "$TOKEN" --labels gpu

Getting started

Normally driven from the workspace root (make init once, then make dev). Standalone:

make install       # uv sync + bun install
make dev-utils     # proxy and mailcatcher only
make dev-backend   # FastAPI on :8000, hot reload
make dev-frontend  # Vite on :5173
make test           # pytest + Playwright (the e2e half needs the stack up)
make lint           # ruff + mypy + biome
make generate-client  # regenerate the frontend SDK from the OpenAPI schema

make help lists every target.

Documentation

The public site lives in docs/ and is built with zensical:

make docs-serve   # live preview on :8000
make docs         # static build into ./site

It is served at docs.${DOMAIN} by the docs service in docker/compose.yml, and .gitea/workflows/docs.yml builds it with --strict on every push. Style follows the root DESIGN-GUIDELINES.md; the tokens are mirrored in docs/stylesheets/extra.css.

Repo-only material:

  • ROADMAP.md — strategy and feature record
  • NOTEPAD.md — deferred work and findings
  • DESIGN.md — points at the workspace root's DESIGN-GUIDELINES.md
  • docs/architecture/ in the sibling docs repo — the requirement sources
S
Description
No description provided
Readme AGPL-3.0
7.1 MiB
Languages
Python 54%
TypeScript 42.6%
CSS 1.9%
HTML 0.5%
JavaScript 0.5%
Other 0.3%