Praval: Multi-Agent AI Framework๏
The Pythonic Multi-Agent AI Framework for building intelligent, collaborative agent systems
Praval (เคชเฅเคฐเคตเคพเคฒ) - Sanskrit for coral, representing how simple agents collaborate to create complex, intelligent ecosystems.
Overview๏
Praval is a revolutionary Python framework that transforms complex AI applications into simple, composable agent systems. Instead of monolithic AI systems, Praval enables you to create ecosystems of specialized agents that collaborate intelligently through a coral reef-inspired architecture.
Key Features:
- ๐ฏ Decorator-Based API
Transform functions into intelligent agents with simple
@agent()decorators- ๐ Reef Communication
Knowledge-first messaging between agents through structured โsporesโ
- ๐ง Comprehensive Memory
Multi-layered memory system with vector search and persistent storage
- ๐ง Multi-LLM Support
Seamless integration with OpenAI, Anthropic, and Cohere
- ๐๏ธ Self-Organizing
Agents coordinate without central orchestration
- ๐จ Production-Ready
Built with type safety, error handling, and scalability in mind
Quick Start๏
Installation๏
# Minimal installation
pip install praval
# With memory system
pip install praval[memory]
# With all features
pip install praval[all]
Your First Agent๏
Create a simple agent in just a few lines:
from praval import agent, chat, broadcast, start_agents
@agent("researcher", responds_to=["research_query"])
def research_agent(spore):
"""I'm an expert at finding and analyzing information."""
query = spore.knowledge.get("query")
result = chat(f"Research this topic deeply: {query}")
broadcast({
"type": "research_complete",
"findings": result,
"confidence": 0.9
})
return {"research": result}
# Start the agent system
start_agents()
# Send a research query
broadcast({
"type": "research_query",
"query": "What are the latest developments in multi-agent AI?"
})
Thatโs it! Youโve created an intelligent research agent that:
โ Listens for research queries โ Uses AI to generate insights โ Broadcasts results to other agents โ Returns structured data
Architecture Philosophy๏
Praval is inspired by coral reef ecosystems:
The Coral Reef Metaphor
Just as coral polyps are simple organisms that create complex reef ecosystems through collaboration, Praval agents are specialized functions that create sophisticated AI systems through communication.
Design Principles:
Specialization Over Generalization - Each agent excels at one thing
Declarative Design - Define what agents ARE, not what they DO
Emergent Intelligence - Complex behaviors from simple interactions
Zero Configuration - Sensible defaults, progressive enhancement
Composability - Agents combine naturally through standard interfaces
Whatโs Inside๏
User Guide
Tutorials
Examples
API Reference
Additional Resources
Key Capabilities๏
Decorator-Based Agent Creation๏
Transform any Python function into an intelligent agent:
@agent("explorer", channel="knowledge", responds_to=["concept_request"])
def explore_concepts(spore):
'''Find related concepts and broadcast discoveries.'''
concepts = chat("Related to: " + spore.knowledge.get("concept", ""))
return {"type": "discovery", "discovered": concepts.split(",")}
Reef Communication System๏
Agents communicate through a structured messaging protocol:
# Broadcast a message to all listening agents
broadcast({
"type": "task_request",
"task": "analyze_data",
"priority": "high"
})
# Agents automatically filter messages they care about
@agent("analyst", responds_to=["task_request"])
def handle_tasks(spore):
if spore.knowledge.get("task") == "analyze_data":
# Process the task
return {"status": "completed"}
Memory System๏
Multi-layered memory for persistent, intelligent agents:
@agent("researcher", memory=True, knowledge_base="./docs/")
def expert_agent(spore):
'''Expert with pre-loaded knowledge base.'''
question = spore.knowledge.get("question")
# Search long-term memory
relevant_info = expert_agent.recall(question)
# Store new knowledge
expert_agent.remember(f"Answered: {question}")
return {"answer": chat(f"Answer based on: {relevant_info}")}
Community & Support๏
GitHub: github.com/aiexplorations/praval
Issues: Report bugs or request features
PyPI: pypi.org/project/praval
Version Information๏
Current version: 0.7.9
Changelog:
v0.7.9 - Latest release with enhanced storage and tool systems
v0.7.x - Tool system, secure spores, unified storage
v0.6.x - Memory system integration
v0.5.x - Knowledge base and PDF support
v0.3.x - Multi-LLM provider support
See the Changelog for detailed version history.
License๏
Praval is released under the MIT License. See License for details.