Models
- Recommended:
command-r-plus(best quality) - Fast/Cheap:
command-r(balanced) - Latest:
command-a-03-2025(newest) - Small:
command-r7b-12-2024(efficient)
Python
Copy
# export COHERE_API_KEY=your-api-key
from praisonaiagents import Agent
agent = Agent(
instructions="You are a helpful assistant",
llm="command-r-plus"
)
agent.start("Explain natural language processing")
With Tools
Copy
# export COHERE_API_KEY=your-api-key
from praisonaiagents import Agent
def search_documents(query: str) -> str:
"""Search internal documents."""
return f"Found documents related to: {query}"
agent = Agent(
instructions="You are a document assistant",
llm="command-r",
tools=[search_documents]
)
agent.start("Find documents about machine learning")
Multi-Agent
Copy
# export COHERE_API_KEY=your-api-key
from praisonaiagents import Agent, Task, Agents
researcher = Agent(
instructions="You research topics thoroughly",
llm="command-r-plus"
)
writer = Agent(
instructions="You write clear summaries",
llm="command-r"
)
task1 = Task(description="Research NLP techniques", agent=researcher)
task2 = Task(description="Write a summary", agent=writer)
agents = Agents(agents=[researcher, writer], tasks=[task1, task2])
agents.start()
CLI
Copy
export COHERE_API_KEY=your-api-key
# Basic prompt
python -m praisonai "Explain AI" --llm command-r-plus
# Run agents.yaml
python -m praisonai
YAML
Copy
framework: praisonai
topic: NLP research
agents:
researcher:
role: NLP Researcher
goal: Research language processing techniques
instructions: You are an expert in NLP
llm:
model: command-r-plus
tasks:
research_task:
description: Research the latest NLP techniques
expected_output: Comprehensive NLP research report
writer:
role: Technical Writer
goal: Create clear documentation
instructions: You write clear technical content
llm:
model: command-r
tasks:
write_task:
description: Write a summary of the research
expected_output: Well-written technical summary

