A BDI (Belief-Desire-Intention) agent framework built on Pydantic AI
Project description
Voluntas
Voluntas is a BDI (Belief-Desire-Intention) agent framework built on top of Pydantic AI. It provides structured beliefs, desires, intentions, adaptive planning, execution, reconsideration, usage tracking, and optional human-in-the-loop intervention.
Installation
pip install voluntas
Or with uv:
uv add voluntas
The distribution name is voluntas and the Python import is also voluntas.
Quick start
import asyncio
from pydantic_ai.models.test import TestModel
from voluntas import BDI
async def main() -> None:
agent = BDI(
model=TestModel(),
desires=["Prepare a concise project status report"],
intentions=["Inspect the available project information"],
)
await agent.bdi_cycle()
asyncio.run(main())
For production use, replace TestModel with a model supported by Pydantic AI
and install any provider-specific dependencies required by that model.
Public API
The main agent and commonly used schemas are available from the package root:
from voluntas import (
BDI,
BDIUsageTracker,
Belief,
BeliefSet,
Desire,
DesireStatus,
Intention,
Plan,
)
The complete schema surface is available from voluntas.schemas:
from voluntas.schemas import (
BeliefExtractionResult,
HighLevelIntentionList,
PlanManipulationDirective,
ReconsiderResult,
)
BDI lifecycle
Each cycle coordinates the following stages:
- Update beliefs from the current context and action outcomes.
- Deliberate over pending desires and their priorities.
- Generate a high-level intention when no active intention exists.
- Execute one intention step using Pydantic AI tools and toolsets.
- Reconsider the remaining plan after failed or changed work.
The framework supports MCP servers through the Pydantic AI integration passed
to BDI, as well as structured logs and aggregate usage tracking through
BDIUsageTracker.
Human-in-the-loop
Set enable_human_in_the_loop=True to allow failures to be presented to a
human for guidance. The guidance is interpreted into structured actions such
as retrying, modifying, replacing, inserting, skipping, or aborting plan
steps.
Development
Clone the repository and install development dependencies with uv:
uv sync --group dev
uv run pytest
The repository also contains SBench and benchmark runners for research and
experiments. The runners use a local LiteLLM proxy that exposes an
OpenAI-compatible API; they are development applications and are not part of
the published voluntas package.
Set the proxy connection before running the local examples:
export LITELLM_BASE_URL=http://localhost:4000
export LITELLM_API_KEY=sk-1234
export LITELLM_MODEL=gpt-5.3-codex
The value of LITELLM_MODEL must match a model alias configured in the proxy.
License
Voluntas is released under the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file voluntas-0.1.0.tar.gz.
File metadata
- Download URL: voluntas-0.1.0.tar.gz
- Upload date:
- Size: 42.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb1ddb0803dbc49f1578cb225ea5aa04ba2734d9e88eac89f82499a9a76778fc
|
|
| MD5 |
8ac4d7a10bb484f3b410c69fe45d5f55
|
|
| BLAKE2b-256 |
aeda78fb315a4e9e23547e66345f9e8d35187ede320e6d4fffc7ac1f664e8abf
|
File details
Details for the file voluntas-0.1.0-py3-none-any.whl.
File metadata
- Download URL: voluntas-0.1.0-py3-none-any.whl
- Upload date:
- Size: 54.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36aacc6e9eaf724e761ae1328235c3966ad34b9c426009964c7e7b819f4a860b
|
|
| MD5 |
08843b88ab71808a4e6e8047c0b5e307
|
|
| BLAKE2b-256 |
8f5a7a909c3c6b2b0e603f7ecb7406872554f20aeea468ff0db1cfe2dbbf1fea
|