Skip to content

docs(features): add HostedAgent + LocalAgent pages, update ManagedAgent references#258

Open
MervinPraison wants to merge 1 commit intomainfrom
claude/issue-257-20260425-0610
Open

docs(features): add HostedAgent + LocalAgent pages, update ManagedAgent references#258
MervinPraison wants to merge 1 commit intomainfrom
claude/issue-257-20260425-0610

Conversation

@MervinPraison
Copy link
Copy Markdown
Owner

@MervinPraison MervinPraison commented Apr 25, 2026

Summary

  • Add comprehensive documentation for new HostedAgent and LocalAgent canonical classes
  • Update existing ManagedAgent references to use the new canonical implementations
  • Add navigation entries for the new documentation pages

Changes Made

New Documentation Pages

  • docs/features/hosted-agent.mdx - Complete documentation for cloud-hosted agent execution
  • docs/features/local-agent.mdx - Complete documentation for local agent execution with LLM flexibility

Updated Existing Pages

  • docs/features/managed-agent-persistence.mdx - Updated to use HostedAgent instead of ManagedAgent
  • docs/features/managed-agents-session-info.mdx - Updated examples and added deprecation note
  • docs/features/managed-cli.mdx - Updated references and added HostedAgent link
  • docs.json - Added new pages to Features navigation group

Implementation Details

  • Follows AGENTS.md page structure template with required sections
  • Uses standard Mermaid diagram color scheme (#8B0000, #189AB4, #10B981, #F59E0B, #6366F1)
  • Includes all required Mintlify components (Steps, AccordionGroup, CardGroup, Tabs)
  • Provides migration guidance from deprecated ManagedAgent patterns
  • All code examples are copy-paste runnable with correct imports

Test Plan

  • Verified all new .mdx files exist and follow template
  • Confirmed docs.json is valid JSON
  • Checked all code examples use correct imports
  • Ensured Mermaid diagrams use standard color scheme
  • Updated all cross-references to point to new canonical pages

Fixes #257

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added comprehensive guides for Hosted Agent and Local Agent deployment options, including configuration tables, Python examples, and best-practice recommendations.
    • Updated documentation to reflect ManagedAgent deprecation; code examples now demonstrate Hosted Agent and Local Agent usage patterns and session management.
    • Enhanced navigation with new documentation routes for agent features.

…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>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 25, 2026

📝 Walkthrough

Walkthrough

This PR extends the documentation by adding two new feature pages—hosted-agent.mdx and local-agent.mdx—with configuration guides, code examples, and diagrams. It also updates existing documentation to reflect terminology changes from ManagedAgent to HostedAgent, adds deprecation notices, and updates the navigation configuration in docs.json to include the new pages.

Changes

Cohort / File(s) Summary
Navigation Configuration
docs.json
Added two new routes (docs/features/hosted-agent and docs/features/local-agent) to the Advanced Features navigation section.
New Agent Documentation
docs/features/hosted-agent.mdx, docs/features/local-agent.mdx
Created comprehensive feature pages with quick-start examples, configuration tables, comparison diagrams, LLM/compute backend tabs, migration guidance, best-practice accordions, and related documentation links. LocalAgent page includes decision charts and multi-provider setup guidance.
Updated Feature Documentation
docs/features/managed-agent-persistence.mdx, docs/features/managed-agents-session-info.mdx, docs/features/managed-cli.mdx
Renamed/updated references from ManagedAgent to HostedAgent terminology, replaced Quick Start code examples with HostedAgent and LocalAgent instances, added deprecation notes, and updated Related section links to point to new hosted-agent and local-agent pages.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

  • PraisonAIDocs#74 — Modifies the same docs.json navigation and managed-agent-persistence.mdx file; establishes foundational agent feature documentation structure.
  • PraisonAIDocs#167 — Shares updates to docs navigation (docs.json) and related CardGroup references in managed agent documentation pages.

Poem

🐰 Hop along, dear reader, to agents new and bright,
Where HostedAgent shines and LocalAgent takes flight,
ManagedAgent bows, deprecated but wise,
Two paths now clear beneath the documentation skies!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and comprehensively summarizes the main changes: adding HostedAgent and LocalAgent pages while updating ManagedAgent references across the documentation.
Linked Issues check ✅ Passed The PR implements all required objectives from issue #257: new hosted-agent.mdx and local-agent.mdx pages, updates to managed-agent-persistence.mdx, managed-agents-session-info.mdx, and managed-cli.mdx, docs.json navigation updates, and deprecation guidance for ManagedAgent.
Out of Scope Changes check ✅ Passed All changes are properly scoped to documentation in docs/features/ and docs.json as required; no out-of-scope modifications to SDK code, other documentation sections, or unrelated files are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/issue-257-20260425-0610

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The link points to the TypeScript SDK reference, but this page documents the Python implementation. It should point to the Python API reference instead (e.g., /docs/sdk/reference/praisonai/modules/integrations).

Complete HostedAgent configuration options
</Card>

<Card title="HostedAgentConfig Reference" icon="code" href="/docs/sdk/reference/typescript/classes/HostedAgentConfig">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The link points to the TypeScript SDK reference. Please update it to point to the Python reference for HostedAgentConfig.


## Configuration Options

<Card title="LocalAgent API Reference" icon="code" href="/docs/sdk/reference/typescript/classes/LocalAgent">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The link points to the TypeScript SDK reference. This should be updated to point to the Python API reference for LocalAgent.

Complete LocalAgent configuration options
</Card>

<Card title="LocalAgentConfig Reference" icon="code" href="/docs/sdk/reference/typescript/classes/LocalAgentConfig">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The link points to the TypeScript SDK reference. Please update it to point to the Python reference for LocalAgentConfig.

sequenceDiagram
participant User
participant ManagedAgent
participant HostedAgent
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The participant was renamed to HostedAgent here, but the reference on line 101 (ManagedAgent-->>User) was not updated. This will cause a mismatch or an extra participant to appear in the Mermaid diagram.


<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">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The link points to the TypeScript SDK reference. It should point to the Python API reference for 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"))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The model name claude-sonnet-4-6 appears to be a typo or inconsistent with the model names used in other examples (e.g., claude-3-5-sonnet-latest in hosted-agent.mdx).

hosted = HostedAgent(config=HostedAgentConfig(model="claude-3-5-sonnet-latest"))

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 | 🟡 Minor

Stale ManagedAgent/ManagedConfig example 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 to HostedAgent/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/AnthropicManagedAgent references 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 | 🟡 Minor

Undefined managed variable in "Cost monitoring" snippet.

The Quick Start now defines hosted and local, but this snippet still references managed.retrieve_session(). Anyone copy-pasting this block in isolation will get a NameError.

📝 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-mini is incompatible with provider="anthropic".

Every Quick Start / DB tab snippet pairs provider="anthropic" with model="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 as claude-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 | 🔴 Critical

Replace TypeScript reference links with correct Python documentation paths.

Lines 482-486 reference /docs/sdk/reference/typescript/classes/HostedAgent and /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/db or /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.

model is listed as Required (which is consistent with code samples), but the table mixes a Required placeholder 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

📥 Commits

Reviewing files that changed from the base of the PR and between f0da587 and 2cf69d0.

📒 Files selected for processing (6)
  • docs.json
  • docs/features/hosted-agent.mdx
  • docs/features/local-agent.mdx
  • docs/features/managed-agent-persistence.mdx
  • docs/features/managed-agents-session-info.mdx
  • docs/features/managed-cli.mdx

Comment on lines +144 to +150
<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>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 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/null

Repository: 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 -20

Repository: 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 hosted

Repository: MervinPraison/PraisonAIDocs

Length of output: 53


🏁 Script executed:

ls docs/sdk/reference/praisonai/classes/ | grep -i hosted

Repository: MervinPraison/PraisonAIDocs

Length of output: 53


🏁 Script executed:

ls docs/sdk/reference/praisonaiagents/classes/ | grep -i hosted

Repository: 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 -20

Repository: MervinPraison/PraisonAIDocs

Length of output: 466


🏁 Script executed:

ls docs/sdk/reference/typescript/classes/ | head -20

Repository: 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.

Comment on lines +297 to +299
<Card title="ManagedAgent Persistence" icon="database" href="/docs/features/managed-agent-persistence">
Database integration with hosted agents
</Card>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
<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).

Comment on lines +342 to +348
<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>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 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/null

Repository: 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/null

Repository: 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.mdx

Repository: 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/null

Repository: 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 -l

Repository: 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 -10

Repository: 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 -20

Repository: 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' | sort

Repository: 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/null

Repository: 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 -5

Repository: 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 -30

Repository: 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 -10

Repository: 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 -10

Repository: 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.

Comment on lines +519 to +521
<Card title="ManagedAgent Persistence" icon="database" href="/docs/features/managed-agent-persistence">
Database integration patterns
</Card>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
<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.

Comment on lines 39 to 46
```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")
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 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
fi

Repository: 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:

  • ManagedAgent
  • ManagedConfig
  • AnthropicManagedAgent
  • LocalManagedAgent / 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".

Comment on lines 81 to 102
```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"
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: add HostedAgent + LocalAgent pages and update ManagedAgent references (PR #1550)

2 participants