docs(features): add HostedAgent + LocalAgent pages, update ManagedAgent references#258
docs(features): add HostedAgent + LocalAgent pages, update ManagedAgent references#258MervinPraison wants to merge 1 commit intomainfrom
Conversation
…nt references - Add docs/features/hosted-agent.mdx with comprehensive documentation - Add docs/features/local-agent.mdx with LLM and compute guidance - Update docs/features/managed-agent-persistence.mdx to use HostedAgent - Update docs/features/managed-agents-session-info.mdx with new canonical classes - Update docs/features/managed-cli.mdx references - Add new pages to docs.json navigation under Features group Fixes #257 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
📝 WalkthroughWalkthroughThis PR extends the documentation by adding two new feature pages— Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces comprehensive documentation for the new HostedAgent and LocalAgent classes, replacing the deprecated ManagedAgent. The updates include detailed guides on configuration, compute backends, and migration paths across several feature files. Review feedback identifies several necessary corrections, specifically updating API reference links from TypeScript to Python, fixing a naming mismatch in a Mermaid diagram within the persistence guide, and correcting an inconsistent model name in the examples.
|
|
||
| ## Configuration Options | ||
|
|
||
| <Card title="HostedAgent API Reference" icon="code" href="/docs/sdk/reference/typescript/classes/HostedAgent"> |
| Complete HostedAgent configuration options | ||
| </Card> | ||
|
|
||
| <Card title="HostedAgentConfig Reference" icon="code" href="/docs/sdk/reference/typescript/classes/HostedAgentConfig"> |
|
|
||
| ## Configuration Options | ||
|
|
||
| <Card title="LocalAgent API Reference" icon="code" href="/docs/sdk/reference/typescript/classes/LocalAgent"> |
| Complete LocalAgent configuration options | ||
| </Card> | ||
|
|
||
| <Card title="LocalAgentConfig Reference" icon="code" href="/docs/sdk/reference/typescript/classes/LocalAgentConfig"> |
| sequenceDiagram | ||
| participant User | ||
| participant ManagedAgent | ||
| participant HostedAgent |
|
|
||
| <Card title="ManagedAgent API Reference" icon="code" href="/docs/sdk/reference/typescript/classes/ManagedAgent"> | ||
| Complete ManagedAgent configuration options | ||
| <Card title="HostedAgent API Reference" icon="code" href="/docs/sdk/reference/typescript/classes/HostedAgent"> |
|
|
||
| managed = ManagedAgent(config=ManagedConfig(model="claude-sonnet-4-6")) | ||
| agent = Agent(name="assistant", backend=managed) | ||
| hosted = HostedAgent(config=HostedAgentConfig(model="claude-sonnet-4-6")) |
There was a problem hiding this comment.
Actionable comments posted: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (5)
docs/features/managed-agents-session-info.mdx (3)
104-112:⚠️ Potential issue | 🟡 MinorStale
ManagedAgent/ManagedConfigexample after rename.The "Empty Session Defaults" snippet was not updated alongside the Quick Start rename. It still uses
ManagedAgent(config=ManagedConfig()), which is inconsistent with the deprecation note and the rest of the page that switched toHostedAgent/HostedAgentConfig.📝 Proposed fix
-managed = ManagedAgent(config=ManagedConfig()) -info = managed.retrieve_session() +hosted = HostedAgent(config=HostedAgentConfig()) +info = hosted.retrieve_session() # {"id": "", "status": "unknown", "title": "", "usage": {"input_tokens": 0, "output_tokens": 0}}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/features/managed-agents-session-info.mdx` around lines 104 - 112, The example uses deprecated names ManagedAgent and ManagedConfig; update the snippet to use the current HostedAgent and HostedAgentConfig identifiers and ensure the call to retrieve_session() still matches the actual method name (e.g., HostedAgent(config=HostedAgentConfig()) and then calling retrieve_session()) so the docs remain consistent with the rest of the page and the deprecation note.
168-170:⚠️ Potential issue | 🟡 Minor
LocalManagedAgent/AnthropicManagedAgentreferences are stale.This Best Practice still describes the old class names. Update to the new canonical classes (
LocalAgent/HostedAgent) so the page is internally consistent with the deprecation note at the top.📝 Proposed fix
-`LocalManagedAgent` always returns `title=""`. Only `AnthropicManagedAgent` sets it. +`LocalAgent` always returns `title=""`. Only `HostedAgent` (Anthropic backend) sets it.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/features/managed-agents-session-info.mdx` around lines 168 - 170, Update the stale class names in the "Handle backend differences" accordion: replace references to LocalManagedAgent and AnthropicManagedAgent with the new canonical names LocalAgent and HostedAgent respectively so the content matches the deprecation note and the rest of the docs; ensure any explanatory text that mentions behavior (e.g., "LocalManagedAgent always returns title=\"\". Only AnthropicManagedAgent sets it.") is updated to reference LocalAgent and HostedAgent and retains the same behavioral claims.
138-142:⚠️ Potential issue | 🟡 MinorUndefined
managedvariable in "Cost monitoring" snippet.The Quick Start now defines
hostedandlocal, but this snippet still referencesmanaged.retrieve_session(). Anyone copy-pasting this block in isolation will get aNameError.📝 Proposed fix
-info = managed.retrieve_session() +info = hosted.retrieve_session()🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/features/managed-agents-session-info.mdx` around lines 138 - 142, The snippet references managed.retrieve_session() which is undefined because the Quick Start defines hosted and local; update the example to call the correct session object (e.g., hosted.retrieve_session() or local.retrieve_session()) or add a brief variable definition for managed that aliases the intended client; change the reference to the chosen symbol (hosted or local) so that retrieve_session() resolves (look for managed.retrieve_session in the snippet and replace with hosted.retrieve_session or local.retrieve_session or add managed = hosted/local above).docs/features/managed-agent-persistence.mdx (2)
39-56:⚠️ Potential issue | 🟠 Major
gpt-4o-miniis incompatible withprovider="anthropic".Every Quick Start / DB tab snippet pairs
provider="anthropic"withmodel="gpt-4o-mini"(an OpenAI model). Users copy-pasting this will get a runtime error from the Anthropic backend. Either change the provider to a non-Anthropic option or use an Anthropic model such asclaude-haiku-4-5/claude-3-5-sonnet-latest. This affects Lines 39–56, 112–156, 164–208, 220–259, 271–312, 324–366, 378–419, 431–472.📝 Proposed fix (apply pattern across all tabs)
-hosted = HostedAgent( - provider="anthropic", - config=HostedAgentConfig(model="gpt-4o-mini", system="You are helpful") -) +hosted = HostedAgent( + provider="anthropic", + config=HostedAgentConfig(model="claude-haiku-4-5", system="You are helpful") +)Also update the intro text on Line 37 (
Run \gpt-4o-mini` conversations…`) accordingly.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/features/managed-agent-persistence.mdx` around lines 39 - 56, The snippet pairs HostedAgent(provider="anthropic") with model="gpt-4o-mini" which is an OpenAI model and will error; update each affected example that uses HostedAgent and HostedAgentConfig so the provider and model are compatible—either change provider to a non-Anthropic provider for "gpt-4o-mini" or replace the model with an Anthropic model (e.g., "claude-haiku-4-5" or "claude-3-5-sonnet-latest") wherever HostedAgent(provider="anthropic", config=HostedAgentConfig(model="gpt-4o-mini", ...)) appears, and also update the adjacent intro text that mentions running "gpt-4o-mini" to reflect the chosen model/provider change.
482-488:⚠️ Potential issue | 🔴 CriticalReplace TypeScript reference links with correct Python documentation paths.
Lines 482-486 reference
/docs/sdk/reference/typescript/classes/HostedAgentand/docs/sdk/reference/typescript/classes/PraisonDB, which do not exist. Since this page documents Python features and uses Python imports (from praisonai import HostedAgent,from praisonaiagents import Agent), replace these broken links with the correct Python reference documentation. The database persistence functionality is documented at/docs/sdk/reference/praisonai/modules/dbor/docs/sdk/reference/praisonaiagents/modules/db.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/features/managed-agent-persistence.mdx` around lines 482 - 488, The Card links currently point to TypeScript docs; update the Card hrefs that reference HostedAgent and PraisonDB to the correct Python reference pages: change the HostedAgent link (the Card with title "HostedAgent API Reference" / symbol HostedAgent) to the Python SDK reference for the HostedAgent class (use the praisonai Python reference location for HostedAgent), and change the PraisonDB link (the Card with title "PraisonDB Reference" / symbol PraisonDB) to the Python DB module reference (use either /docs/sdk/reference/praisonai/modules/db or /docs/sdk/reference/praisonaiagents/modules/db as appropriate). Ensure you replace only the href values in the Card elements referring to HostedAgent and PraisonDB so the page links to the Python docs.
🧹 Nitpick comments (1)
docs/features/local-agent.mdx (1)
350-356: Optional: clarify default model.
modelis listed asRequired(which is consistent with code samples), but the table mixes aRequiredplaceholder with concrete defaults for other rows. Consider explicitly noting "no default — must be provided" or showing an example value to keep the table column meaning ("Default") consistent.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/features/local-agent.mdx` around lines 350 - 356, Update the table row for the `model` option to make the "Default" column consistent by replacing the placeholder "Required" with a clear statement such as "none (must be provided)" or an example value (e.g., "e.g., 'gpt-4o-mini'") so readers understand there is no default and the field must be supplied; locate and edit the `model` row in the table block in docs/features/local-agent.mdx to update the Default column text accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/features/hosted-agent.mdx`:
- Around line 297-299: Update the Card component's title string from
"ManagedAgent Persistence" to match the renamed page title "HostedAgent +
Database Persistence" so the card label aligns with the page frontmatter and
sidebar; locate the Card element with title="ManagedAgent Persistence" in the
docs/features/hosted-agent.mdx file and replace the title prop value with
"HostedAgent + Database Persistence" (leave the icon and href unchanged).
- Around line 144-150: The two Card entries referencing HostedAgent and
HostedAgentConfig point to non-existent TypeScript reference pages; update the
links to the correct Python reference paths or remove the cards: either change
the hrefs to the expected Python docs locations
(/docs/sdk/reference/praisonai/classes/HostedAgent and
/docs/sdk/reference/praisonai/classes/HostedAgentConfig) if you will add those
pages, or delete these Card nodes entirely from hosted-agent.mdx (target
symbols: HostedAgent and HostedAgentConfig) so the page contains only valid
links.
In `@docs/features/local-agent.mdx`:
- Around line 519-521: Update the Card component that currently uses
title="ManagedAgent Persistence" (the Card element with
href="/docs/features/managed-agent-persistence") so its title and displayed text
match the renamed page; change both the title attribute and inner text to
"HostedAgent + Database Persistence" to keep the Related card consistent with
the target page rename.
- Around line 342-348: The Card hrefs for LocalAgent and LocalAgentConfig are
pointing to non-existent TypeScript reference pages; update their hrefs to the
Python (praisonaiagents) reference path used by other Python class links:
replace "/docs/sdk/reference/typescript/classes/LocalAgent" with
"/docs/sdk/reference/praisonaiagents/classes/LocalAgent" and similarly replace
"/docs/sdk/reference/typescript/classes/LocalAgentConfig" with
"/docs/sdk/reference/praisonaiagents/classes/LocalAgentConfig" in the LocalAgent
Cards so the links resolve to the correct Python class docs for LocalAgent and
LocalAgentConfig.
In `@docs/features/managed-agent-persistence.mdx`:
- Around line 81-102: The Mermaid sequenceDiagram contains a stale participant
name: replace the final message line referencing ManagedAgent with the declared
participant HostedAgent (change "ManagedAgent-->>User: 'I remember X'" to
"HostedAgent-->>User: 'I remember X'") so the participant graph matches the rest
of the diagram and Mermaid doesn't create an undeclared participant.
- Around line 39-46: The docs import non-existent HostedAgent/HostedAgentConfig;
update the example to use real exports (e.g., replace HostedAgent and
HostedAgentConfig with AnthropicManagedAgent and ManagedConfig or ManagedAgent
and ManagedConfig), update the import statement to import AnthropicManagedAgent
(or ManagedAgent) and ManagedConfig from praisonai, and adjust the instantiation
to construct AnthropicManagedAgent (or ManagedAgent) with a ManagedConfig
instance using model="gpt-4o-mini" and system="You are helpful".
---
Outside diff comments:
In `@docs/features/managed-agent-persistence.mdx`:
- Around line 39-56: The snippet pairs HostedAgent(provider="anthropic") with
model="gpt-4o-mini" which is an OpenAI model and will error; update each
affected example that uses HostedAgent and HostedAgentConfig so the provider and
model are compatible—either change provider to a non-Anthropic provider for
"gpt-4o-mini" or replace the model with an Anthropic model (e.g.,
"claude-haiku-4-5" or "claude-3-5-sonnet-latest") wherever
HostedAgent(provider="anthropic", config=HostedAgentConfig(model="gpt-4o-mini",
...)) appears, and also update the adjacent intro text that mentions running
"gpt-4o-mini" to reflect the chosen model/provider change.
- Around line 482-488: The Card links currently point to TypeScript docs; update
the Card hrefs that reference HostedAgent and PraisonDB to the correct Python
reference pages: change the HostedAgent link (the Card with title "HostedAgent
API Reference" / symbol HostedAgent) to the Python SDK reference for the
HostedAgent class (use the praisonai Python reference location for HostedAgent),
and change the PraisonDB link (the Card with title "PraisonDB Reference" /
symbol PraisonDB) to the Python DB module reference (use either
/docs/sdk/reference/praisonai/modules/db or
/docs/sdk/reference/praisonaiagents/modules/db as appropriate). Ensure you
replace only the href values in the Card elements referring to HostedAgent and
PraisonDB so the page links to the Python docs.
In `@docs/features/managed-agents-session-info.mdx`:
- Around line 104-112: The example uses deprecated names ManagedAgent and
ManagedConfig; update the snippet to use the current HostedAgent and
HostedAgentConfig identifiers and ensure the call to retrieve_session() still
matches the actual method name (e.g., HostedAgent(config=HostedAgentConfig())
and then calling retrieve_session()) so the docs remain consistent with the rest
of the page and the deprecation note.
- Around line 168-170: Update the stale class names in the "Handle backend
differences" accordion: replace references to LocalManagedAgent and
AnthropicManagedAgent with the new canonical names LocalAgent and HostedAgent
respectively so the content matches the deprecation note and the rest of the
docs; ensure any explanatory text that mentions behavior (e.g.,
"LocalManagedAgent always returns title=\"\". Only AnthropicManagedAgent sets
it.") is updated to reference LocalAgent and HostedAgent and retains the same
behavioral claims.
- Around line 138-142: The snippet references managed.retrieve_session() which
is undefined because the Quick Start defines hosted and local; update the
example to call the correct session object (e.g., hosted.retrieve_session() or
local.retrieve_session()) or add a brief variable definition for managed that
aliases the intended client; change the reference to the chosen symbol (hosted
or local) so that retrieve_session() resolves (look for managed.retrieve_session
in the snippet and replace with hosted.retrieve_session or
local.retrieve_session or add managed = hosted/local above).
---
Nitpick comments:
In `@docs/features/local-agent.mdx`:
- Around line 350-356: Update the table row for the `model` option to make the
"Default" column consistent by replacing the placeholder "Required" with a clear
statement such as "none (must be provided)" or an example value (e.g., "e.g.,
'gpt-4o-mini'") so readers understand there is no default and the field must be
supplied; locate and edit the `model` row in the table block in
docs/features/local-agent.mdx to update the Default column text accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 732ae4e5-c14a-4244-97e9-9daf49ffa261
📒 Files selected for processing (6)
docs.jsondocs/features/hosted-agent.mdxdocs/features/local-agent.mdxdocs/features/managed-agent-persistence.mdxdocs/features/managed-agents-session-info.mdxdocs/features/managed-cli.mdx
| <Card title="HostedAgent API Reference" icon="code" href="/docs/sdk/reference/typescript/classes/HostedAgent"> | ||
| Complete HostedAgent configuration options | ||
| </Card> | ||
|
|
||
| <Card title="HostedAgentConfig Reference" icon="code" href="/docs/sdk/reference/typescript/classes/HostedAgentConfig"> | ||
| Configuration object parameters | ||
| </Card> |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
fd -e mdx -i 'HostedAgent|HostedAgentConfig' docs/sdk 2>/dev/null
fd -t d 'typescript|python' docs/sdk 2>/dev/nullRepository: MervinPraison/PraisonAIDocs
Length of output: 123
🏁 Script executed:
cat -n docs/features/hosted-agent.mdx | sed -n '140,155p'Repository: MervinPraison/PraisonAIDocs
Length of output: 769
🏁 Script executed:
find docs/sdk/reference -type d | head -20Repository: MervinPraison/PraisonAIDocs
Length of output: 666
🏁 Script executed:
find docs/sdk -type d -name '*python*' -o -type d -name '*classes*'Repository: MervinPraison/PraisonAIDocs
Length of output: 221
🏁 Script executed:
ls docs/sdk/reference/typescript/classes/ | grep -i hostedRepository: MervinPraison/PraisonAIDocs
Length of output: 53
🏁 Script executed:
ls docs/sdk/reference/praisonai/classes/ | grep -i hostedRepository: MervinPraison/PraisonAIDocs
Length of output: 53
🏁 Script executed:
ls docs/sdk/reference/praisonaiagents/classes/ | grep -i hostedRepository: MervinPraison/PraisonAIDocs
Length of output: 53
🏁 Script executed:
head -50 docs/features/hosted-agent.mdx | grep -E 'import|from'Repository: MervinPraison/PraisonAIDocs
Length of output: 158
🏁 Script executed:
ls docs/sdk/reference/praisonai/classes/ | head -20Repository: MervinPraison/PraisonAIDocs
Length of output: 466
🏁 Script executed:
ls docs/sdk/reference/typescript/classes/ | head -20Repository: MervinPraison/PraisonAIDocs
Length of output: 412
🏁 Script executed:
find docs/sdk/reference -name '*HostedAgent*'Repository: MervinPraison/PraisonAIDocs
Length of output: 53
Remove links to non-existent reference pages or replace with correct paths.
Lines 144-150 link to /docs/sdk/reference/typescript/classes/HostedAgent and HostedAgentConfig, but these pages don't exist. Since these are Python classes imported from praisonai (not TypeScript), the correct reference paths would be under /docs/sdk/reference/praisonai/classes/ — however, those pages also don't currently exist. Either create the reference documentation for these classes or remove these cards.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/features/hosted-agent.mdx` around lines 144 - 150, The two Card entries
referencing HostedAgent and HostedAgentConfig point to non-existent TypeScript
reference pages; update the links to the correct Python reference paths or
remove the cards: either change the hrefs to the expected Python docs locations
(/docs/sdk/reference/praisonai/classes/HostedAgent and
/docs/sdk/reference/praisonai/classes/HostedAgentConfig) if you will add those
pages, or delete these Card nodes entirely from hosted-agent.mdx (target
symbols: HostedAgent and HostedAgentConfig) so the page contains only valid
links.
| <Card title="ManagedAgent Persistence" icon="database" href="/docs/features/managed-agent-persistence"> | ||
| Database integration with hosted agents | ||
| </Card> |
There was a problem hiding this comment.
Inconsistent card title — page was renamed to "HostedAgent + Database Persistence".
The persistence page's frontmatter is now title: "HostedAgent + Database Persistence" (sidebar "HostedAgent Persistence"), but this card still labels it as "ManagedAgent Persistence", which contradicts the deprecation messaging on this page.
📝 Proposed fix
-<Card title="ManagedAgent Persistence" icon="database" href="/docs/features/managed-agent-persistence">
- Database integration with hosted agents
-</Card>
+<Card title="HostedAgent Persistence" icon="database" href="/docs/features/managed-agent-persistence">
+ Database integration with hosted agents
+</Card>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <Card title="ManagedAgent Persistence" icon="database" href="/docs/features/managed-agent-persistence"> | |
| Database integration with hosted agents | |
| </Card> | |
| <Card title="HostedAgent Persistence" icon="database" href="/docs/features/managed-agent-persistence"> | |
| Database integration with hosted agents | |
| </Card> |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/features/hosted-agent.mdx` around lines 297 - 299, Update the Card
component's title string from "ManagedAgent Persistence" to match the renamed
page title "HostedAgent + Database Persistence" so the card label aligns with
the page frontmatter and sidebar; locate the Card element with
title="ManagedAgent Persistence" in the docs/features/hosted-agent.mdx file and
replace the title prop value with "HostedAgent + Database Persistence" (leave
the icon and href unchanged).
| <Card title="LocalAgent API Reference" icon="code" href="/docs/sdk/reference/typescript/classes/LocalAgent"> | ||
| Complete LocalAgent configuration options | ||
| </Card> | ||
|
|
||
| <Card title="LocalAgentConfig Reference" icon="code" href="/docs/sdk/reference/typescript/classes/LocalAgentConfig"> | ||
| Configuration object parameters | ||
| </Card> |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
fd -e mdx -i 'LocalAgent|LocalAgentConfig' docs/sdk 2>/dev/null
fd -t d 'typescript|python' docs/sdk 2>/dev/nullRepository: MervinPraison/PraisonAIDocs
Length of output: 123
🏁 Script executed:
#!/bin/bash
# Check directory structure under docs/sdk
find docs/sdk -type d | head -20
# Look for reference documentation structure
ls -la docs/sdk/reference/ 2>/dev/null || echo "docs/sdk/reference does not exist"
# Check if TypeScript classes directory exists and what's in it
ls -la docs/sdk/reference/typescript/classes/ 2>/dev/null | head -20 || echo "TypeScript classes dir not found"
# Check for Python reference structure
find docs/sdk -type d -name '*python*' 2>/dev/nullRepository: MervinPraison/PraisonAIDocs
Length of output: 2240
🏁 Script executed:
#!/bin/bash
# Read the local-agent.mdx file around lines 342-348 for context
sed -n '330,360p' docs/features/local-agent.mdxRepository: MervinPraison/PraisonAIDocs
Length of output: 1039
🏁 Script executed:
#!/bin/bash
# Check if corresponding Python reference paths exist
find docs/sdk -type f -name '*LocalAgent*' 2>/dev/null
find docs/sdk -type f -name '*local-agent*' 2>/dev/nullRepository: MervinPraison/PraisonAIDocs
Length of output: 53
🏁 Script executed:
#!/bin/bash
# List all files in TypeScript classes directory
ls -1 docs/sdk/reference/typescript/classes/ | grep -i 'agent' | head -20
# Check if LocalAgent files exist with any naming pattern
find docs/sdk/reference -type f \( -name '*ocal*gent*' -o -name '*LocalAgent*' \) 2>/dev/null
# Look at what's actually in the TypeScript classes directory
wc -l docs/sdk/reference/typescript/classes/* | tail -1
ls docs/sdk/reference/typescript/classes/ | wc -lRepository: MervinPraison/PraisonAIDocs
Length of output: 502
🏁 Script executed:
#!/bin/bash
# Check the actual structure - is there a classes subdirectory or direct mdx files?
ls -la docs/sdk/reference/typescript/ | head -20
# Search for any reference to LocalAgent in the entire docs/sdk
rg -l 'LocalAgent' docs/sdk/ 2>/dev/null | head -10Repository: MervinPraison/PraisonAIDocs
Length of output: 355
🏁 Script executed:
#!/bin/bash
# Let's examine the exact path structure by looking at what files would match the href
# The href is /docs/sdk/reference/typescript/classes/LocalAgent
# Check if this maps to a file
ls -la 'docs/sdk/reference/typescript/classes/LocalAgent'* 2>/dev/null || echo "No LocalAgent files found"
# Also check what reference documentation exists for Python classes
ls docs/sdk/praisonaiagents/ | head -20Repository: MervinPraison/PraisonAIDocs
Length of output: 280
🏁 Script executed:
#!/bin/bash
# List all files starting with LocalAgent in TypeScript classes
ls docs/sdk/reference/typescript/classes/ | grep -i 'local'
# List all Agent-related files in TypeScript
ls docs/sdk/reference/typescript/classes/ | grep -i 'agent' | sortRepository: MervinPraison/PraisonAIDocs
Length of output: 603
🏁 Script executed:
#!/bin/bash
# Check what's in the praisonaiagents Python reference - is there a structure for LocalAgent?
find docs/sdk/praisonaiagents -type f -name '*.mdx' | head -20
# Check if Python references use a different structure
ls -la docs/sdk/praisonaiagents/agent/ 2>/dev/nullRepository: MervinPraison/PraisonAIDocs
Length of output: 1678
🏁 Script executed:
#!/bin/bash
# Let's also check the hosted-agent.mdx mentioned in the review to see the same pattern
grep -n "typescript/classes" docs/features/hosted-agent.mdx | head -5Repository: MervinPraison/PraisonAIDocs
Length of output: 309
🏁 Script executed:
#!/bin/bash
# Check if HostedAgent and HostedAgentConfig exist in TypeScript classes
ls docs/sdk/reference/typescript/classes/ | grep -i 'hosted'
# Check if LocalAgent might be named differently
ls docs/sdk/reference/typescript/classes/ | sort | grep -i 'local\|agent' | tail -30Repository: MervinPraison/PraisonAIDocs
Length of output: 603
🏁 Script executed:
#!/bin/bash
# Let's look at the actual local-agent.mdx file to understand context better
# Check if there are other references to understand the intended linking pattern
grep -n "href.*sdk.*reference" docs/features/local-agent.mdx | head -10Repository: MervinPraison/PraisonAIDocs
Length of output: 305
🏁 Script executed:
#!/bin/bash
# Check if these might be dynamically generated or if the URLs are supposed to resolve differently
# Look at how other feature files link to SDK references
grep -r "href.*sdk.*reference" docs/features/ | grep -v 'node_modules' | head -10Repository: MervinPraison/PraisonAIDocs
Length of output: 1521
Broken reference links: LocalAgent and LocalAgentConfig hrefs do not exist.
These Card hrefs point to /docs/sdk/reference/typescript/classes/LocalAgent and LocalAgentConfig, but neither file exists in the TypeScript reference documentation. Since these are Python classes, the hrefs should reference the praisonaiagents documentation instead (e.g., /docs/sdk/reference/praisonaiagents/classes/LocalAgent), following the same pattern used by other Python class references like AudioAgent.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/features/local-agent.mdx` around lines 342 - 348, The Card hrefs for
LocalAgent and LocalAgentConfig are pointing to non-existent TypeScript
reference pages; update their hrefs to the Python (praisonaiagents) reference
path used by other Python class links: replace
"/docs/sdk/reference/typescript/classes/LocalAgent" with
"/docs/sdk/reference/praisonaiagents/classes/LocalAgent" and similarly replace
"/docs/sdk/reference/typescript/classes/LocalAgentConfig" with
"/docs/sdk/reference/praisonaiagents/classes/LocalAgentConfig" in the LocalAgent
Cards so the links resolve to the correct Python class docs for LocalAgent and
LocalAgentConfig.
| <Card title="ManagedAgent Persistence" icon="database" href="/docs/features/managed-agent-persistence"> | ||
| Database integration patterns | ||
| </Card> |
There was a problem hiding this comment.
Inconsistent card title — page was renamed to "HostedAgent + Database Persistence".
This Related card still says "ManagedAgent Persistence", contradicting the rename in docs/features/managed-agent-persistence.mdx (now HostedAgent Persistence).
📝 Proposed fix
-<Card title="ManagedAgent Persistence" icon="database" href="/docs/features/managed-agent-persistence">
- Database integration patterns
-</Card>
+<Card title="HostedAgent Persistence" icon="database" href="/docs/features/managed-agent-persistence">
+ Database integration patterns
+</Card>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <Card title="ManagedAgent Persistence" icon="database" href="/docs/features/managed-agent-persistence"> | |
| Database integration patterns | |
| </Card> | |
| <Card title="HostedAgent Persistence" icon="database" href="/docs/features/managed-agent-persistence"> | |
| Database integration patterns | |
| </Card> |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/features/local-agent.mdx` around lines 519 - 521, Update the Card
component that currently uses title="ManagedAgent Persistence" (the Card element
with href="/docs/features/managed-agent-persistence") so its title and displayed
text match the renamed page; change both the title attribute and inner text to
"HostedAgent + Database Persistence" to keep the Related card consistent with
the target page rename.
| ```python | ||
| from praisonaiagents import Agent, db | ||
| from praisonai.integrations.managed_agents import ManagedAgent, ManagedConfig | ||
| from praisonai import HostedAgent, HostedAgentConfig | ||
|
|
||
| managed = ManagedAgent( | ||
| hosted = HostedAgent( | ||
| provider="anthropic", | ||
| config=ManagedConfig(model="gpt-4o-mini", system="You are helpful") | ||
| config=HostedAgentConfig(model="gpt-4o-mini", system="You are helpful") | ||
| ) |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Confirm HostedAgent / HostedAgentConfig definitions and re-exports
ast-grep --pattern $'class HostedAgent($$$):
$$$'
ast-grep --pattern $'class HostedAgentConfig($$$):
$$$'
# Check top-level praisonai package re-exports
fd -e py '__init__.py' --exec rg -nP --color=never 'HostedAgent|HostedAgentConfig' {}Repository: MervinPraison/PraisonAIDocs
Length of output: 53
🏁 Script executed:
#!/bin/bash
# Search for HostedAgent and HostedAgentConfig definitions anywhere in the codebase
echo "=== Searching for HostedAgent definition ==="
rg -l "class HostedAgent" --type py
echo ""
echo "=== Searching for HostedAgentConfig definition ==="
rg -l "class HostedAgentConfig" --type py
echo ""
echo "=== Searching for HostedAgent and HostedAgentConfig mentions ==="
rg "HostedAgent|HostedAgentConfig" --type py -c | head -20
echo ""
echo "=== Check praisonai/__init__.py contents ==="
if [ -f "praisonai/__init__.py" ]; then
cat -n praisonai/__init__.py
fiRepository: MervinPraison/PraisonAIDocs
Length of output: 6392
The documentation imports non-existent classes that will cause import errors.
The symbols HostedAgent and HostedAgentConfig do not exist in the codebase and are not exported from the praisonai module. Attempting to import them will fail with an AttributeError.
The praisonai/__init__.py explicitly exports only:
ManagedAgentManagedConfigAnthropicManagedAgentLocalManagedAgent/LocalManagedConfig(backward compat)SandboxedAgent/SandboxedAgentConfig(new honest names)
The code example at lines 39-46 must use one of the actual exported classes instead.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/features/managed-agent-persistence.mdx` around lines 39 - 46, The docs
import non-existent HostedAgent/HostedAgentConfig; update the example to use
real exports (e.g., replace HostedAgent and HostedAgentConfig with
AnthropicManagedAgent and ManagedConfig or ManagedAgent and ManagedConfig),
update the import statement to import AnthropicManagedAgent (or ManagedAgent)
and ManagedConfig from praisonai, and adjust the instantiation to construct
AnthropicManagedAgent (or ManagedAgent) with a ManagedConfig instance using
model="gpt-4o-mini" and system="You are helpful".
| ```mermaid | ||
| sequenceDiagram | ||
| participant User | ||
| participant ManagedAgent | ||
| participant HostedAgent | ||
| participant Anthropic | ||
| participant Database | ||
|
|
||
| User->>ManagedAgent: "Remember: X" | ||
| ManagedAgent->>Anthropic: Create session & execute | ||
| Anthropic-->>ManagedAgent: Response + usage | ||
| ManagedAgent->>Database: Store messages & metadata | ||
| User->>HostedAgent: "Remember: X" | ||
| HostedAgent->>Anthropic: Create session & execute | ||
| Anthropic-->>HostedAgent: Response + usage | ||
| HostedAgent->>Database: Store messages & metadata | ||
| Database-->>User: Session persisted | ||
|
|
||
| Note over User,Database: Instance destroyed | ||
|
|
||
| User->>ManagedAgent: Resume session | ||
| ManagedAgent->>Database: Load chat history | ||
| Database-->>ManagedAgent: Previous messages | ||
| ManagedAgent->>Anthropic: Continue session | ||
| Anthropic-->>ManagedAgent: Context-aware response | ||
| User->>HostedAgent: Resume session | ||
| HostedAgent->>Database: Load chat history | ||
| Database-->>HostedAgent: Previous messages | ||
| HostedAgent->>Anthropic: Continue session | ||
| Anthropic-->>HostedAgent: Context-aware response | ||
| ManagedAgent-->>User: "I remember X" | ||
| ``` |
There was a problem hiding this comment.
Sequence diagram still has stale ManagedAgent participant.
Line 101 shows ManagedAgent-->>User: "I remember X" while the rest of the sequence diagram (and the entire page) was renamed to HostedAgent. This is a missed rename and breaks the diagram's participant graph (Mermaid will treat ManagedAgent as a new, undeclared participant).
📝 Proposed fix
- ManagedAgent-->>User: "I remember X"
+ HostedAgent-->>User: "I remember X"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/features/managed-agent-persistence.mdx` around lines 81 - 102, The
Mermaid sequenceDiagram contains a stale participant name: replace the final
message line referencing ManagedAgent with the declared participant HostedAgent
(change "ManagedAgent-->>User: 'I remember X'" to "HostedAgent-->>User: 'I
remember X'") so the participant graph matches the rest of the diagram and
Mermaid doesn't create an undeclared participant.
Summary
Changes Made
New Documentation Pages
docs/features/hosted-agent.mdx- Complete documentation for cloud-hosted agent executiondocs/features/local-agent.mdx- Complete documentation for local agent execution with LLM flexibilityUpdated Existing Pages
docs/features/managed-agent-persistence.mdx- Updated to use HostedAgent instead of ManagedAgentdocs/features/managed-agents-session-info.mdx- Updated examples and added deprecation notedocs/features/managed-cli.mdx- Updated references and added HostedAgent linkdocs.json- Added new pages to Features navigation groupImplementation Details
Test Plan
Fixes #257
🤖 Generated with Claude Code
Summary by CodeRabbit