Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
Content generation agent that outputs properly formatted Markdown.
Simple
Agents: 1 — Single agent for content generation with Markdown formatting.
Workflow
- Receive content request
- Generate content with LLM
- Format output as Markdown
Setup
pip install praisonaiagents praisonai
export OPENAI_API_KEY="your-key"
Run — Python
from praisonaiagents import Agent
agent = Agent(
name="MarkdownWriter",
instructions="You are a Markdown agent. Output in proper Markdown format."
)
result = agent.start("Write a README for a Python web scraping project")
print(result)
Run — CLI
praisonai "Write a README for a Python project"
Run — agents.yaml
framework: praisonai
topic: Documentation Generation
roles:
markdown_writer:
role: Markdown Content Specialist
goal: Generate well-formatted Markdown content
backstory: You are an expert technical writer
tasks:
write_docs:
description: Write a README for a Python web scraping project
expected_output: A complete README.md
Serve API
from praisonaiagents import Agent
agent = Agent(
name="MarkdownWriter",
instructions="You are a Markdown agent."
)
agent.launch(port=8080)
curl -X POST http://localhost:8080/chat \
-H "Content-Type: application/json" \
-d '{"message": "Write a changelog for version 2.0"}'
Advanced Workflow (All Features)
Agents: 1 — Single agent with memory, persistence, structured output, and session resumability.
Workflow
- Initialize session for document tracking
- Configure SQLite persistence for content history
- Generate content with structured output
- Store in memory for iterative editing
- Resume session for document updates
Setup
pip install praisonaiagents praisonai pydantic
export OPENAI_API_KEY="your-key"
Run — Python
from praisonaiagents import Agent, Task, AgentTeam, Session
from pydantic import BaseModel
# Structured output schema
class Document(BaseModel):
title: str
sections: list[str]
content: str
# Create session for document tracking
session = Session(session_id="docs-001", user_id="user-1")
# Agent with memory
agent = Agent(
name="MarkdownWriter",
instructions="Generate structured Markdown documents.",
memory=True
)
# Task with structured output
task = Task(
description="Write a README for a Python web scraping project",
expected_output="Structured document",
agent=agent,
output_pydantic=Document
)
# Run with SQLite persistence
agents = AgentTeam(
agents=[agent],
tasks=[task],
memory=True
)
result = agents.start()
print(result)
# Resume later
session2 = Session(session_id="docs-001", user_id="user-1")
history = session2.search_memory("README")
Run — CLI
praisonai "Write a README" --memory --verbose
Run — agents.yaml
framework: praisonai
topic: Documentation Generation
memory: true
memory_config:
provider: sqlite
db_path: docs.db
roles:
markdown_writer:
role: Markdown Content Specialist
goal: Generate structured Markdown content
backstory: You are an expert technical writer
memory: true
tasks:
write_docs:
description: Write a README for a Python web scraping project
expected_output: Structured document
output_json:
title: string
sections: array
content: string
praisonai agents.yaml --verbose
Serve API
from praisonaiagents import Agent
agent = Agent(
name="MarkdownWriter",
instructions="Generate structured Markdown documents.",
memory=True
)
agent.launch(port=8080)
curl -X POST http://localhost:8080/chat \
-H "Content-Type: application/json" \
-d '{"message": "Write a changelog", "session_id": "docs-001"}'
Monitor / Verify
praisonai "test markdown" --verbose
Cleanup
Features Demonstrated
| Feature | Implementation |
|---|
| Workflow | Single-step content generation |
| DB Persistence | SQLite via memory_config |
| Observability | --verbose flag |
| Resumability | Session with session_id |
| Structured Output | Pydantic Document model |
Next Steps