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
Docs:docs/reference/parameter-resolution.mdx SDK:praisonaiagents.agent.agent.Agent + praisonaiagents.config.param_resolver.resolve Kind: Documentation / API contract drift (not an SDK defect)
1. Executive summary
Field
Content
Symptom
Examples #4–#6 in the memory “progression” code block raise TypeError when pasted against current praisonaiagents.
Root cause
The docs describe generic “array / dict / MemoryConfig” patterns that do not match how memory= is actually resolved on Agent: list form uses ArrayMode.SINGLE_OR_LIST, dict keys are strictly validated against MemoryConfig fields, and MemoryConfig has backend not provider.
Impact
Readers treat this page as the canonical explanation of unified parameters; broken examples undermine resolve() documentation everywhere else.
Fix location
PraisonAIDocs only (unless product intentionally changes resolver — then PraisonAI ADR + docs together).
File:docs/reference/parameter-resolution.mdx (approximate line numbers from a recent main checkout)
#
Lines (approx)
Snippet
Failure mode
4
~47–48
memory=["redis", {"port": 6380}]
SINGLE_OR_LIST — multiple list items
5
~50–51
memory={"provider": "redis", "port": 6380}
Unknown dict keys
6
~53–54
MemoryConfig(provider="redis", port=6380)
Invalid dataclass kwargs
Examples #1–#3 in the same block (bool, string preset, URL) align with resolver behavior in spot checks — keep unless versions drift.
6. Reproduction (minimal)
frompraisonaiagentsimportAgent, MemoryConfigAgent(name="a", instructions="x", memory=["redis", {"port": 6380}])
# TypeError: Multiple values not allowed for memory...Agent(name="a", instructions="x", memory={"provider": "redis", "port": 6380})
# TypeError: Unknown keys for memory: ['provider', 'port']...Agent(name="a", instructions="x", memory=MemoryConfig(provider="redis", port=6380))
# TypeError: MemoryConfig.__init__() got an unexpected keyword argument 'provider'
7. Gap analysis
ID
Gap
Severity
Notes
G1
Doc implies preset + override array for memory on Agent
High
Contradicts SINGLE_OR_LIST for this param
G2
Doc uses provider/port dict keys
High
Must use backend + optional config
G3
MemoryConfig(provider=...)
High
API is backend=
G4
Unified table row for memory lists “[preset, {overrides}]”
Medium
Table may describe other params’ array modes, not memory
8. Suggested resolutions (pick one strategy)
Option A — Doc-only alignment (recommended)
Replace handoff #4 with a single supported pattern (e.g. URL string, memory="redis", or MemoryConfig with valid fields) or explicitly state: “Agent does not support [preset, overrides] for memory; use MemoryConfig + valid keys.”
Replace create all these missing modules #5 with dict using only MemoryConfig field names; put connection details under config if needed (confirm with resolver + tests).
Update Unified Parameter Table so the memory / Array column matches SINGLE_OR_LIST reality.
Option B — Product change (out of scope for this issue)
If PRESET_OVERRIDE for memory lists is desired, that requires PraisonAI change (array_mode for this resolve() call), release notes, migration guide — separate epic.
9. Boundary — what this issue is not
Not claiming memory="redis" or URL strings are broken.
Not requesting changes to MEMORY_PRESETS without an ADR.
Not about knowledge= or reflection= (tracked in separate doc issues if needed).
10. Acceptance criteria
Examples handoff #4–create all these missing modules #6 either run on the documented praisonaiagents version or are explicitly labeled unsupported with pointer to supported patterns.
MemoryConfig examples use only real constructor fields.
1. Executive summary
memory“progression” code block raiseTypeErrorwhen pasted against currentpraisonaiagents.memory=is actually resolved onAgent: list form usesArrayMode.SINGLE_OR_LIST, dict keys are strictly validated againstMemoryConfigfields, andMemoryConfighasbackendnotprovider.resolve()documentation everywhere else.2. Architectural context — unified
resolve()pipelinepraisonaiagentscentralizes consolidated parameters (memory,knowledge,reflection, …) throughresolve()inparam_resolver.py.flowchart TB subgraph Input["memory= value"] B[bool] S[str preset / URL] L[list / tuple] D[dict] C[MemoryConfig instance] I[Memory-like instance] end subgraph Agent["Agent.__init__"] FP["Fast path: True / False / MemoryConfig / instance"] RV["resolve(..., param_name='memory', ...)"] end Input --> Agent RV --> R["param_resolver.resolve"] R --> M["MemoryConfig or backend / config extraction"]Design intent (from
param_resolver.pyheader):ArrayModeselects list semantics (SINGLE_OR_LIST,PRESET_OVERRIDE,SOURCES, …) per parameter, not one global rule.3. What
Agentactually does formemoryFile:
PraisonAI/src/praisonai-agents/praisonaiagents/agent/agent.pyAfter fast paths (
memory is True→MemoryConfig(),MemoryConfiginstance, memory-like instance), the generic branch calls:Critical design fact:
memorylists useArrayMode.SINGLE_OR_LIST, notPRESET_OVERRIDE.So
memory=["redis", {"port": 6380}](two list items) hits_resolve_array→SINGLE_OR_LISTbranch →TypeError: multiple values not allowed.flowchart LR subgraph DocClaim["parameter-resolution.mdx implies"] A1["memory = [preset, overrides_dict]"] end subgraph Actual["Agent memory resolve"] A2["array_mode = SINGLE_OR_LIST"] end A1 -->|copy-paste| X["TypeError"] A2 --> X4.
MemoryConfigcontract (dict + dataclass)File:
PraisonAI/src/praisonai-agents/praisonaiagents/config/feature_configs.pyValid dataclass fields include
backend,user_id,session_id,config,learn,history, … — notproviderorportas top-level kwargs.Dict shorthand is validated with
_validate_dict_keysagainst that dataclass →provider/portare unknown keys.flowchart TB subgraph Allowed["Valid MemoryConfig surface"] BE["backend: str | MemoryBackend"] CF["config: dict (provider-specific)"] UID["user_id / session_id / ..."] end subgraph Rejected["Doc examples #5–#6"] P["provider= / port= on MemoryConfig(...)"] D2["dict keys provider, port"] end Rejected --> E["TypeError"]5. Doc inventory — failing lines
File:
docs/reference/parameter-resolution.mdx(approximate line numbers from a recentmaincheckout)memory=["redis", {"port": 6380}]SINGLE_OR_LIST— multiple list itemsmemory={"provider": "redis", "port": 6380}MemoryConfig(provider="redis", port=6380)Examples #1–#3 in the same block (
bool, string preset, URL) align with resolver behavior in spot checks — keep unless versions drift.6. Reproduction (minimal)
7. Gap analysis
memoryonAgentSINGLE_OR_LISTfor this paramprovider/portdict keysbackend+ optionalconfigMemoryConfig(provider=...)backend=memorylists “[preset, {overrides}]”memory8. Suggested resolutions (pick one strategy)
Option A — Doc-only alignment (recommended)
memory="redis", orMemoryConfigwith valid fields) or explicitly state: “Agentdoes not support[preset, overrides]formemory; useMemoryConfig+ valid keys.”MemoryConfigfield names; put connection details underconfigif needed (confirm with resolver + tests).MemoryConfig(backend=..., user_id=..., config={...})as appropriate.memory/ Array column matchesSINGLE_OR_LISTreality.Option B — Product change (out of scope for this issue)
If
PRESET_OVERRIDEformemorylists is desired, that requiresPraisonAIchange (array_modefor thisresolve()call), release notes, migration guide — separate epic.9. Boundary — what this issue is not
memory="redis"or URL strings are broken.MEMORY_PRESETSwithout an ADR.knowledge=orreflection=(tracked in separate doc issues if needed).10. Acceptance criteria
praisonaiagentsversion or are explicitly labeled unsupported with pointer to supported patterns.MemoryConfigexamples use only real constructor fields.Unified Parameter Tablememoryrow matchesAgentarray_mode+ dict validation.MemoryConfigreference /memoryconcept doc.11. References
praisonaiagents/agent/agent.py—memory→resolve(..., array_mode=ArrayMode.SINGLE_OR_LIST)praisonaiagents/config/param_resolver.py—resolve,_resolve_array,ArrayModepraisonaiagents/config/feature_configs.py—MemoryConfigdocs/reference/parameter-resolution.mdx— edit target12. Suggested labels
documentation,bug,sdk,memory,api-parity,reference