PATH wired for you):
Basic
- Code
- No Code
- JavaScript
- TypeScript
1
Install Package
Install the PraisonAI Agents package:
2
Set API Key
Set the key for whichever provider you use — PraisonAI picks the right model automatically:
- OpenAI
- Anthropic
- Gemini
- Groq
- Ollama
No
--model flag needed — the matching provider’s default model is selected automatically. See Provider Auto-Detection for the full list.3
Create Agents
Create
app.py:4
Run Agents
Execute your script:You’ll see:
- Agent initialization
- Task execution progress
- Final results
Prerequisites
- Python 3.10 or higher
- An API key for any supported provider (OpenAI, Anthropic, Google, Groq, Cohere) or a running Ollama instance — OpenAI is not required
- For the full list of providers, see Models
Advanced
Providing Detailed Tasks to Agents (Optional)
- Code
- No Code
1
Install PraisonAI
Install the core package:
Terminal
2
3
Create Agent
Create
app.py:4
Start Agents
Execute your script:You should see:
Terminal
- Agent initialization
- Agents progress
- Final results
- Generated report
Creating Custom Tool for Agents (Optional)
Tools makes the Agent powerful.
- Code
- No Code
1
Install PraisonAI
Install the core package and duckduckgo_search package:
Terminal
2
Create Tools and Agents
3
Start Agents
Run your script:
Terminal
How It Works
An Agent takes your instructions, calls the LLM behind the scenes, and returns the result.Best Practices
Set keys in your shell, never inline
Set keys in your shell, never inline
Export
OPENAI_API_KEY (or your provider’s key) in your shell or a .env file. Never paste the raw string into Agent(llm=...).Start with the shortest shape
Start with the shortest shape
Agent(instructions="…").start() is the shortest working agent. Add name, role, tools, or a full Task only when you need them.Skip --model on first runs
Skip --model on first runs
PraisonAI picks the right default for whichever provider credential you set. See Provider Auto-Detection.
Add tools progressively
Add tools progressively
Give an agent a plain Python function via
tools=[...] when it needs to search, fetch, or compute. Keep tool functions small and typed.Related
Models
Choose an LLM provider and model.
Tools
Extend agents with functions and integrations.

