[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-79947":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":15,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":24,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":16,"starSnapshotCount":16,"syncStatus":15,"lastSyncTime":32,"discoverSource":33},79947,"pyflue","SuperagenticAI\u002Fpyflue","SuperagenticAI","Python port of the Flue: The Agent Harness Framework","https:\u002F\u002Fsuper-agentic.ai\u002Fpyflue",null,"Python",85,8,80,2,0,4,5,6,2.86,"Other",false,"main",true,[26,27,28],"agent","harness","harness-engineering","2026-06-12 02:03:56","# PyFlue\n\n[![CI](https:\u002F\u002Fgithub.com\u002FSuperagenticAI\u002Fpyflue\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FSuperagenticAI\u002Fpyflue\u002Factions\u002Fworkflows\u002Fci.yml)\n[![Docs](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdocs-superagenticai.github.io%2Fpyflue-blue)](https:\u002F\u002Fsuperagenticai.github.io\u002Fpyflue\u002F)\n[![Landing Page](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flanding-super--agentic.ai%2Fpyflue-black)](https:\u002F\u002Fsuper-agentic.ai\u002Fpyflue)\n[![PyPI](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fpyflue)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fpyflue\u002F)\n[![Python](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fpyflue)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fpyflue\u002F)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fl\u002Fpyflue)](https:\u002F\u002Fgithub.com\u002FSuperagenticAI\u002Fpyflue\u002Fblob\u002Fmain\u002FLICENSE)\n\n\nPyFlue is the agent harness framework for Python. It gives you Markdown skills,\nstateful sessions, sandboxed filesystem and shell access, typed Pydantic\noutputs, streaming events, file-based webhook routes, and deployment-ready\nproject structure.\n\nPyFlue adapts the agent harness model for Python teams.\n\n> **Warning: Active Development**\n>\n> PyFlue is under active development. The API may change. Pin your dependencies\n> and review changelogs before updating.\n\nUse it to build coding agents, issue triage agents, data analysis agents,\nsupport agents, and workflow agents that need controlled access to files,\ncommands, tools, and structured outputs.\n\nDocumentation: \u003Chttps:\u002F\u002Fsuperagenticai.github.io\u002Fpyflue\u002F>\n\nLanding page: \u003Chttps:\u002F\u002Fsuper-agentic.ai\u002Fpyflue>\n\n## Install\n\nWith `uv`:\n\n```bash\nuv add pyflue\n```\n\nWith `pip`:\n\n```bash\npip install pyflue\n```\n\nOptional extras:\n\n```bash\nuv add \"pyflue[monty]\"\nuv add \"pyflue[sandboxes]\"\n```\n\n```bash\npip install \"pyflue[monty]\"\npip install \"pyflue[sandboxes]\"\n```\n\n## Quick Start\n\n```bash\npyflue init my-agent\ncd my-agent\npyflue run --prompt \"Review this project\"\n```\n\nRun a local server\u002Fclient smoke demo without a model key:\n\n```bash\nuv run python examples\u002Fserver_client\u002Frun_smoke.py\n```\n\n## Python API\n\n```python\nfrom pydantic import BaseModel\nfrom pyflue import init\n\n\nclass FixResult(BaseModel):\n    fix_applied: bool\n    summary: str\n\n\nasync def main():\n    agent = await init(\n        model=\"openai:gpt-5.5\",\n        sandbox=\"virtual\",\n        allow_write=True,\n        allow_shell=True,\n        allowed_commands=[\"git\"],\n    )\n    session = await agent.session(\"fix-123\")\n    result = await session.skill(\n        \"triage\",\n        args={\"issue_number\": 123},\n        result=FixResult,\n    )\n    if result.fix_applied:\n        await session.shell(\"git status --short\")\n```\n\n## What PyFlue Gives You\n\n| Capability | What it means |\n| --- | --- |\n| Markdown skills | Put reusable workflows in `.agents\u002Fskills\u002F*.md`. |\n| Project instructions | Use `AGENTS.md` for global behavior and context. |\n| Roles | Scope behavior with `.agents\u002Froles\u002F*.md`. |\n| Sessions | Resume agent state with stable session IDs. |\n| Tasks | Run focused child tasks with isolated history and shared sandbox. |\n| Sandbox | Read, write, edit, grep, glob, and shell behind explicit policies. |\n| Secret grants | Keep secrets out of prompts and grant them only per call. |\n| Typed outputs | Validate results with Pydantic, extract JSON from text, and repair invalid JSON automatically. |\n| Streaming | Use `session.stream(...)`, `pyflue run --stream`, or SSE. |\n| Abort | Cancel active prompt, stream, task, and shell operations with `session.abort()`. |\n| Structured commands | Expose reusable shell or callable commands with `PyFlueCommand`. |\n| Python client | Call deployed PyFlue servers with `PyFlueClient`. |\n| Webhooks | Expose `agents\u002F*.py` as `\u002Fagents\u002F{name}\u002F{agent_id}`. |\n| Python code backend | Use `pyflue[monty]` for safe host-side Python snippets. |\n| Remote sandboxes | Use Daytona, E2B, Modal, or Runloop with optional extras. |\n| Connector guides | Use `pyflue add` to print agent-readable setup guides for sandbox providers. |\n| Deployment | Generate Docker\u002FFastAPI, CI, Railway, Render, Fly.io, Vercel, Netlify, and Cloudflare Containers starter files. |\n\n## Project Layout\n\n```text\nAGENTS.md\npyflue.toml\n.agents\u002F\n  roles\u002F\n    coder.md\n  skills\u002F\n    triage.md\nagents\u002F\n  default.py\n```\n\n## File-Based Agent\n\n```python\ntriggers = {\"webhook\": True}\n\n\nasync def default(context):\n    agent = await context.init()\n    session = await agent.session(context.agent_id)\n    result = await session.prompt(context.payload[\"prompt\"])\n    return {\"text\": result.text}\n```\n\nRun it locally:\n\n```bash\npyflue dev --port 2024\n```\n\nCall it:\n\n```bash\ncurl http:\u002F\u002F127.0.0.1:2024\u002Fagents\u002Fdefault\u002Fdemo \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"payload\": {\"prompt\": \"Review this repository\"}}'\n```\n\n## Streaming\n\n```bash\npyflue run --stream --prompt \"Review this project\"\n```\n\n```python\nasync for event in session.stream(\"Review this project\"):\n    print(event.type, event.data)\n```\n\n## Connector Guides\n\nList available guides:\n\n```bash\npyflue add\n```\n\nPrint a guide for a known sandbox provider:\n\n```bash\npyflue add daytona --print\n```\n\nStart from any provider documentation URL:\n\n```bash\npyflue add https:\u002F\u002Fe2b.dev\u002Fdocs --category sandbox --print | codex\n```\n\n## Security Model\n\nPyFlue starts with safe defaults:\n\n- writes are disabled until `allow_write=True`\n- shell execution is disabled until `allow_shell=True`\n- compound shell syntax is blocked by default\n- command allowlists are supported with `allowed_commands`\n- secrets are not injected into prompts\n- secrets are mounted into sandbox calls only when requested with `secrets=[...]`\n\n## Deployment\n\nGenerate deployment files:\n\n```bash\npyflue build --target docker\npyflue build --target railway\npyflue build --target fly\npyflue build --target vercel\npyflue build --target netlify\npyflue build --target cloudflare\n```\n\nDeploy with a supported provider CLI:\n\n```bash\npyflue deploy --target fly\n```\n\n## Development\n\n```bash\nuv sync --extra dev --extra docs\nuv run --extra dev ruff check .\nuv run --extra dev pytest\nuv run --extra docs mkdocs build --strict\nuv build\n```\n","PyFlue 是一个用于 Python 的代理框架，它提供了 Markdown 技能、状态会话、沙箱文件系统和 Shell 访问、类型化的 Pydantic 输出、流式事件、基于文件的 Webhook 路由以及可部署的项目结构。其核心功能包括支持多种编程任务的代理创建，如代码编写、问题分类、数据分析和支持等，并且通过沙箱环境确保了对文件和命令的安全访问。PyFlue 适用于需要构建具有受控文件和工具访问权限及结构化输出能力的各种自动化代理场景，特别适合于Python开发团队用来提高工作效率或增强现有应用的功能。","2026-06-11 03:58:39","CREATED_QUERY"]