Skip to main content

FlowPilot: AI-powered task automation SDK with intent recognition, tool selection, orchestration, and execution.

Project description

AgentFlowPilot

AgentFlowPilot 是一个智能代理任务处理 SDK,具备以下核心功能:

  • ✨ 意图识别
  • 🛠️ 工具判断
  • 📋 任务编排
  • 🚀 任务执行

安装

通过 PyPI 安装

pip install agent_flowpilot

通过源码安装

  1. 克隆仓库:
git clone https://github.com/deepissue/flowpilot.git
cd flowpilot
  1. 安装依赖:
pip install -e ".[test]"

这将以可编辑模式安装 flowpilot 包,并同时安装测试依赖。

结构说明

  • flowpilot.py:统一流程入口,负责启动和管理任务执行流程。
  • intent.py:意图识别器,基于输入的提示词进行意图分析,返回任务定义信息。
  • scheduler.py:任务编排调度,负责任务的顺序和依赖关系管理。
  • executor.py:任务执行器抽象类,具体任务执行逻辑的实现。
  • tools.py:工具注解生成,提供辅助功能的工具接口。

使用示例

可以在 test/demo.py 中找到具体的使用示例。

# 示例代码
from agent_flowpilot import FlowPilot

flow = AntFlowPilot(...)
flow.load_task_definitions(task_definitions)
await flow.arun()
report = flow.get_execution_report()
print(report)

任务定义示例

任务定义是整个 SDK 的核心,结构如下:

# 任务定义示例
task_definitions = [
    {
        "name": "create_vm",
        "description": "创建虚拟机",
        "parameters": {"vm_name": None},
        "required_parameters": [],
        "optional_parameters": ["vm_name"],
        "execution_mode": "sequential",
        "depends_on": [],
    }
]

测试

运行测试,可以使用以下命令:

pytest tests/

贡献

欢迎提交 PR 或 issue!任何问题或建议都可以提到 issue。

License

MIT License

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

agent_flowpilot-0.1.1.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

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

agent_flowpilot-0.1.1-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file agent_flowpilot-0.1.1.tar.gz.

File metadata

  • Download URL: agent_flowpilot-0.1.1.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for agent_flowpilot-0.1.1.tar.gz
Algorithm Hash digest
SHA256 812a7b379201b5fa59746ccf3e7afe6eedf0f4f29aeaa3d53b180b8f360dbcf3
MD5 92431d56848401339d7199599568fc8c
BLAKE2b-256 0d78d2d09dbccdadfaf8c24678039aa05a049e3bb06e170f34c5b40e00c4aa83

See more details on using hashes here.

File details

Details for the file agent_flowpilot-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_flowpilot-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 290cb07f6b198a0c9bc48b3b881ee0af5456aa00f7e5a4f14bbb294111d950c7
MD5 b9c1d747ca8042d6e3bfe65395f3c30e
BLAKE2b-256 32beb506ee0221dcba8704dd417730ee5dd0260fba71f1805bfc009a893888d1

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