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
Marketing code shows Agent(..., self_reflect=True, reasoning=True, max_reflect=3). Current Agent.__init__ rejects self_reflect and max_reflect; reasoning is not a documented top-level Agent kwarg in the same sense as this snippet implies.
Root cause
Legacy reflection parameters were consolidated into reflection= / ReflectionConfig (see Agent docstring). Public marketing page still shows pre-consolidation API.
Impact
First-touch users copy from homepage and immediately hit TypeError — highest visibility failure mode.
Fix
PraisonAIDocs — rewrite snippet to reflection=True or reflection=ReflectionConfig(max_iterations=3, ...). Clarify relationship to output / reasoning_steps if “reasoning” is meant as CoT display (different subsystem).
Note: max_iterations on config — docs/marketing used max_reflect=3 naming; align prose to ReflectionConfig field names or use reflection=True shorthand.
flowchart LR
subgraph Legacy["home.mdx (today)"]
L1["self_reflect="]
L2["max_reflect="]
L3["reasoning="]
end
subgraph Modern["Agent public API"]
R1["reflection=True"]
R2["reflection=ReflectionConfig(...)"]
end
Legacy -->|kwargs| X["TypeError"]
R1 --> OK["Valid"]
R2 --> OK
Loading
3. “Reasoning” naming — avoid conflation
The homepage text mixes self-reflection loops with “chain-of-thought” reasoning.
In Agent, verbose / reasoning display is primarily an output= concern (reasoning_steps, etc.), not the same parameter as reflection= (post-hoc self-critique iterations).
Suggested doc architecture:
flowchart TB
subgraph Reflection["reflection= / ReflectionConfig"]
R["Post-response critique iterations"]
end
subgraph Output["output= / OutputConfig"]
O["Inline reasoning_steps / stream / verbose"]
end
HomeSnippet["home.mdx snippet"] --> Fix1["Use reflection= for self_reflect/max_reflect story"]
HomeText["home.mdx prose"] --> Fix2["Separate bullets: reflection vs output reasoning"]
frompraisonaiagentsimportAgentagent=Agent(
name="analyst",
instructions="You analyze data carefully.",
reflection=True,
)
With iteration cap:
frompraisonaiagentsimportAgent, ReflectionConfigagent=Agent(
name="analyst",
instructions="You analyze data carefully.",
reflection=ReflectionConfig(max_iterations=3),
)
If CoT display is required in the same accordion, add a second small snippet using output= / preset, with a sentence explaining it is not the same as reflection=.
7. Acceptance criteria
No self_reflect=, max_reflect= on Agent in home.mdx unless reintroduced in SDK (then version-gate).
reasoning=True removed or mapped to a real parameter (output=…) with explicit explanation.
Copy-paste of the accordion snippet constructsAgent without TypeError on documented praisonaiagents.
1. Executive summary
Agent(..., self_reflect=True, reasoning=True, max_reflect=3). CurrentAgent.__init__rejectsself_reflectandmax_reflect;reasoningis not a documented top-levelAgentkwarg in the same sense as this snippet implies.reflection=/ReflectionConfig(seeAgentdocstring). Public marketing page still shows pre-consolidation API.TypeError— highest visibility failure mode.reflection=Trueorreflection=ReflectionConfig(max_iterations=3, ...). Clarify relationship to output / reasoning_steps if “reasoning” is meant as CoT display (different subsystem).2. Architecture — reflection subsystem on
Agent2.1 Public constructor contract
File:
praisonaiagents/agent/agent.pyDocstring consolidation map (excerpt):
So
self_reflect,max_reflect, etc. are not independentAgentkwargs; they flow throughreflection=.2.2
ReflectionConfigshapeFile:
praisonaiagents/config/feature_configs.pyNote:
max_iterationson config — docs/marketing usedmax_reflect=3naming; align prose toReflectionConfigfield names or usereflection=Trueshorthand.flowchart LR subgraph Legacy["home.mdx (today)"] L1["self_reflect="] L2["max_reflect="] L3["reasoning="] end subgraph Modern["Agent public API"] R1["reflection=True"] R2["reflection=ReflectionConfig(...)"] end Legacy -->|kwargs| X["TypeError"] R1 --> OK["Valid"] R2 --> OK3. “Reasoning” naming — avoid conflation
The homepage text mixes self-reflection loops with “chain-of-thought” reasoning.
In
Agent, verbose / reasoning display is primarily anoutput=concern (reasoning_steps, etc.), not the same parameter asreflection=(post-hoc self-critique iterations).Suggested doc architecture:
flowchart TB subgraph Reflection["reflection= / ReflectionConfig"] R["Post-response critique iterations"] end subgraph Output["output= / OutputConfig"] O["Inline reasoning_steps / stream / verbose"] end HomeSnippet["home.mdx snippet"] --> Fix1["Use reflection= for self_reflect/max_reflect story"] HomeText["home.mdx prose"] --> Fix2["Separate bullets: reflection vs output reasoning"]4. Doc inventory — failing block
File:
docs/home.mdx— “🧠 Self-Reflection & Reasoning” accordion (~L83–90)5. Reproduction
6. Suggested replacement (illustrative — verify product wording)
Minimal:
With iteration cap:
If CoT display is required in the same accordion, add a second small snippet using
output=/ preset, with a sentence explaining it is not the same asreflection=.7. Acceptance criteria
self_reflect=,max_reflect=onAgentinhome.mdxunless reintroduced in SDK (then version-gate).reasoning=Trueremoved or mapped to a real parameter (output=…) with explicit explanation.AgentwithoutTypeErroron documentedpraisonaiagents.8. References
praisonaiagents/agent/agent.py—reflection=param + consolidation notepraisonaiagents/config/feature_configs.py—ReflectionConfigdocs/concepts/reflection.mdx(if present) — cross-link for long-form9. Suggested labels
documentation,bug,homepage,reflection,dx