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.
Data analysis agent with CSV/Excel tools for reading, analyzing, and exporting data.
Simple
Agents: 1 — Single agent with data tools handles file operations and analysis.
Workflow
- Read data from CSV/Excel
- Analyze with filtering, grouping
- Generate statistical summaries
Setup
pip install praisonaiagents praisonai pandas openpyxl
export OPENAI_API_KEY="your-key"
Run — Python
from praisonaiagents import Agent
from praisonaiagents import read_csv, get_summary, filter_data
agent = Agent(
name="DataAnalyst",
instructions="You are a data analyst. Analyze data and provide insights.",
tools=[read_csv, get_summary, filter_data]
)
result = agent.start("Read sales_data.csv and provide a summary")
print(result)
Run — CLI
praisonai "Analyze data.csv and summarize key metrics" --tools pandas
Run — agents.yaml
framework: praisonai
topic: Data Analysis
roles:
data_analyst:
role: Data Analyst
goal: Analyze data and generate insights
backstory: You are an expert data analyst
tools:
- read_csv
- get_summary
- filter_data
tasks:
analyze_data:
description: Read sales_data.csv and provide a summary
expected_output: A data analysis report
Serve API
from praisonaiagents import Agent
from praisonaiagents import read_csv, get_summary, filter_data
agent = Agent(
name="DataAnalyst",
instructions="You are a data analyst.",
tools=[read_csv, get_summary, filter_data]
)
agent.launch(port=8080)
curl -X POST http://localhost:8080/chat \
-H "Content-Type: application/json" \
-d '{"message": "Summarize the uploaded data"}'
Advanced Workflow (All Features)
Agents: 1 — Single agent with memory, persistence, structured output, and session resumability.
Workflow
- Initialize session for analysis tracking
- Configure SQLite persistence for analysis history
- Read and analyze data with structured output
- Store insights in memory for comparison
- Resume session for iterative analysis
Setup
pip install praisonaiagents praisonai pandas openpyxl pydantic
export OPENAI_API_KEY="your-key"
Run — Python
from praisonaiagents import Agent, Task, AgentTeam, Session
from praisonaiagents import read_csv, get_summary, filter_data
from pydantic import BaseModel
# Structured output schema
class DataInsights(BaseModel):
dataset: str
row_count: int
key_metrics: list[str]
trends: list[str]
recommendations: list[str]
# Create session for analysis tracking
session = Session(session_id="analysis-001", user_id="user-1")
# Agent with memory and tools
agent = Agent(
name="DataAnalyst",
instructions="Analyze data and return structured insights.",
tools=[read_csv, get_summary, filter_data],
memory=True
)
# Task with structured output
task = Task(
description="Read sales_data.csv and provide structured insights",
expected_output="Structured data analysis",
agent=agent,
output_pydantic=DataInsights
)
# Run with SQLite persistence
agents = AgentTeam(
agents=[agent],
tasks=[task],
memory=True
)
result = agents.start()
print(result)
# Resume later
session2 = Session(session_id="analysis-001", user_id="user-1")
history = session2.search_memory("sales")
Run — CLI
praisonai "Analyze data.csv" --tools pandas --memory --verbose
Run — agents.yaml
framework: praisonai
topic: Data Analysis
memory: true
memory_config:
provider: sqlite
db_path: analysis.db
roles:
data_analyst:
role: Data Analyst
goal: Analyze data with structured output
backstory: You are an expert data analyst
tools:
- read_csv
- get_summary
- filter_data
memory: true
tasks:
analyze_data:
description: Read sales_data.csv and provide structured insights
expected_output: Structured data analysis
output_json:
dataset: string
row_count: number
key_metrics: array
trends: array
recommendations: array
praisonai agents.yaml --verbose
Serve API
from praisonaiagents import Agent
from praisonaiagents import read_csv, get_summary, filter_data
agent = Agent(
name="DataAnalyst",
instructions="Analyze data and return structured insights.",
tools=[read_csv, get_summary, filter_data],
memory=True
)
agent.launch(port=8080)
curl -X POST http://localhost:8080/chat \
-H "Content-Type: application/json" \
-d '{"message": "Analyze data", "session_id": "analysis-001"}'
Monitor / Verify
praisonai "test analysis" --tools pandas --verbose
Cleanup
Features Demonstrated
| Feature | Implementation |
|---|
| Workflow | Multi-tool data analysis |
| DB Persistence | SQLite via memory_config |
| Observability | --verbose flag |
| Tools | pandas (read, summary, filter) |
| Resumability | Session with session_id |
| Structured Output | Pydantic DataInsights model |
Next Steps