CLI
Using the Command Line Interface
The Peeps AI Command-Line Interface (CLI) is a powerful tool designed to simplify the process of creating, managing, and running workflows. Whether you're orchestrating simple automations or complex multi-agent systems, the CLI provides a streamlined, efficient way to control your Peeps AI projects.
Prerequisites
Before running a workflow, ensure that:
Python 3.10 - 3.12 is installed on your system.
Peeps AI is installed via:
Your project structure is set up correctly with agents and tasks defined in YAML configuration files.
Project Initialization
To start a new Peeps AI project:
This command generates a project folder with the essential files:
agents.yaml
- Defines AI agents and their roles.tasks.yaml
- Outlines the tasks each agent will handle.group.py
&main.py
- Core Python files for defining group logic and running workflows.
Basic CLI Commands
Running a Workflow
The primary command to execute your workflow:
This will trigger the workflow as defined in your configuration files. Alternatively, you can run directly with Python:
Specifying Input Parameters
You can pass dynamic inputs to your agents:
This allows for flexible task execution based on real-time data.
Verbose Mode
To enable detailed logging during workflow execution:
Verbose mode is helpful for debugging complex workflows, as it provides step-by-step logs of agent interactions and task progress.
Managing Workflows
Listing Available Groups
Displays all defined groups within your project.
Inspecting Group Details
Provides details about agents, tasks, and configurations within a specific group.
Running Specific Tasks
If you want to execute a specific task without running the entire workflow:
This is useful for testing individual components during development.
Advanced CLI Features
Custom Configuration Files
Override default settings with custom configurations:
This enables you to run the same workflow with different agent behaviors or task definitions.
Parallel Execution
Leverage multi-agent parallelism:
This command allows tasks to run concurrently, reducing execution time for large workflows.
Error Handling and Troubleshooting
Common Error:
ModuleNotFoundError: No module named 'tiktoken'
Fix: Install missing dependencies:
Workflow Crashes: Check the logs with:
This provides detailed error traces to identify issues quickly.
Automating Workflow Execution
For continuous deployment or automation pipelines, integrate Peeps AI workflows with cron jobs or CI/CD systems:
This runs the workflow every hour and logs outputs for monitoring.
Last updated