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 #2165 — fix(sdk): lazy top-level re-exports for docs-friendly imports (PraisonAIDocs #579 B.1) — merged into main at 2026-06-23T07:23:12Z. It adds the following symbols to praisonaiagents/__init__.py_LAZY_IMPORTS so docs can stop using deep import paths:
The docs side of the friendly-import migration shipped earlier in PR #798, #799, and #800 — before the SDK side had landed. The imports were dead-on-paper until 07:23 UTC today; they now actually resolve.
This issue tracks the loose ends.
A. Sanity check — verify friendly imports now resolve at runtime
Quick smoke check the next agent must run before anything else. All of these must print ok:
If any fails, file a SDK sub-issue in MervinPraison/PraisonAI per AGENTS.md §1.3 (SDK Source Verification) before continuing — do not keep deep imports in docs as a workaround.
Files that should be re-grepped to confirm no praisonaiagents.{memory,skills,knowledge,workflows,planning} deep imports remain in docs/features/:
Current grep at the time this issue was filed returned 5 matches across 2 files (covered in section B below).
B. Remaining deep imports — MIGRATE to friendly form
B.1 docs/features/prompt-caching.mdx — Memory is now top-level
Memory was already re-exported from praisonaiagents/__init__.py before PR #2165 (the lazy map already had 'Memory': ('praisonaiagents.memory.memory', 'Memory')). The page never got swept.
This page uses three symbols that are not yet in _LAZY_IMPORTS:
Line
Symbol used
54
register_memory_adapter
129
register_memory_adapter, get_memory_adapter
166
list_memory_adapters
Per AGENTS.md §6.1 the next agent must not keep deep imports in docs — instead file a sub-issue against MervinPraison/PraisonAI requesting register_memory_adapter, get_memory_adapter, and list_memory_adapters be added to praisonaiagents/__init__.py_LAZY_IMPORTS (target path: praisonaiagents.memory.adapters). Once that lands, refactor the three import lines above.
Until that SDK PR is merged, leave the imports as-is and flag the page in the PR description as blocked-on-SDK rather than silently masking the gap.
C. Pages newly relying on the lazy exports — bring up to AGENTS.md spec
Each page below uses one or more PR #2165 symbols. Spot checks against the AGENTS.md template (§2) show structural gaps. Per AGENTS.md §1.2 (SDK-First cycle), the next agent must read the SDK source first, then rewrite each page top-to-bottom.
Hero diagram suggestion (graph LR with standard §3.1 palette):
graph LR
A[📁 Files] --> B[🔍 FileTracker]
B --> C{Changed?}
C -->|Yes| D[📥 Index]
C -->|No| E[⏭ Skip]
D --> F[📊 CorpusStats]
E --> F
classDef input fill:#6366F1,stroke:#7C90A0,color:#fff
classDef process fill:#F59E0B,stroke:#7C90A0,color:#fff
classDef result fill:#10B981,stroke:#7C90A0,color:#fff
class A input
class B,C,D,E process
class F result
An agent-centric Quick Start (from praisonaiagents import Agent enabling a knowledge backend with True first, then dict, then KnowledgeStoreProtocol implementation last) — precedence ladder per §7.1
A Configuration Options table extracted from KnowledgeStoreProtocol field annotations / docstrings
Brief mentions of the two error types (ScopeRequiredError, BackendNotAvailableError) with one-line "raised when…" descriptions
A Related <CardGroup> linking to /features/incremental-indexing and /features/advanced-memory
praisonaiagents/skills/ (the skill loader + validator)
Action: confirm the first runnable example on the page is an agent-centric Agent(..., skills=[...]) snippet before showing discover_skills / load_skill (which are extension-API utilities, not the typical user path). Per AGENTS.md §1.1 #9 the agent-centric example must come first.
praisonaiagents/skills/ (look for capability gate definitions, EnforcementLevel enum, SkillState enum)
Action: add (if missing) a small enum reference table showing each EnforcementLevel and SkillState value with a one-line description. Verify Configuration Options table covers every field of the relevant config dataclass per §7.2.
praisonaiagents/memory/auto_memory.py (or wherever AutoMemory is defined)
praisonaiagents/config/feature_configs.py for the MemoryConfig dataclass
Action: ensure the page leads with the precedence-ladder agent-centric example per §7.1 (memory=True → memory="auto" → memory={...} → memory=AutoMemory(...) → memory=MemoryConfig(...)). This was flagged as B.2 in the original #579 — confirm it actually got done.
praisonaiagents/memory/adapters/factories.py (PR #2165 maps ChromaMemory to create_chroma_memory_adapter — verify the docs example matches this factory semantics, not a constructor)
Important:ChromaMemory is re-exported as a factory function (create_chroma_memory_adapter), not a class. The docs example at resource-lifecycle.mdx:122 must use it as ChromaMemory(...) returning an adapter instance — confirm the page reads correctly as a function call and not as class ChromaMemory: instantiation.
Confirm each page has: hero diagram, agent-centric Quick Start, Configuration Options table, Related <CardGroup>. The MAX_NESTING_DEPTH constant should be documented as a one-line module-level constant with its default value pulled from SDK (do not duplicate — link to SDK reference per §2 template).
D. Process the next agent MUST follow
Non-negotiable rules from AGENTS.md — call them out explicitly so the next agent does not skip steps:
Work on the feature branch claude/admiring-euler-urm5kn (do not push to main).
One feature per commit so the diff stays reviewable.
Validate docs.json after any sidebar entry change (§1.9 create all these modules #8) — must remain valid JSON, must add new pages under the Features group, never under Concepts (§1.8 rule 4).
Open a draft PR when finished (per remote-execution-environment policy in this repo).
NEVER create or modify docs/concepts/ (§1.8 rule 1) — human-approved only.
Style guardrails (§6)
One-sentence section intros — no padding.
Active voice, direct language.
Forbidden phrases (§6.3) — do not use: "In this section…", "As you can see…", "It's important to note…", "Please note…", "Let's take a look at…", "The following example shows…".
Code examples must run as-is (§5.1) — no your-key-here placeholders.
Context
PraisonAI PR #2165 — fix(sdk): lazy top-level re-exports for docs-friendly imports (PraisonAIDocs #579 B.1) — merged into
mainat 2026-06-23T07:23:12Z. It adds the following symbols topraisonaiagents/__init__.py_LAZY_IMPORTSso docs can stop using deep import paths:workflowsif_,include,Include,MAX_NESTING_DEPTH,YAMLWorkflowParserknowledgeKnowledgeStoreProtocol,ScopeRequiredError,BackendNotAvailableError,FileTracker,IndexResult,CorpusStatsskillsvalidate,validate_metadata,discover_skills,load_skill,EnforcementLevel,SkillStatememoryAutoMemory,ChromaMemoryThe docs side of the friendly-import migration shipped earlier in PR #798, #799, and #800 — before the SDK side had landed. The imports were dead-on-paper until 07:23 UTC today; they now actually resolve.
This issue tracks the loose ends.
A. Sanity check — verify friendly imports now resolve at runtime
Quick smoke check the next agent must run before anything else. All of these must print
ok:If any fails, file a SDK sub-issue in
MervinPraison/PraisonAIper AGENTS.md §1.3 (SDK Source Verification) before continuing — do not keep deep imports in docs as a workaround.Files that should be re-grepped to confirm no
praisonaiagents.{memory,skills,knowledge,workflows,planning}deep imports remain indocs/features/:rg "from praisonaiagents\.(workflows|memory|skills|knowledge|planning)" docs/features/Current grep at the time this issue was filed returned 5 matches across 2 files (covered in section B below).
B. Remaining deep imports — MIGRATE to friendly form
B.1
docs/features/prompt-caching.mdx—Memoryis now top-levelMemorywas already re-exported frompraisonaiagents/__init__.pybefore PR #2165 (the lazy map already had'Memory': ('praisonaiagents.memory.memory', 'Memory')). The page never got swept.from praisonaiagents.memory import Memoryfrom praisonaiagents import Memoryfrom praisonaiagents.memory import Memoryfrom praisonaiagents import MemoryB.2
docs/features/custom-memory-adapters.mdx— needs upstream SDK exportsThis page uses three symbols that are not yet in
_LAZY_IMPORTS:register_memory_adapterregister_memory_adapter,get_memory_adapterlist_memory_adaptersPer AGENTS.md §6.1 the next agent must not keep deep imports in docs — instead file a sub-issue against
MervinPraison/PraisonAIrequestingregister_memory_adapter,get_memory_adapter, andlist_memory_adaptersbe added topraisonaiagents/__init__.py_LAZY_IMPORTS(target path:praisonaiagents.memory.adapters). Once that lands, refactor the three import lines above.Reference the existing pattern from PR #2165:
Until that SDK PR is merged, leave the imports as-is and flag the page in the PR description as blocked-on-SDK rather than silently masking the gap.
C. Pages newly relying on the lazy exports — bring up to AGENTS.md spec
Each page below uses one or more PR #2165 symbols. Spot checks against the AGENTS.md template (§2) show structural gaps. Per AGENTS.md §1.2 (SDK-First cycle), the next agent must read the SDK source first, then rewrite each page top-to-bottom.
C.1
docs/features/incremental-indexing.mdx— usesFileTracker,IndexResult,CorpusStatsSDK source to read first:
praisonaiagents/knowledge/indexing.py(definesFileTracker,IndexResult,CorpusStats)praisonaiagents/knowledge/knowledge.py(theKnowledge.index()entry point)Current gaps vs AGENTS.md template (§2, §9.1):
sidebarTitle# Incremental Indexingpresent (Mintlify convention: title goes in frontmatter only, do not repeat as H1)## Overviewsection is not in the template — replace with the one-sentence intro pattern from §6.2<Steps>with at least 2<Step>children (Simple → With Config) per §4.1IndexResult/CorpusStatsdataclasses per §5.4 / §7.2<AccordionGroup>per §4.1<CardGroup>per §4.1 (link to/features/knowledge-backends,/features/knowledgeat minimum)sequenceDiagramper §1.1 create all these modules #10 / §3.4Hero diagram suggestion (graph LR with standard §3.1 palette):
graph LR A[📁 Files] --> B[🔍 FileTracker] B --> C{Changed?} C -->|Yes| D[📥 Index] C -->|No| E[⏭ Skip] D --> F[📊 CorpusStats] E --> F classDef input fill:#6366F1,stroke:#7C90A0,color:#fff classDef process fill:#F59E0B,stroke:#7C90A0,color:#fff classDef result fill:#10B981,stroke:#7C90A0,color:#fff class A input class B,C,D,E process class F resultC.2
docs/features/knowledge-backends.mdx— usesKnowledgeStoreProtocol,ScopeRequiredError,BackendNotAvailableErrorSDK source to read first:
praisonaiagents/knowledge/protocols.pyAction: verify the page has:
from praisonaiagents import Agentenabling a knowledge backend withTruefirst, then dict, thenKnowledgeStoreProtocolimplementation last) — precedence ladder per §7.1KnowledgeStoreProtocolfield annotations / docstringsScopeRequiredError,BackendNotAvailableError) with one-line "raised when…" descriptions<CardGroup>linking to/features/incremental-indexingand/features/advanced-memoryC.3
docs/features/hermes-openclaw-skills-import.mdx— usesdiscover_skills,validate,load_skillSDK source to read first:
praisonaiagents/skills/(the skill loader + validator)Action: confirm the first runnable example on the page is an agent-centric
Agent(..., skills=[...])snippet before showingdiscover_skills/load_skill(which are extension-API utilities, not the typical user path). Per AGENTS.md §1.1 #9 the agent-centric example must come first.C.4
docs/features/skill-capability-gates.mdx— usesEnforcementLevel,SkillStateSDK source to read first:
praisonaiagents/skills/(look for capability gate definitions,EnforcementLevelenum,SkillStateenum)Action: add (if missing) a small enum reference table showing each
EnforcementLevelandSkillStatevalue with a one-line description. Verify Configuration Options table covers every field of the relevant config dataclass per §7.2.C.5
docs/features/advanced-memory.mdx— usesAutoMemorySDK source to read first:
praisonaiagents/memory/auto_memory.py(or whereverAutoMemoryis defined)praisonaiagents/config/feature_configs.pyfor theMemoryConfigdataclassAction: ensure the page leads with the precedence-ladder agent-centric example per §7.1 (
memory=True→memory="auto"→memory={...}→memory=AutoMemory(...)→memory=MemoryConfig(...)). This was flagged as B.2 in the original #579 — confirm it actually got done.C.6
docs/features/resource-lifecycle.mdx— usesChromaMemorySDK source to read first:
praisonaiagents/memory/adapters/factories.py(PR #2165 mapsChromaMemorytocreate_chroma_memory_adapter— verify the docs example matches this factory semantics, not a constructor)C.7
docs/features/conditional-branching.mdx,nested-workflows.mdx,modular-recipes.mdx,yaml-workflows.mdx,multi-agent-pipelines.mdx— useif_,Include,include,MAX_NESTING_DEPTH,YAMLWorkflowParserThese already use friendly imports post-#800. Per AGENTS.md §1.9 #2 the next agent must still read the SDK source for each before editing:
praisonaiagents/workflows/(entry point +if_,include,Include)praisonaiagents/workflows/yaml_parser.py(forYAMLWorkflowParser)Confirm each page has: hero diagram, agent-centric Quick Start, Configuration Options table, Related
<CardGroup>. TheMAX_NESTING_DEPTHconstant should be documented as a one-line module-level constant with its default value pulled from SDK (do not duplicate — link to SDK reference per §2 template).D. Process the next agent MUST follow
Non-negotiable rules from
AGENTS.md— call them out explicitly so the next agent does not skip steps:AGENTS.mdin full before starting (§1.9 create all these missing modules #1).praisonaiagents/__init__.py_LAZY_IMPORTSpraisonaiagents/config/feature_configs.pypraisonaiagents/{memory,skills,knowledge,workflows}/claude/admiring-euler-urm5kn(do not push tomain).docs.jsonafter any sidebar entry change (§1.9 create all these modules #8) — must remain valid JSON, must add new pages under theFeaturesgroup, never underConcepts(§1.8 rule 4).docs/concepts/(§1.8 rule 1) — human-approved only.Style guardrails (§6)
your-key-hereplaceholders.from praisonaiagents import …, neverfrom praisonaiagents.{submodule} import ….Quality checklist before committing each page (§9)
title,sidebarTitle,description,icon(§8)<Steps>with at least 2<Step>children (Simple + With Config)<AccordionGroup>(§4.1)<CardGroup cols={2}>with 2 contextually-relevant<Card>childrenfrom praisonaiagents import Agentfrom praisonaiagents.{submodule} import …(friendly imports only)__init__.py_LAZY_IMPORTS# HeadingH1 inside the body — title belongs to frontmatter onlyE. Scope summary
prompt-caching.mdx, 2 lines)MervinPraison/PraisonAIincremental-indexing.mdx)knowledge-backends.mdx,hermes-openclaw-skills-import.mdx,skill-capability-gates.mdx,advanced-memory.mdx,resource-lifecycle.mdx,conditional-branching.mdx,nested-workflows.mdx,modular-recipes.mdx,yaml-workflows.mdx,multi-agent-pipelines.mdx)ChromaMemoryfactory-vs-class semantics checkresource-lifecycle.mdx)Suggested order: A (sanity) → B.1 (1-file friendly-import fix) → B.2 (file SDK sub-issue) → C.1 (full rewrite of
incremental-indexing.mdxas the canonical example) → C.2–C.7 (audit/touch-up sweep).F. References
AGENTS.md(root of this repo)praisonaiagents/(synced daily — seeupdate_repos.sh)praisonaiagents/__init__.py_LAZY_IMPORTSAGENTS.md§1.8AGENTS.md§2AGENTS.md§3.1AGENTS.md§1.2AGENTS.md§7.1