Skip to main content
Create an Agent, set one API key, and run it in three lines of code.
The fastest way to get the CLI is the one-line installer (isolated managed env, PATH wired for you):
Long-lived installs show a non-blocking “update available” hint on start (text mode only) — it never blocks or hits the network at start-up. Opt out with export PRAISONAI_NO_UPDATE_CHECK=1, and keep current with praisonai upgrade.
Pick the provider whose key you already have — PraisonAI selects the matching model automatically.

Basic

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:
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:
For the absolute shortest Python entry point — no class instantiation — use praisonai.run("agents.yaml"). See the one-liner guide.
4

Run Agents

Execute your script:
You’ll see:
  • Agent initialization
  • Task execution progress
  • Final results
You have successfully CreatedAI Agents and made them work for you!
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
Don’t have an OpenAI key? PraisonAI picks a default model that matches whichever provider credential you do have set — set ANTHROPIC_API_KEY, GEMINI_API_KEY, GROQ_API_KEY, or run a local OLLAMA_HOST and the same praisonai command works without --model. Full precedence.

Advanced

Providing Detailed Tasks to Agents (Optional)

1

Install PraisonAI

Install the core package:
Terminal
2

Configure Environment

Terminal
Generate your OpenAI API key from OpenAI Use other LLM providers like Ollama, Anthropic, Groq, Google, etc. Please refer to the Models for more information.
3

Create Agent

Create app.py:
4

Start Agents

Execute your script:
Terminal
You should see:
  • Agent initialization
  • Agents progress
  • Final results
  • Generated report

Creating Custom Tool for Agents (Optional)

Tools makes the Agent powerful.
More information about tools can be found in the Tools section.
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

Export OPENAI_API_KEY (or your provider’s key) in your shell or a .env file. Never paste the raw string into Agent(llm=...).
Agent(instructions="…").start() is the shortest working agent. Add name, role, tools, or a full Task only when you need them.
PraisonAI picks the right default for whichever provider credential you set. See Provider Auto-Detection.
Give an agent a plain Python function via tools=[...] when it needs to search, fetch, or compute. Keep tool functions small and typed.

Models

Choose an LLM provider and model.

Tools

Extend agents with functions and integrations.