You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PraisonAI PR #1642 (merged 2026-05-09 21:44 UTC) reverts#1635, which had fixed #1627. The revert was merged ~47 seconds after Docs issue #330 was filed, so #330 (which asked to document the now-removed features) is stale and must not be implemented as written.
This new issue replaces #330. It documents the post-revert state and the (much smaller) doc work that's actually needed.
What the revert removed
PR #1642 (29 additions / 101 deletions across 2 files) removed the following from main of MervinPraison/PraisonAI:
src/praisonai/praisonai/cli/main.py no longer has _execute_agent_with_budget_handling(). All agent.start(...) / agent.chat(...) calls across CLI display modes (silent, quiet, verbose, debug, jsonl, json, editor, default) are back to direct calls. Budget errors will once again surface as full Python tracebacks in the praisonai CLI.
3. What is still in the SDK (unchanged)
Item
Location
Status
ExecutionConfig.max_budget
praisonaiagents/config/feature_configs.py:741
✅ Still works — the canonical API
ExecutionConfig.on_budget_exceeded
praisonaiagents/config/feature_configs.py:743-744
✅ Still works
BudgetExceededError class
praisonaiagents/errors.py:114
✅ Exported from top-level package (from praisonaiagents import BudgetExceededError)
All occurrences are inside ExecutionConfig(...) — i.e. the docs already match the post-revert SDK.
Required documentation work
Task A — Close / supersede issue #330 (administrative)
Important
Issue #330 was filed against PR #1635, which has now been reverted. Any agent that picks up #330 will produce code that fails with TypeError. This issue (the one you are reading) supersedes #330.
Task B — Verification pass on docs/concepts/budget.mdx (HUMAN-APPROVED)
Per AGENTS.md §1.8, docs/concepts/ is HUMAN-ONLY. AI agents must not edit this file. The verification below is for a human reviewer.
The page is already correct (uses Agent(execution=ExecutionConfig(max_budget=...)) everywhere). Optional polish a human may apply:
Add a small "Common mistakes" callout in docs/concepts/budget.mdx near the Quick Start, since users frequently try the (non-existent) shortcut first — this was the root cause of #1627:
<Warning>
`max_budget` is **not** a direct `Agent()` parameter. It must live inside
`ExecutionConfig`:
```python# ❌ Wrong — raises TypeError
Agent(name="R", instructions="...", max_budget=0.50)
# ✅ Correct
Agent(name="R", instructions="...",
execution=ExecutionConfig(max_budget=0.50))
```
Add a CLI-behaviour note clarifying that, when running through the praisonai CLI, a BudgetExceededError currently surfaces as a Python traceback — users who want a clean message must catch it in their own code (example already present at lines 124-139).
Task C — docs/features/ (AI agent may proceed if directed)
No new feature page is needed. Do not create docs/features/agent-max-budget.mdx (this was Task 1 of #330) — the underlying parameter no longer exists.
If an AI agent has already created such a page on a feature branch following #330, it must be deleted before that branch is merged.
Task D — Other pages
Tasks 2a / 2b / 2c from #330 (adding max_budget/on_budget_exceeded rows to execution-config.mdx, agent-config.mdx, cli-reference.mdx) were optional improvements not directly tied to PR #1635. They could still be useful as standalone "complete the ExecutionConfig reference" work — but if any of those edits explicitly mention the now-removed top-level Agent(max_budget=...) shortcut or the now-removed clean CLI handler, they must be reworded to use ExecutionConfig only and to acknowledge that CLI budget errors currently surface as tracebacks.
Track those reference-completeness improvements in a separate issue, not here.
No file in the repo mentions Agent(max_budget=...) as a usable API (verified via grep -rn "Agent(.*max_budget" docs/ features/ returning no hits in code blocks where ExecutionConfig is absent)
docs/concepts/budget.mdx left untouched by AI agents (HUMAN-APPROVED folder); a human optionally applies the two callouts in Task B
SDK ground truth: praisonaiagents/agent/agent.py (no max_budget kwarg), praisonaiagents/config/feature_configs.py (ExecutionConfig.max_budget still present), praisonaiagents/errors.py (BudgetExceededError still exported)
Source change
PraisonAI PR #1642 (merged 2026-05-09 21:44 UTC) reverts #1635, which had fixed #1627. The revert was merged ~47 seconds after Docs issue #330 was filed, so #330 (which asked to document the now-removed features) is stale and must not be implemented as written.
This new issue replaces #330. It documents the post-revert state and the (much smaller) doc work that's actually needed.
What the revert removed
PR #1642 (29 additions / 101 deletions across 2 files) removed the following from
mainofMervinPraison/PraisonAI:1. Top-level
Agent(max_budget=...)parameter — GONEsrc/praisonai-agents/praisonaiagents/agent/agent.pyno longer hasmax_budgetinAgent.__init__. Any code written against PR #1635 will now raise:The synced copy here (
praisonaiagents/agent/agent.py) was already pre-#1635 and stays that way — verified at lines 540-558:2. CLI graceful
BudgetExceededErrorhandler — GONEsrc/praisonai/praisonai/cli/main.pyno longer has_execute_agent_with_budget_handling(). Allagent.start(...)/agent.chat(...)calls across CLI display modes (silent,quiet,verbose,debug,jsonl,json,editor, default) are back to direct calls. Budget errors will once again surface as full Python tracebacks in thepraisonaiCLI.3. What is still in the SDK (unchanged)
ExecutionConfig.max_budgetpraisonaiagents/config/feature_configs.py:741ExecutionConfig.on_budget_exceededpraisonaiagents/config/feature_configs.py:743-744BudgetExceededErrorclasspraisonaiagents/errors.py:114from praisonaiagents import BudgetExceededError)praisonaiagents/agent/agent.py:970, 1662-1663(_max_budget)Result: budget functionality itself is intact — only the convenience shortcut and CLI UX polish were removed.
Doc audit — what already exists
max_budget?docs/concepts/budget.mdxAgent(execution=ExecutionConfig(max_budget=...)). Never showsAgent(max_budget=...)direct usage.docs/concepts/execution.mdxdocs/configuration/execution-config.mdxdocs/configuration/agent-config.mdxdocs/cli/cli-reference.mdxAll occurrences are inside
ExecutionConfig(...)— i.e. the docs already match the post-revert SDK.Required documentation work
Task A — Close / supersede issue #330 (administrative)
Important
Issue #330 was filed against PR #1635, which has now been reverted. Any agent that picks up #330 will produce code that fails with
TypeError. This issue (the one you are reading) supersedes #330.Agent(max_budget=...)convenience parameter & clean CLI BudgetExceededError handling (PraisonAI PR #1635) #330 with a comment linking here and to PR #1642.Agent(max_budget=...)convenience parameter & clean CLI BudgetExceededError handling (PraisonAI PR #1635) #330, close it without merging.Task B — Verification pass on
docs/concepts/budget.mdx(HUMAN-APPROVED)The page is already correct (uses
Agent(execution=ExecutionConfig(max_budget=...))everywhere). Optional polish a human may apply:Add a small "Common mistakes" callout in
docs/concepts/budget.mdxnear the Quick Start, since users frequently try the (non-existent) shortcut first — this was the root cause of #1627:Add a CLI-behaviour note clarifying that, when running through the
praisonaiCLI, aBudgetExceededErrorcurrently surfaces as a Python traceback — users who want a clean message must catch it in their own code (example already present at lines 124-139).Task C —
docs/features/(AI agent may proceed if directed)No new feature page is needed. Do not create
docs/features/agent-max-budget.mdx(this was Task 1 of #330) — the underlying parameter no longer exists.If an AI agent has already created such a page on a feature branch following #330, it must be deleted before that branch is merged.
Task D — Other pages
Tasks 2a / 2b / 2c from #330 (adding
max_budget/on_budget_exceededrows toexecution-config.mdx,agent-config.mdx,cli-reference.mdx) were optional improvements not directly tied to PR #1635. They could still be useful as standalone "complete theExecutionConfigreference" work — but if any of those edits explicitly mention the now-removed top-levelAgent(max_budget=...)shortcut or the now-removed clean CLI handler, they must be reworded to useExecutionConfigonly and to acknowledge that CLI budget errors currently surface as tracebacks.Track those reference-completeness improvements in a separate issue, not here.
Acceptance criteria
Agent(max_budget=...)convenience parameter & clean CLI BudgetExceededError handling (PraisonAI PR #1635) #330 closed with a comment pointing to PR #1642 and this issueAgent(max_budget=...)as a usable API (verified viagrep -rn "Agent(.*max_budget" docs/ features/returning no hits in code blocks whereExecutionConfigis absent)docs/concepts/budget.mdxleft untouched by AI agents (HUMAN-APPROVED folder); a human optionally applies the two callouts in Task Bdocs/features/agent-max-budget.mdxAgent(max_budget=...)convenience parameter & clean CLI BudgetExceededError handling (PraisonAI PR #1635) #330, it is closed without mergingdocs.jsonunchanged by this issue (no new entries)References
Agent(max_budget=...)convenience parameter & clean CLI BudgetExceededError handling (PraisonAI PR #1635) #330docs/concepts/budget.mdxpraisonaiagents/agent/agent.py(nomax_budgetkwarg),praisonaiagents/config/feature_configs.py(ExecutionConfig.max_budgetstill present),praisonaiagents/errors.py(BudgetExceededErrorstill exported)