Skip to content
galimayPublic

About

Python library and CLI tool designed to programmatically create and manage AI workflows.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

p8n

p8n is a Python library and CLI tool designed to programmatically create and manage AI workflows. Inspired by tools like n8n but without a visual interface, p8n empowers developers, data scientists, and machine learning engineers to define, orchestrate, and automate complex AI tasks directly within their Python applications.

Features

  • Workflow Definition: Define AI workflows using intuitive Python code.
  • Task Orchestration: Manage the execution order and dependencies of AI tasks seamlessly.
  • Integration with AI Services: Connect to a variety of AI models and services (e.g., OpenAI, Hugging Face).
  • Extensibility: Easily define custom AI tasks and integrate new services.
  • CLI Tool: Run and manage your AI workflows directly from the command line.

Installation

To install p8n, you'll need Python 3.12+ and Poetry.

  1. Clone the repository:

    git clone https://github.com/your-username/p8n.git
    cd p8n
  2. Install dependencies using Poetry:

    poetry install
  3. Activate the virtual environment:

    poetry shell

Usage

Library

Here's a quick example of how to define a simple workflow using the p8n library:

from p8n.workflow import Workflow
from p8n.tasks import OpenAITextGenerationTask

# Define a new workflow
workflow = Workflow(name="MyFirstAIWorkflow")

# Add tasks to the workflow
text_generation_task = OpenAITextGenerationTask(
    name="GenerateGreeting",
    prompt="Write a friendly greeting message."
)
workflow.add_task(text_generation_task)

# You can then execute the workflow
# result = workflow.run()
# print(result)

(Note: The actual API for defining and running workflows is under development and may change.)

CLI Tool

The p8n CLI tool allows you to run and manage your workflows from the command line.

To run a workflow defined in a Python file:

p8n run my_workflow_file.py

About

Python library and CLI tool designed to programmatically create and manage AI workflows.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages