Quick Start
Choose Your Installation
For Python SDK only:For CLI + YAML + Full Features:
Package Choice Guide:
praisonaiagents- Python SDK for building agent scriptspraisonai- CLI tools, YAML workflows, and full toolkit
Set Your OpenAI API Key
- macOS/Linux (bash/zsh)
- Windows PowerShell
- Windows Command Prompt
- .env File (Recommended)
Verify Your Setup
"openai_api_key": "pass" in the output.Windows users: Use
--json flag if text output shows encoding errors.How It Works
The agent workflow follows these steps:| Step | Description |
|---|---|
| Create | Initialize agent with instructions and configuration |
| Execute | Process user input with OpenAI’s LLM |
| Return | Format and return the response |
Configuration Options
Environment Variables
| Variable | Description | Example |
|---|---|---|
OPENAI_API_KEY | Your OpenAI API key | sk-proj-abc123... |
OPENAI_BASE_URL | Custom API endpoint (optional) | https://api.openai.com/v1 |
OPENAI_MODEL | Default model (optional) | gpt-4o-mini |
Agent Configuration
Common Patterns
Simple Q&A Agent
Agent with Memory
CLI Usage (requires pip install praisonai)
Advanced Features
- Multi-Agent Teams
- YAML Workflows
- Tools Integration
Multi-agent functionality requires the latest version. If you encounter issues, ensure you have the newest release.
Troubleshooting
'export' command not found (Windows)
'export' command not found (Windows)
Windows doesn’t recognize the Command Prompt:Permanent solution: Use a
export command. Use these alternatives:PowerShell:.env file in your project directory.'praisonai' command not found
'praisonai' command not found
This means you installed The packages serve different purposes:
praisonaiagents (Python SDK only) but need the CLI tools.Solution:praisonaiagents- Python SDK for scriptingpraisonai- CLI tools and YAML workflows
API key validation fails
API key validation fails
If
praisonai doctor env shows API key errors:- Check the key format: Should start with
sk- - Verify environment: Run
echo $OPENAI_API_KEY(bash) orecho $env:OPENAI_API_KEY(PowerShell) - Use .env file: More reliable than environment variables
- Check permissions: Ensure you have valid OpenAI credits/usage limits
Encoding errors on Windows
Encoding errors on Windows
If you see garbled text or encoding errors:
- Use JSON output: Add
--jsonflag to CLI commands - Check terminal encoding: Use Windows Terminal instead of Command Prompt
- Set encoding: Add
chcp 65001before running commands
Best Practices
Secure your API keys
Secure your API keys
- Never hardcode API keys in source code
- Use
.envfiles for local development - Set proper file permissions:
chmod 600 .env - Use environment variables in production
- Rotate keys regularly
Choose the right model
Choose the right model
- gpt-4o-mini - Fast and cost-effective for simple tasks
- gpt-4o - Best performance for complex reasoning
- gpt-3.5-turbo - Good balance of speed and capability
- Start with gpt-4o-mini and upgrade as needed
Optimize for your use case
Optimize for your use case
- Use
temperature=0for consistent, factual responses - Use
temperature=0.7-1.0for creative tasks - Set appropriate
max_tokensto control response length - Enable
memory=Truefor conversational agents
Monitor usage and costs
Monitor usage and costs
- Check your OpenAI dashboard regularly
- Set usage alerts in OpenAI console
- Use shorter prompts when possible
- Cache responses for repeated queries
Next Steps
Advanced Agent Features
Explore planning, reflection, and advanced reasoning capabilities
Multi-Agent Teams
Build collaborative agent teams for complex workflows
Tools & Integrations
Add web search, file tools, and custom integrations
Memory & Knowledge
Implement persistent memory and knowledge bases
Related
Installation Guide
Complete installation instructions for all platforms
CLI Reference
Full command-line interface documentation

