Skip to main content
The top-level Agent(max_budget=...) shortcut was removed (PraisonAI PR #1642). Use execution=ExecutionConfig(max_budget=...) — see CLI budget handling.
Set a hard USD limit on agent runs with ExecutionConfig:
from praisonaiagents import Agent, ExecutionConfig

agent = Agent(
    name="Researcher",
    instructions="You research topics thoroughly",
    execution=ExecutionConfig(max_budget=0.50),
)

agent.start("Research the history of AI")
When the cap is exceeded, PraisonAI raises BudgetExceededError with the agent name and spend totals. The CLI surfaces a clean message — details in CLI budget handling.