Developers
PraisonAI Package Integration
Getting Started (Code)
Features
Getting Started (No Code)
Models
Tools
- DuckDuckGo Agent
- arXiv Agent
- Calculator Agent
- CSV Agent
- DuckDB Agent
- Excel Agent
- File Agent
- JSON Agent
- Newspaper Agent
- Pandas Agent
- Python Agent
- Shell Agent
- Spider Agent
- Wikipedia Agent
- XML Agent
- YAML Agent
- YFinance Agent
- Tools
- Create Custom Tools
- PraisonAI Tools Creator GPT
- DuckDuckGo PraisonAI Integration
- Langchain Tools
- Firecrawl PraisonAI Integration
- Wikipedia PraisonAI Integration
- YouTube Search PraisonAI Integration
- Tavily PraisonAI Integration
- Reddit PraisonAI Integration
- You.com PraisonAI Integration
- Crawl4AI PraisonAI Integration
- Mem0 and PraisonAI Integration
- Composio PraisonAI Integration
- Google Calendar Tools
User Interface
Monitoring
Developers
Developers
PraisonAI Package Integration
Guide for integrating the PraisonAI package into your Python projects, including YAML configuration and different execution modes
Include praisonai package in your project
Option 1: Using RAW YAML
Copy
from praisonai import PraisonAI
# Example agent_yaml content
agent_yaml = """
framework: "crewai"
topic: "Space Exploration"
roles:
astronomer:
role: "Space Researcher"
goal: "Discover new insights about {topic}"
backstory: "You are a curious and dedicated astronomer with a passion for unraveling the mysteries of the cosmos."
tasks:
investigate_exoplanets:
description: "Research and compile information about exoplanets discovered in the last decade."
expected_output: "A summarized report on exoplanet discoveries, including their size, potential habitability, and distance from Earth."
"""
# Create a PraisonAI instance with the agent_yaml content
praisonai = PraisonAI(agent_yaml=agent_yaml)
# Run PraisonAI
result = praisonai.run()
# Print the result
print(result)
Option 2: Using separate agents.yaml file
Note: Please create agents.yaml file before hand.
Copy
from praisonai import PraisonAI
def basic(): # Basic Mode
praisonai = PraisonAI(agent_file="agents.yaml")
praisonai.run()
if __name__ == "__main__":
basic()
Other options
Copy
from praisonai import PraisonAI
def basic(): # Basic Mode
praisonai = PraisonAI(agent_file="agents.yaml")
praisonai.run()
def advanced(): # Advanced Mode with options
praisonai = PraisonAI(
agent_file="agents.yaml",
framework="autogen",
)
praisonai.run()
def auto(): # Full Automatic Mode
praisonai = PraisonAI(
auto="Create a movie script about car in mars",
framework="autogen"
)
print(praisonai.framework)
praisonai.run()
if __name__ == "__main__":
basic()
advanced()
auto()
Was this page helpful?