Praval: Multi-Agent AI Framework
Praval is a Python framework for building decentralized agent systems that use provider-neutral model execution, structured tool orchestration, memory, storage, observability, and Reef/Spore communication.
The current documentation is organized around the APIs users should build on now. The legacy string-returning APIs still work, but new code should prefer the structured model runtime APIs where provider capabilities, streaming events, structured outputs, multimodal input, and local LLM behavior are explicit.
The model runtime is the execution boundary inside agents. It does not replace Praval’s collaboration architecture: specialized agents coordinate through Reef messages and structured Spore payloads. Applications may define their own message schemas when stronger domain contracts are required.
Install
pip install praval
# Optional feature groups
pip install praval[memory]
pip install praval[storage]
pip install praval[mcp] # Python 3.10+
pip install praval[all]
Two Supported Entry Paths
Use Agent for direct provider-neutral model execution:
from praval import Agent
agent = Agent(
"assistant",
provider="openai",
model="gpt-5.4-mini",
config={"system_message": "Be concise."},
)
response = agent.generate(
"Summarize why capability validation matters.",
response_schema={
"type": "object",
"properties": {"summary": {"type": "string"}},
"required": ["summary"],
},
)
print(response.content)
Use decorated agents, Reef, and Spores for message-driven collaboration:
from praval import agent, broadcast, get_reef, start_agents
@agent("researcher", provider="ollama", responds_to=["request"])
def researcher(spore):
broadcast({"type": "finding", "text": spore.knowledge["topic"]})
@agent("editor", provider="ollama", responds_to=["finding"])
def editor(spore):
print(spore.knowledge["text"])
start_agents(
researcher,
editor,
initial_data={"type": "request", "topic": "agent systems"},
)
reef = get_reef()
reef.wait_for_completion(timeout=30)
reef.shutdown()
What To Read
User Guide
- Getting started
- Core concepts and API layers
- Application lifecycle
- Application configuration reference
- Model Runtime
- Providers
- Local LLMs
- Streaming
- Structured Outputs
- Multimodal Input
- Embeddings
- Tools
- MCP Tool Clients
- Exact-wheel demo certification
- HITL Troubleshooting
- Reef protocol and Spores
- Memory
- Storage
- Runtime Migration
- Migrate from v0.8.2 to v0.8.3
- Troubleshooting
- Documentation Quality
Observability
- Observability
- Install and five-minute quickstart
- Configuration reference
- Instrumentation map
- Distributed tracing
- Traces, metrics, and logs
- Collectors and deployment
- Sampling and performance
- Privacy and security
- Local SQLite diagnostics
- Lifecycle and troubleshooting
- API reference and v0.8.2 migration
- Ownership model
- Executed tutorial matrix
Evaluation
- Evaluation
- Install and five-minute quickstart
- Evaluation configuration reference
- Recommended agent and evaluator-agent patterns
- Defining evaluator agents
- Evaluator flow and capability policy
- Direct model judges
- Cases, datasets, and suites
- Agent and workflow evaluation
- Metrics, plugins, and RAGAS
- Gates, baselines, and CI
- Sampled online evaluation
- Stores and retention
- Evaluation telemetry and trace correlation
- Cost, privacy, and security
- Evaluation production recipes
- Troubleshooting
- Evaluation API reference
- Choose an evaluation mechanism
- Record boundary
- Executed evidence
Tutorials
Examples
API Reference
- API Reference
- Core API
- Model Runtime
- Decorators And Composition
- Providers
- Tool System
- Human-in-the-Loop And MCP
- Memory System
- Storage System
- praval.storage.data_manager
- praval.storage.base_provider
- praval.storage.storage_registry
- praval.storage.decorators
- praval.storage.providers.filesystem
- praval.storage.providers.postgresql
- praval.storage.providers.qdrant_provider
- praval.storage.providers.redis_provider
- praval.storage.providers.s3_provider
- Observability
- praval.observability.config
- praval.observability.lifecycle
- praval.observability.tracing.context
- praval.observability.tracing.tracer
- praval.observability.storage.sqlite_store
- praval.observability.export.console_viewer
- praval.observability.export.otlp_exporter
- praval.observability.instrumentation.manager
- Evaluation
Project
Documentation Policy
Sphinx source under docs/sphinx is the canonical documentation surface.
Generated HTML, generated API pages, and generated PDFs are build artifacts.
Older long-form manuals live under docs/archive and should be treated as
legacy background unless their content has been ported into the current Sphinx
guide.