Quick Start

Supported Mentions
| Mention | Syntax | Description |
|---|---|---|
| File | @file:path/to/file.py | Include file content |
| Doc | @doc:doc-name | Include doc from .praison/docs/ |
| Web | @web:search query | Search the web |
| URL | @url:https://... | Fetch URL content |
| Rule | @rule:rule-name | Include specific rule |
File Mention
Include file content in your prompt:- The file content is read
- Content is wrapped in a code block with language detection
- Content is prepended to your prompt
Relative and Absolute Paths
Doc Mention
Include documentation from.praison/docs/:
- Create docs using
praisonai docs create - Or add markdown files to
.praison/docs/
Web Mention
Search the web and include results:- Web search is performed using DuckDuckGo
- Top 3 results are included
- Results are prepended to your prompt
Requires
duckduckgo-search package: pip install duckduckgo-searchURL Mention
Fetch and include content from a URL:- URL content is fetched
- HTML is converted to text
- Content is truncated if too long (max 10KB)
Rule Mention
Include a specific rule from.praison/rules/:
Multiple Mentions
Combine multiple mentions in a single prompt:- All mentions are extracted
- Content is fetched for each mention
- All content is prepended to the cleaned prompt
- Agent processes the combined context
Context Format
When mentions are processed, the context is formatted as:Doc: coding-standards
Use type hints for all functions. Follow PEP 8 style guide.Web Search: python best practices
- “Python Best Practices” - realpython.com …
Task:
review and improve this codeUse Cases
Code Review
Documentation
Learning
Research
Refactoring
File Size Limits
By default, file content is limited to 500,000 characters (~125K tokens), which fits comfortably in modern LLMs like GPT-4o (128K), Claude 3.5 (200K), and Gemini (1M+).Configuring the Limit
- Environment Variable
- Python API
Limit Priority
- Constructor parameter - Highest priority
- Environment variable (
PRAISON_MAX_FILE_CHARS) - Default - 500,000 characters
Truncation Warning
When a file is truncated, a warning is logged:Recommended Limits by Model
| Model | Context Window | Recommended max_file_chars |
|---|---|---|
| GPT-4o | 128K tokens | 400,000 (default is fine) |
| Claude 3.5 Sonnet | 200K tokens | 600,000 |
| Claude Sonnet 4 | 1M tokens | 3,000,000 |
| Gemini 2.5 Pro | 1M tokens | 3,000,000 |
| GPT-5 | 400K tokens | 1,200,000 |
Token estimation: ~4 characters per token for English/code. Leave room for system prompt and output tokens.
Limitations
| Limitation | Details |
|---|---|
| File size | Default 500KB, configurable via PRAISON_MAX_FILE_CHARS |
| URL content | Max 10KB after HTML stripping |
| Web search | Top 3 results only |
| Nested mentions | Not supported |
Best Practices
Be Specific
Use specific file paths rather than directories
Combine Wisely
Don’t overload with too many mentions - context has limits
Create Docs
Create reusable docs for frequently needed context
Use Rules
Reference rules for consistent coding standards
Troubleshooting
| Issue | Solution |
|---|---|
| File not found | Check the file path is correct and file exists |
| Doc not found | Create the doc with praisonai docs create |
| Web search failed | Install duckduckgo-search package |
| URL fetch failed | Check URL is accessible and valid |
Related
- Docs - Manage project documentation
- Rules - Manage project rules
- CLI Overview - PraisonAI CLI documentation

