Skip to main content

ForkFlux

Core server for ForkFlux, the self-hosted multi-agent collaboration and audit layer for AI-assisted engineering teams.

ForkFlux is the stateful, self-hosted coordination and audit layer behind ForkFlux. It gives engineering teams and their isolated AI agents a shared, machine-readable system for delegating work, retaining handoff context and artifacts, tracking dependencies and lifecycle transitions, and recording the outcome of each job.

Use this package when you need the ForkFlux service itself: a FastAPI application backed by PostgreSQL or SQLite, a bundled dashboard when built assets are present, and a CLI for database initialization, server startup, role and agent management, job inspection, and metrics.

What it provides

  • Shared, auditable job queue for agent-to-agent work delegation.
  • Atomic claims so only one agent can own a published job at a time.
  • Structured handoffs through context payloads, constraints, and artifacts.
  • Lifecycle and dependency tracking for published, pending, in-progress, blocked, completed, failed, and cancelled work.
  • Job revision and retry workflows, including rejection records and focused reopen context.
  • Role-aware routing, agent identity, and API-token management.
  • Dashboard-facing endpoints for jobs, agents, roles, and the active profile.

Package

pip install forkflux

The installed CLI entry point is:

forkflux --help

Common commands:

forkflux init                 # apply database migrations
forkflux serve                # run the API on 0.0.0.0:8000
forkflux stats                # show recent queue and handoff metrics
forkflux quickstart           # create example roles and agents

forkflux quickstart is the automated local demo command. It creates example roles and agents, installs workflow helpers, and registers MCP servers with two detected supported assistant CLIs. Use the main repository documentation for the complete quickstart and manual setup paths.

Configuration and API

Set DATABASE_URL to use a specific database. The API accepts sqlite+aiosqlite and PostgreSQL URLs. Without it, the CLI uses SQLite and resolves the database from the current project (.forkflux/forkflux.db) or the platform's application-data directory.

When the ForkFlux MCP server runs as a shared HTTP service, set SHARED_API_KEY to a private service credential. The MCP service must provide the same value as FORKFLUX_SHARED_API_KEY; the API uses it for MCP requests that do not carry an agent token, such as startup role discovery. Keep this credential separate from per-agent API tokens.

The FastAPI application is exposed as forkflux_api.main:app. Its default base URL is http://127.0.0.1:8000; API routes are under /api/v1, with separate /mcp and /ui route groups. The health endpoint is GET /api/v1/health and returns HTTP 204.

For endpoint schemas and authenticated MCP workflows, see the API reference and MCP integration guide.

Development

From this directory:

uv sync
uv run pytest tests/test_health.py -v

The test suite separates service unit tests from repository and endpoint integration tests. PostgreSQL-backed integration tests use the repository's test fixtures and testcontainers configuration.

Runtime requirements

  • Python 3.14+

See the main ForkFlux repository for local Docker setup, MCP integration, and end-to-end handoff examples.

Download files

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

Source Distribution

forkflux-1.3.0.tar.gz (199.0 kB view details)

Uploaded Source

Built Distribution

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

forkflux-1.3.0-py3-none-any.whl (229.5 kB view details)

Uploaded Python 3

File details

Details for the file forkflux-1.3.0.tar.gz.

File metadata

  • Download URL: forkflux-1.3.0.tar.gz
  • Upload date:
  • Size: 199.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for forkflux-1.3.0.tar.gz
Algorithm Hash digest
SHA256 4e0c6dadd81f4421904f5f424fee5f736204b3695976b9b21663f59649b039de
MD5 bacd5b975bb8aa378561081443be75e8
BLAKE2b-256 1ef85ee26d5cc98f0bc378918b849a5f4e640ba17231e49846bf20678b20fb7c

See more details on using hashes here.

File details

Details for the file forkflux-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: forkflux-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 229.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for forkflux-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e6d0e3cec0ee20533b6e7913a92f6ebf04cefa5533df2273ae2fe391aa8fdfe9
MD5 1a0f75f7c97a605a10974a037c16246a
BLAKE2b-256 c8de04e6e68098852d65d79f59cd590e11f848b17bfc519734187b4e8c7ef29e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 files

1.2.0

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 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