Skip to main content

A zero-code AI workflow orchestration framework with state-driven agents

Project description

FlowAgent

Python License Version

State-driven AI agent framework for task automation with human-in-the-loop.

Build agents that collect information, validate input, and execute tasks with optional approval.

Perfect For

  • Booking & Reservations - Restaurants, flights, hotels, appointments
  • Request & Approval - Leave requests, expense reports, access requests
  • Form Wizards - Multi-step data collection with validation
  • Business Workflows - Order processing, customer service, IT ticketing

Installation

pip install flowagent              # Core
pip install flowagent[openai]      # + OpenAI
pip install flowagent[anthropic]   # + Claude
pip install flowagent[all]         # All providers

Quick Example

import asyncio
from flowagent import flowagent, StandardAgent, InputField, AgentStatus
from flowagent import Orchestrator, OpenAIClient

@flowagent(triggers=["book", "reservation"])
class BookingAgent(StandardAgent):
    guests = InputField("How many guests?")
    date = InputField("What date?")

    async def on_running(self, msg):
        return self.make_result(
            status=AgentStatus.COMPLETED,
            raw_message=f"Booked for {self.guests} on {self.date}!"
        )

async def main():
    llm = OpenAIClient(api_key="sk-xxx", model="gpt-4o-mini")
    orchestrator = Orchestrator(llm_client=llm)
    await orchestrator.initialize()

    result = await orchestrator.handle_message("user_1", "I want to book a table")
    print(result.raw_message)  # "How many guests?"

    result = await orchestrator.handle_message("user_1", "4")
    print(result.raw_message)  # "What date?"

    result = await orchestrator.handle_message("user_1", "Friday")
    print(result.raw_message)  # "Booked for 4 on Friday!"

asyncio.run(main())

Key Features

  • State Machine - INITIALIZING → WAITING_FOR_INPUT → RUNNING → COMPLETED
  • Field Collection - Declarative InputField with validation
  • Approval Workflow - Human confirmation before sensitive actions
  • Multi-LLM - OpenAI, Claude, Azure, Gemini, Ollama, DashScope
  • Orchestrator - Route messages to the right agent
  • Checkpoint - Save & restore state, time-travel debugging
  • Multi-tenant - Built-in isolation for SaaS

Documentation

Guides: Agents | Tools | LLM Providers | Orchestrator | Workflow

Contributing

See CONTRIBUTING.md for guidelines.

License

MIT

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

flowagents-0.1.0.tar.gz (193.8 kB view details)

Uploaded Source

Built Distribution

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

flowagents-0.1.0-py3-none-any.whl (182.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: flowagents-0.1.0.tar.gz
  • Upload date:
  • Size: 193.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for flowagents-0.1.0.tar.gz
Algorithm Hash digest
SHA256 61222bdb0a7339dac7059565a8400c52192da9532aa4e5b270a448cea2db395c
MD5 cde22712d31fc00f6b03a4c43304aedb
BLAKE2b-256 2a0795abc512aad42f4b9ac0c3a58bec1f7c89b8f2cf2bfb3d0b95d34050057d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: flowagents-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 182.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for flowagents-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 00a42f05bc13d00e1347b80facc3dcc14ec4c4b90f583fa09118a70c5d8cfcd2
MD5 a77352a7ca7ea45adf6c7d62c630b5ae
BLAKE2b-256 341a68528cf2c8e04e3afe028d9e0035b99095bfb99dcfbb0596fc96235567d1

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