Documentation Style Guide

How to write PraisonAI documentation pages β€” structure, components, diagrams, and writing rules

Every PraisonAI documentation page follows the same structure, component set, and visual language β€” this guide is both the reference and the example.

python
from praisonaiagents import Agent

agent = Agent(
    name="Research Agent",
    instructions="Research and summarise topics clearly.",
)

agent.start("What is agentic AI?")

The user copies the opening example, runs the agent, then follows the page structure below.

Diagram

Documentation Cycle

πŸ“– Read SDK

🧠 Understand

✍️ Document


Documentation Creation Process

Read the SDK source before writing anything β€” documentation must reflect SDK ground truth, not assumptions.

  1. Read SDK source

    Open and read the actual SDK implementation file in praisonaiagents/ before writing a single word of documentation.

    python
    # Example: reading agent source before documenting
    # praisonaiagents/agent/agent.py  ← read this first
    from praisonaiagents import Agent
    
    agent = Agent(
        name="Research Agent",
        instructions="Research and summarize topics"
    )
    agent.start("What is agentic AI?")
  2. Extract all parameters

    Pull every parameter, type, default value, and description from the SDK source or config class.

    python
    # praisonaiagents/config/feature_configs.py
    @dataclass
    class CachingConfig:
        enabled: bool = True          # Extract: enabled, bool, True
        ttl: int = 3600               # Extract: ttl, int, 3600
        backend: str = "memory"       # Extract: backend, str, "memory"
  3. Check existing docs

    Search docs/ for related pages before creating a new one β€” avoid duplication, ensure consistency.

  4. Write the page

    Follow the Page Structure Template and every rule in this guide.

SDK-First Cycle

Never batch-update multiple pages without reading source for each.

StepAction
READOpen the actual SDK source file
UNDERSTANDComprehend the implementation, APIs, and behaviour
DOCUMENTWrite documentation based on SDK truth
REPEATMove to the next feature and restart

File Locations

Content TypeSDK LocationDocs Location
Feature configspraisonaiagents/config/feature_configs.pydocs/concepts/*.mdx
Agent classpraisonaiagents/agent/agent.pydocs/concepts/agents.mdx
MCP integrationpraisonaiagents/mcp/mcp.pydocs/concepts/mcp.mdx
Skillspraisonaiagents/skills/docs/concepts/skills.mdx
Memorypraisonaiagents/memory/docs/concepts/memory.mdx
Knowledgepraisonaiagents/knowledge/docs/concepts/knowledge.mdx

Multi-SDK Reference

SDKSource Code PathDocumentation PathParity Tracker
PythonRepo root praisonaiagents/ (synced copy; upstream: praisonai-package/src/praisonai-agents/)docs/concepts/, docs/features/docs/features/DOCS_PARITY.md
TypeScript/JSpraisonai-package/src/praisonai-ts/src/docs/js/docs/js/DOCS_PARITY.md
Rustpraisonai-package/src/praisonai-rust/praisonai/src/docs/rust/docs/rust/DOCS_PARITY.md

TypeScript SDK Structure

praisonai-ts/src/
β”œβ”€β”€ agents/           # Agent implementations
β”œβ”€β”€ tools/            # Tool definitions
β”œβ”€β”€ memory/           # Memory implementations
β”œβ”€β”€ mcp/              # MCP protocol support
β”œβ”€β”€ observability/    # Tracing integrations
└── index.ts          # Main exports

Rust SDK Structure

praisonai-rust/praisonai/src/
β”œβ”€β”€ agents/           # Agent implementations and builders
β”œβ”€β”€ llm/              # LLM providers
β”œβ”€β”€ tools/            # Tool system
β”œβ”€β”€ memory/           # Memory stores
β”œβ”€β”€ mcp/              # MCP client
β”œβ”€β”€ parity/           # Parity-shim modules (config, telemetry, plugins, param_resolver)
β”œβ”€β”€ display/          # Display and callbacks
β”œβ”€β”€ planning/         # Planner and PlanStep
β”œβ”€β”€ session/          # Session
β”œβ”€β”€ streaming/        # Streaming metrics
β”œβ”€β”€ sandbox/          # Sandbox config
β”œβ”€β”€ embedding/        # Embedding config
β”œβ”€β”€ error.rs          # Result/error helpers
└── lib.rs            # Main exports

Folder Placement Rules

Where a file lives determines who can change it β€” AI agents have write access to most folders but never docs/concepts/.

FolderWho Can WritePurpose
docs/concepts/HUMAN ONLYCore architecture concepts
docs/features/AI agents + humansFeature documentation, guides, integrations
docs/tools/AI agents + humansTool-specific documentation
docs/guides/AI agents + humansHow-to guides and tutorials
docs/js/, docs/rust/Auto-generated ONLYManaged by parity system

AI Agent Behavioural Rules


Page Structure Template

Every documentation page follows this exact skeleton.

mdx
---
title: "Feature Name"
sidebarTitle: "Feature Name"
description: "One-line description of what this feature does"
icon: "icon-name"
---

{/* One sentence explaining the feature β€” what it does, not how */}

{/* Hero Mermaid diagram showing the concept visually */}

## Quick Start

<Steps>
<Step title="Simple Usage">
{/* Minimal code example β€” enable with True */}
</Step>

<Step title="With Configuration">
{/* Code example with config class */}
</Step>
</Steps>

---

## How It Works

{/* Sequence diagram or flow diagram */}

{/* Brief explanation table */}

---

## Configuration Options

{/* Link to auto-generated SDK reference β€” DO NOT duplicate SDK parameters here */}

<Card title="[Feature] API Reference" icon="code" href="/docs/sdk/typescript">
  TypeScript configuration options
</Card>

---

## Common Patterns

{/* 2–3 practical usage patterns */}

---

## Best Practices

<AccordionGroup>
{/* 3–4 best practices as accordions */}
</AccordionGroup>

---

## Related

<CardGroup cols={2}>
{/* 2 related concept pages */}
</CardGroup>

Mermaid Diagram Standards

Every page starts with a hero Mermaid diagram using the standard colour scheme.

Colour Scheme

ColourHexUse
Dark Red#8B0000Agents, inputs, outputs, tasks
Teal#189AB4Tools, processes, middleware
Green#10B981Success, results, completion
Amber#F59E0BWarnings, planners, intermediate steps
Indigo#6366F1Configuration, settings, options
White#fffText β€” always white on coloured backgrounds
Grey#7C90A0Stroke/border colour

Diagram Types by Use Case

Use CaseDiagram Type
Feature overviewgraph LR β€” flow left-to-right
Process flowgraph TB β€” steps top-to-bottom
InteractionssequenceDiagram β€” agent-user-system interactions
Options/modesgraph TB with subgraphs

Hero Diagram (rendered)

Diagram

Feature Name

πŸ“‹ Input

🧠 Process

βœ… Output

Hero Diagram (source)

graph LR
    subgraph "Feature Name"
        A[πŸ“‹ Input] --> B[🧠 Process]
        B --> C[βœ… Output]
    end

    classDef input fill:#6366F1,stroke:#7C90A0,color:#fff
    classDef process fill:#F59E0B,stroke:#7C90A0,color:#fff
    classDef output fill:#10B981,stroke:#7C90A0,color:#fff

    class A input
    class B process
    class C output

Sequence Diagram (rendered)

Diagram
FeatureAgentUserFeatureAgentUserRequestProcessResultResponse

Sequence Diagram (source)

sequenceDiagram
    participant User
    participant Agent
    participant Feature

    User->>Agent: Request
    Agent->>Feature: Process
    Feature-->>Agent: Result
    Agent-->>User: Response

Mintlify Components Usage

Every page must use `

    ,

    , and

    ` β€” these are not optional.

    Required Components

    ComponentPurposeRequired In
    `

      | Sequential flows | Quick Start section | |

      | Grouped content | Best Practices section | |

      | Related links | Related section | |

      | Multi-language examples | Code comparison | |