Skip to content

Interactive Jupyter notebooks for learning Praval - the Pythonic multi-agent AI framework

Notifications You must be signed in to change notification settings

aiexplorations/praval-tutorials

Repository files navigation

Praval Tutorials

Interactive Jupyter notebooks for learning Praval - the Pythonic multi-agent AI framework.

Prerequisites

  • Python 3.9+
  • An OpenAI or Anthropic API key

Setup

# Clone the repository
git clone https://github.com/yourusername/praval-tutorials.git
cd praval-tutorials

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install praval jupyter python-dotenv arxiv

# Create .env file with your API key
echo "OPENAI_API_KEY=your_key_here" > .env

# Start Jupyter
jupyter notebook

Tutorials

Notebook Topic Description
00_architecture.ipynb Architecture Core concepts - Reef, Spore, Agent, design patterns
01_hello_world.ipynb Hello World Your first agent - the @agent decorator, broadcasting, message routing
02_research_pipeline.ipynb Research Pipeline 3-agent pipeline with LLM integration using chat()
03_feedback_loop.ipynb Feedback Loop Iterative improvement with Generator → Critic → (retry or approve)
04_parallel_agents.ipynb Parallel Agents Fan-out/fan-in pattern with session correlation
05_tool_use.ipynb Tool Use Extend agents with reusable tools
06_agent_memory.ipynb Agent Memory Store and recall information with semantic search
07_qdrant_integration.ipynb Qdrant Integration Scale memory with a vector database
08_production_features.ipynb Production Distributed agents, security, observability

Video Course

These notebooks accompany the Praval Video Course on YouTube.

Key Concepts

The Coral Reef Philosophy

"Complexity should emerge from collaboration, not from the complexity of individuals."

Praval uses a coral reef metaphor:

  • Reef - The communication backbone connecting agents
  • Spore - Messages carrying knowledge between agents
  • Agent - Specialized processors that do one thing well

Core Pattern

from praval import agent, broadcast, chat

@agent("my_agent", responds_to=["my_message_type"])
def my_agent(spore):
    data = spore.knowledge.get("data")
    result = chat(f"Process this: {data}")  # LLM call
    broadcast({"type": "result", "output": result})

Requirements

For basic tutorials (01-05):

praval
python-dotenv
arxiv  # for tutorial 02

For memory tutorials (06-07):

praval[memory]

For Qdrant (07):

docker run -p 6333:6333 qdrant/qdrant

License

MIT

Links

About

Interactive Jupyter notebooks for learning Praval - the Pythonic multi-agent AI framework

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •