AI Agent that builds workflow automations via natural language
Project description
Agent Flows Builder
AI Agent that builds workflow automations via natural language
Overview
AI Agent that constructs workflow automations through natural language descriptions, making complex workflow building accessible without JSON expertise. Transform plain English requirements into complete, executable workflow configurations.
Features
- Natural Language Interface: Describe workflows in plain English
- 8 Executor Types: API calls, LLM processing, web scraping, conditionals, loops, switches, and more
- Smart Pattern Matching: Finds and adapts existing workflow templates from documentation
- Real Filesystem Tools: Works with actual files and project documentation
- Research Specialist: Handles complex integration analysis when needed
- State Management: Persistent conversation state across workflow building sessions
- Sub-agent Delegation: Specialized agents for complex pattern analysis
Versioning
The package follows semantic versioning with a single source of truth in _version.py:
from agent_flows_builder._version import APP_VERSION
print(APP_VERSION) # Static constant: 1.0.0
Architecture
- Master Agent: Primary workflow builder handling most tasks directly
- Research Specialist: Analyzes complex multi-executor integration patterns
- Built-in Tools: File system access, pattern search, documentation analysis
- Planning System: Task breakdown and progress tracking
Installation
As a Package (Recommended for Integration)
# Install from Git repository
pip install git+https://rtgit.rta.vn/rtlab/rtwebteam/realtimex-agent-flows-builder.git
# Or with uv
uv add git+https://rtgit.rta.vn/rtlab/rtwebteam/realtimex-agent-flows-builder.git
Environment Setup
# Create .env file in your project
REALTIMEX_AI_BASE_PATH=https://realtimexai-llm-provider.realtimex.ai
REALTIMEX_AI_API_KEY=your_realtimex_api_key_here
MCP_ACI_API_KEY=your_mcp_api_key_here
MCP_ACI_LINKED_ACCOUNT_OWNER_ID=your_mcp_account_owner_id
# Optional model configuration overrides
AGENT_MAIN_MODEL=gpt-4.1-mini
AGENT_MAIN_TEMPERATURE=0.1
AGENT_MAIN_MAX_TOKENS=8192
AGENT_RESEARCH_MODEL=gpt-4.1-mini
AGENT_RESEARCH_TEMPERATURE=0
AGENT_RESEARCH_MAX_TOKENS=8192
AGENT_FLOW_VALIDATOR_MODEL=gpt-4.1-mini
AGENT_FLOW_VALIDATOR_MAX_TOKENS=4096
AGENT_RECURSION_LIMIT=1000
For Development
Prerequisites: Python 3.11+, uv package manager
# Clone and install
git clone <repository-url>
cd agent-flows-builder
# Install production dependencies
uv sync
# Install with development dependencies (required for langgraph dev)
uv sync --group dev
# Environment setup
cp .env.example .env
# Populate REALTIMEX_AI_* and MCP_ACI_* with your credentials
# Phoenix tracing (enabled by default via RealTimeX host & API key)
# export PHOENIX_API_KEY=override_key # optional: custom key
# export PHOENIX_PROJECT_NAME=my-project # optional: custom project name
# export PHOENIX_COLLECTOR_ENDPOINT=https://custom/v1/traces
# export AGENT_FLOWS_ENABLE_PHOENIX_TRACING=false # disable tracing entirely
Usage
Integration in Your Project
from agent_flows_builder import create_flow_builder_agent
# Required API configuration
REALTIMEX_BASE_PATH = "https://your-api-endpoint.com/v1"
REALTIMEX_API_KEY = "your_secret_api_key"
# Create the agent
agent = create_flow_builder_agent(
realtimex_ai_base_path=REALTIMEX_BASE_PATH,
realtimex_ai_api_key=REALTIMEX_API_KEY,
)
# Build a workflow from natural language
result = agent.invoke({
"messages": [{"role": "user", "content": "Create a workflow that gets news from an API, analyzes it with AI, and posts summaries to Slack"}]
})
# Access the generated workflow files
files = result.get("files", {})
if "flow.json" in files:
flow_config = files["flow.json"] # Your complete workflow configuration
# Stream responses for real-time feedback
for chunk in agent.stream({"messages": [{"role": "user", "content": "Build API workflow"}]}):
if "messages" in chunk:
print(chunk["messages"][-1].content)
Interactive Development
# Start development server with graph visualization
langgraph dev
Example Workflows
The agent can build workflows for:
- API Integration: Fetch data → Process → Deliver
- Content Analysis: Scrape → Analyze → Summarize → Distribute
- Data Processing: Import → Transform → Validate → Export
- Notification Systems: Monitor → Evaluate → Alert → Log
Development
Environment Setup
# Install with development dependencies
uv sync --group dev
# Activate environment
uv shell
Development Server
# Start interactive development with graph visualization
langgraph dev
# This provides:
# - Interactive agent testing
# - Graph execution visualization
# - State inspection
# - Real-time debugging
Code Quality
# Format code
uv run ruff format .
# Check types
uv run mypy agent_flows_builder/
# Run linter
uv run ruff check .
# Run tests
uv run pytest
Project Structure
agent_flows_builder/
├── agents/ # Master agent factory and specialist builders
├── checkpointers/ # Checkpointer implementations (e.g., SQLite)
├── config/ # Provider configuration models
├── prompts/ # Prompt templates for the master and specialists
├── resources/ # Bundled documentation and workspace helpers
├── tools/ # Filesystem, validation, and discovery tools
├── utils/ # Shared utilities (file ops, model helpers)
├── settings.py # Typed runtime settings facade
Adding Features
Custom Tools
from langchain.tools import tool
@tool
def custom_workflow_tool(input: str) -> str:
"""Tool description for agent"""
# Implementation
return result
Agent Configuration
from deepagents import create_deep_agent
agent = create_deep_agent(
tools=[your_tools],
instructions=your_prompt,
subagents=[specialized_agents] # Optional
)
Testing
# Run all tests
uv run pytest
# Test specific workflow patterns
uv run pytest tests/test_workflow_patterns.py
# With coverage
uv run pytest --cov=agent_flows_builder
Code Conventions
- Type Hints: Required for all functions
- Docstrings: Google-style for public APIs
- Error Handling: Explicit error types with context
- Tool Naming: Descriptive names for agent clarity
Contributing
- Follow existing patterns in codebase
- Test with real workflow examples
- Ensure agent-readable documentation
- Validate generated workflows work correctly
- Use
langgraph devfor interactive development
Built with Deep Agents
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file realtimex_agent_flows_builder-0.4.1.tar.gz.
File metadata
- Download URL: realtimex_agent_flows_builder-0.4.1.tar.gz
- Upload date:
- Size: 51.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85cf39ce3776ada2b6b29c5badf10c6f7e622ed54e0991388e152d1a695fdd10
|
|
| MD5 |
ae15c8c037b598ecd6c40c50fedc19ae
|
|
| BLAKE2b-256 |
8cbc0b89ce319fe4a6d8d235a31b7b36078a67b180380cedc0ab8dc009f73058
|
File details
Details for the file realtimex_agent_flows_builder-0.4.1-py3-none-any.whl.
File metadata
- Download URL: realtimex_agent_flows_builder-0.4.1-py3-none-any.whl
- Upload date:
- Size: 77.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afc0f2ed99645ce9f7cdbf4a91ff17c3389c57919fa22bb2d8cdd19be4472e85
|
|
| MD5 |
debec4219dc0563bb19b4cd7e5ee48bd
|
|
| BLAKE2b-256 |
9cfb99f41716660ebbcade5431a1ca83fbb493a60696353398527776c3ce26f2
|