Skip to main content

Python-first agent harness framework with Markdown skills, sessions, sandboxes, and pluggable backends.

Project description

PyFlue

CI Docs

PyFlue is a Python-first agent harness framework with Markdown skills, stateful sessions, sandboxed filesystem/shell access, typed Pydantic outputs, and pluggable harness backends.

PyFlue is inspired by Flue's agent harness model and adapts the same broad developer experience for Python projects.

The default backend is DeepAgents. Other harnesses are represented behind the same PyFlue API so users can switch later without rewriting skills or sessions.

Quick Start

pip install -e ".[dev]"
pyflue init my-agent
cd my-agent
pyflue run --prompt "Review this project"

Python API

from pydantic import BaseModel
from pyflue import init


class FixResult(BaseModel):
    fix_applied: bool
    summary: str


async def main():
    agent = await init(
        model="openai:gpt-4o",
        harness="deepagents",
        sandbox="virtual",
        allow_write=True,
        allow_shell=True,
    )
    session = await agent.session("fix-123")
    result = await session.skill(
        "triage",
        args={"issue_number": 123},
        result=FixResult,
    )
    if result.fix_applied:
        await session.shell("git status --short")

Harness Backends

Backend Status Use case
deepagents Default Coding/research agents with skills, files, shell, and subagents.
openai_agents Planned OpenAI-native agent workflows.
google_adk Planned Google/Gemini-oriented agent workflows.
pydanticai Planned Type-safe service agents.

Project Layout

AGENTS.md
pyflue.toml
.agents/
  skills/
    triage.md

Flue-Inspired Feature Mapping

Concept PyFlue
AGENTS.md Root project instructions loaded into the harness.
Markdown skills .agents/skills/*.md parsed with frontmatter.
Sessions SQLite-backed session history under .pyflue/sessions.
Sandbox VirtualSandbox by default; remote providers planned.
Typed outputs Pydantic v2 validation.
CLI pyflue init, pyflue run, pyflue dev, pyflue build.
Deployment Docker/FastAPI, GitHub Actions, GitLab CI, Railway, Render, and Fly.io artifact generation.

Status

The DeepAgents backend is the primary runtime. OpenAI Agents SDK, Google ADK, and Pydantic AI are exposed as planned extension points behind the same public PyFlue API.

Development

uv sync --extra dev --extra docs
uv run --extra dev ruff check .
uv run --extra dev pytest
uv run --extra docs mkdocs build --strict
uv build

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

pyflue-0.1.0.tar.gz (307.8 kB view details)

Uploaded Source

Built Distribution

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

pyflue-0.1.0-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file pyflue-0.1.0.tar.gz.

File metadata

  • Download URL: pyflue-0.1.0.tar.gz
  • Upload date:
  • Size: 307.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for pyflue-0.1.0.tar.gz
Algorithm Hash digest
SHA256 389ef01db10058e23cd33aa723a0ea75d85c837b902ac1c5e0315820237d297e
MD5 a9d4a88d5e5f29fd2f612d20f27789ed
BLAKE2b-256 2428b9fbb05e4b745de04cb852d8b67a1029bfe86d067f2be874023268201754

See more details on using hashes here.

File details

Details for the file pyflue-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyflue-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for pyflue-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33b1704c6bfb7a6b645562595a20f2aa076c173342f2352df63b53f5ede12993
MD5 51baf99f79ec88b7ad4d05a16b10017d
BLAKE2b-256 da895c756f0de5b798db5adad440c33879031974269c6945c21fba9ddc44124c

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