Skip to main content
The docs command manages project documentation in .praison/docs/ that provides context to AI agents.

Quick Start

# List all docs
praisonai docs list
List project documentation example
# Create a new doc
praisonai docs create project-overview "This project is a Python web application..."

# Show a specific doc
praisonai docs show project-overview

Commands

List Docs

praisonai docs list
Expected Output:
                          Project Documentation                           
┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Name             ┃ Description                   ┃ Priority ┃ Tags        ┃ Scope     ┃
┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ project-overview │ Project overview              │ 100      │ overview    │ workspace │
│ architecture     │ System architecture           │ 90       │ design      │ workspace │
│ api-reference    │ API documentation             │ 80       │ api         │ workspace │
└──────────────────┴───────────────────────────────┴──────────┴─────────────┴───────────┘

Create Doc

praisonai docs create <name> <content>
Example:
praisonai docs create coding-standards "Use type hints for all functions. Follow PEP 8."
Expected Output:
✅ Doc created: coding-standards

Show Doc

praisonai docs show <name>
Example:
praisonai docs show project-overview
Expected Output:
Doc: project-overview
Description: Doc created via CLI: project-overview
Priority: 100

Content:
This project is a Python web application using FastAPI...

Delete Doc

praisonai docs delete <name>
Example:
praisonai docs delete old-doc
Expected Output:
✅ Doc deleted: old-doc

Doc File Format

Docs are stored as markdown files with YAML frontmatter:
---
description: "Project architecture overview"
priority: 10
tags: ["architecture", "design"]
---

# Architecture Overview

This project uses a microservices architecture...

Frontmatter Fields

FieldTypeDescription
descriptionstringShort description of the doc
priorityintPriority (higher = included first, default: 100)
tagslistTags for categorization

Storage Locations

LocationScopeDescription
.praison/docs/WorkspaceProject-specific docs
~/.praison/docs/GlobalShared across all projects

Use Cases

Project Context

Create docs that provide project context to agents:
# Create project overview
praisonai docs create project-overview "
# Project: MyApp

A Python web application for task management.

## Tech Stack
- FastAPI backend
- PostgreSQL database
- React frontend

## Key Features
- User authentication
- Task CRUD operations
- Real-time notifications
"

Coding Standards

praisonai docs create coding-standards "
# Coding Standards

- Use type hints for all function parameters
- Follow PEP 8 style guide
- Maximum function length: 50 lines
- Write docstrings for all public functions
- Use pytest for testing
"

API Documentation

praisonai docs create api-reference "
# API Reference

## Endpoints

### GET /api/tasks
Returns all tasks for the authenticated user.

### POST /api/tasks
Creates a new task.

### PUT /api/tasks/{id}
Updates an existing task.
"

Using Docs with @mentions

Reference docs in prompts using the @doc: mention:
praisonai "@doc:coding-standards review this code"
praisonai "@doc:api-reference add a new endpoint for users"

Python API

from praisonaiagents import DocsManager

# Initialize
docs = DocsManager(workspace_path=".")

# List all docs
all_docs = docs.list_docs()

# Get a specific doc
doc = docs.get_doc("project-overview")
print(doc.content)

# Create a doc
docs.create_doc(
    name="new-doc",
    content="# New Documentation\n\nContent here...",
    description="New documentation",
    priority=100,
    tags=["example"]
)

# Delete a doc
docs.delete_doc("old-doc")

# Get docs for context
context = docs.format_docs_for_prompt(
    include_docs=["project-overview", "coding-standards"],
    max_chars=10000
)

Best Practices

Keep Docs Focused

Each doc should cover one topic. Split large docs into smaller, focused ones.

Use Priority

Set higher priority for frequently needed docs so they’re included first.

Use Tags

Tag docs for easy filtering and organization.

Update Regularly

Keep docs in sync with your codebase changes.
  • Rules - Project rules for AI agents
  • Memory - Agent memory management
  • Mentions - @mention syntax for context