Project Structure
Project Structure Overview
When you create a new Peeps AI project, it’s essential to understand its directory structure and how the files work together. Peeps AI uses a modular design, ensuring your project remains organized, maintainable, and scalable. This section explains the purpose of each file and directory, giving you a solid foundation to start building sophisticated AI workflows.
Project Structure
After creating a Peeps AI project using the peepsai
CLI, your project directory will look like this:
File and Directory Breakdown
Root Directory
❖ .gitignore
Specifies which files and directories should be ignored by Git. By default, it includes files like .env
and other autogenerated content to prevent sensitive data or unnecessary files from being committed to version control.
❖ pyproject.toml
Defines your project’s dependencies and configurations. It is used for managing the Python environment, ensuring all collaborators work with the same versions of Peeps AI and its dependencies.
❖ README.md
A markdown file for documenting your project. This is where you can explain your project’s purpose, setup instructions, and usage examples. It serves as the primary reference for collaborators or users of your Peeps AI implementation.
❖ .env
A file for storing environment variables like API keys and configuration settings. Sensitive data such as OpenAI API keys or custom tool credentials should be placed here to keep them secure and separate from the codebase.
Source Directory (src/
)
src/
)All your project-specific code resides in the src/
directory. This is where the core of your Peeps AI workflows is defined.
❖ __init__.py
Initializes the my_project
module, allowing you to import its contents elsewhere in your Python environment.
❖ main.py
The main entry point of your project. This script is responsible for launching your Peeps AI workflows. It typically loads configurations, initializes agents, and starts the execution process.
Example:
❖ group.py
Defines your project’s core group logic. This is where you set up agents, tasks, and workflows. It uses Peeps AI’s decorators to define the relationships between agents and tasks.
Example:
❖ tools/
A directory for custom tools used by your agents. These tools extend the functionality of Peeps AI agents, such as connecting to external APIs or processing complex data.
custom_tool.py
: An example tool you can customize for your needs.__init__.py
: Initializes thetools
module for importing custom tools.
Configuration Directory (config/
)
config/
)This directory contains YAML configuration files for defining agents and tasks. These files allow you to decouple logic from the codebase, making it easier to update roles, goals, and workflows without modifying Python scripts.
❖ agents.yaml
Defines the roles, goals, and behaviors of your AI agents. Each agent is specified as a YAML object, allowing for simple, human-readable configurations.
Example:
❖ tasks.yaml
Specifies the tasks and workflows for your project. Tasks include descriptions, expected outputs, and the agents responsible for execution.
Example:
Extending the Structure
As your project grows, you might need additional files or directories:
data/
: For storing datasets, logs, or output files generated by tasks.tests/
: For adding automated tests to ensure your Peeps AI configurations and workflows function as expected.docs/
: For project-specific documentation beyond the main README file.
Last updated