Skip to main content

The AI Workflow Cross-Platform Engine

Project description

AutoAgents Graph

The AI Workflow Cross-Platform Engine

English | 简体中文

PyPI version License MIT

Table of Contents

Why Choose AutoAgents Graph?

AutoAgents Graph is a revolutionary AI workflow cross-platform engine that allows you to freely convert workflows between different AI platforms through a unified API. It enables seamless navigation through complex AI ecosystems with intelligent workflow orchestration.

  • Zero Learning Curve: Unified API design - learn once, use everywhere
  • Type Safety: Complete type validation based on Pydantic, ensuring secure workflow transmission
  • Platform Compatibility: Supports mainstream platforms like Dify, Agentify, with continuous expansion
  • Intelligent Conversion: Automatic node type recognition and conversion, with precise workflow translation

Quick Start

System Requirements

  • Python 3.11+
  • pip or poetry

Installation & Setup

# 1. Clone the repository
git clone https://github.com/forhheart/autoagents-graph.git
cd autoagents-graph

# 2. Install dependencies
pip install -e .

# 3. Quick experience
cd playground/text2workflow
python test_text2workflow.py

Basic Usage

AutoAgents Graph provides three main usage patterns:

Text2Workflow - Cross-Platform Converter

from src.Text2Workflow import Text2Workflow
from src.dify import DifyStartState, DifyLLMState, DifyEndState, START, END

# Create Dify platform workflow
workflow = Text2Workflow(
    platform="dify",
    app_name="Smart Assistant"
)

# Add nodes
workflow.add_node(id=START, state=DifyStartState(title="Start"))
workflow.add_node(id="ai", state=DifyLLMState(title="AI Response"))
workflow.add_node(id=END, state=DifyEndState(title="End"))

# Compile workflow
workflow.compile()

FlowGraph - Agentify Native Builder

from src.agentify import FlowGraph, QuestionInputState, AiChatState

# Create Agentify workflow
flow = FlowGraph(
    personal_auth_key="your_key",
    personal_auth_secret="your_secret"
)

# Build intelligent conversation flow
flow.add_node("input", QuestionInputState(inputText=True))
flow.add_node("ai", AiChatState(model="doubao-deepseek-v3"))
flow.add_edge("input", "ai")

# Publish to platform
flow.compile("Smart Chat Assistant")

Running Examples

# Test Agentify platform functionality
cd playground/agentify
python test.py

# Test Dify platform integration
cd playground/dify
python test_dify.py

# Test cross-platform conversion
cd playground/text2workflow
python test_text2workflow.py

Architecture

Core Components

autoagents-graph/
├── src/                        # Core source code
│   ├── autoagents-graph/       # Main package
│   │   ├── agentify/          # Agentify platform engine
│   │   │   ├── FlowGraph.py   # Workflow graph builder
│   │   │   ├── NodeRegistry.py# Node registry
│   │   │   └── types/         # Node type definitions
│   │   ├── dify/              # Dify platform adapter
│   │   │   ├── DifyGraph.py   # Dify workflow builder
│   │   │   └── DifyTypes.py   # Dify node types
│   │   └── Text2Workflow.py   # Cross-platform converter
└── playground/                 # Examples and tests
    ├── agentify/              # Agentify platform examples
    ├── dify/                  # Dify platform examples
    └── text2workflow/         # Cross-platform examples

Design Philosophy

  • Unified Abstraction: Workflows from different platforms unified as node-edge graph models
  • Intelligent Adaptation: Automatic node type recognition and cross-platform conversion
  • Modular Design: Each platform independently implemented for easy extension and maintenance
  • Type Safety: Complete type system ensuring compile-time error detection

Supported Node Types

Agentify Platform Nodes

  • QuestionInputState - User input node
  • AiChatState - AI conversation node
  • ConfirmReplyState - Confirmation reply node
  • KnowledgeSearchState - Knowledge base search node
  • Pdf2MdState - Document parsing node
  • AddMemoryVariableState - Memory variable node
  • InfoClassState - Information classification node
  • CodeFragmentState - Code execution node
  • ForEachState - Loop iteration node

Dify Platform Nodes

  • DifyStartState - Start node
  • DifyLLMState - LLM node
  • DifyKnowledgeRetrievalState - Knowledge retrieval node
  • DifyEndState - End node

Contributing

We welcome community contributions! Please check the contribution guidelines for detailed processes.

Development Workflow

  1. Fork this project
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Create a Pull Request

Contribution Types

  • Bug fixes
  • New feature development
  • Documentation improvements
  • Test cases
  • Platform adapters

License

This project is licensed under the MIT License - see the LICENSE file for details.

If you have any questions or suggestions, please contact us through Issues.

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

autoagents_graph-0.1.2.tar.gz (51.4 kB view details)

Uploaded Source

Built Distribution

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

autoagents_graph-0.1.2-py3-none-any.whl (46.4 kB view details)

Uploaded Python 3

File details

Details for the file autoagents_graph-0.1.2.tar.gz.

File metadata

  • Download URL: autoagents_graph-0.1.2.tar.gz
  • Upload date:
  • Size: 51.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.9

File hashes

Hashes for autoagents_graph-0.1.2.tar.gz
Algorithm Hash digest
SHA256 992085d7304daf4be7a0654cb6bc39dd89afe2c90f0e34ccda913d7a7cfeac57
MD5 4268e921f1086afcaace8ae517c465b6
BLAKE2b-256 cc502329a409e6a0231d79d808c51a673161f6b5670e39a075c9f19be9a59bed

See more details on using hashes here.

File details

Details for the file autoagents_graph-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for autoagents_graph-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bf168d300edc48dbce16811ca506a02f7fb6f5b0df5ca34247250f6b0b88a715
MD5 c9994b310be2689374f130eda99db30b
BLAKE2b-256 610942faf9945e412f0c14ae16dcd624e3b76e17ab382b46628e21a4e012a55e

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