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 ruff check voluntas tests scripts
uv run pytest
The CI workflow uses the same Ruff and pytest commands shown above.
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.
Automated releases
Releases are selected by applying exactly one of these labels to a pull request
before it is merged into main:
release:patchbumps0.1.0to0.1.1.release:minorbumps0.1.0to0.2.0.release:majorbumps0.1.0to1.0.0.
After the merge, the release workflow updates the package version and lockfile, runs lint and tests, builds and validates the distributions, creates a release commit and tag, and publishes to PyPI. A merged pull request without a release label does not publish anything. Multiple release labels make the workflow fail instead of choosing a version implicitly.
The pypi environment can have required reviewers if publishing should wait
for a final approval. Without reviewers, publishing proceeds automatically
after the labeled pull request is merged.
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.1.tar.gz.
File metadata
- Download URL: voluntas-0.1.1.tar.gz
- Upload date:
- Size: 43.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9183c00449e8867a1d2eac082c35f3d735cc6dde2ab69b58c5c067da8476bf19
|
|
| MD5 |
a3d4a1521ab17a779c2d6502802d28d6
|
|
| BLAKE2b-256 |
6dc412a79f6fbc535de5264797d4194b8d0a5fab5469aa8a39ca1845b18a2a85
|
Provenance
The following attestation bundles were made for voluntas-0.1.1.tar.gz:
Publisher:
release.yml on douglaschalegre/voluntas
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
voluntas-0.1.1.tar.gz -
Subject digest:
9183c00449e8867a1d2eac082c35f3d735cc6dde2ab69b58c5c067da8476bf19 - Sigstore transparency entry: 2147982793
- Sigstore integration time:
-
Permalink:
douglaschalegre/voluntas@ea78c69e83478c4f787782ce81de6755fc25c3eb -
Branch / Tag:
refs/heads/main - Owner: https://github.com/douglaschalegre
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ea78c69e83478c4f787782ce81de6755fc25c3eb -
Trigger Event:
pull_request
-
Statement type:
File details
Details for the file voluntas-0.1.1-py3-none-any.whl.
File metadata
- Download URL: voluntas-0.1.1-py3-none-any.whl
- Upload date:
- Size: 55.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05b01f559201425a3a7041e44bd90f1221b9123759679f0e44f49467f467afba
|
|
| MD5 |
7b149ac928a1d03e50aa8c60581ebc19
|
|
| BLAKE2b-256 |
00447a21dd5a40eff6dc7ae0f2ea3f0cc8d254f48074f7f2d6a8b85d4bbf175a
|
Provenance
The following attestation bundles were made for voluntas-0.1.1-py3-none-any.whl:
Publisher:
release.yml on douglaschalegre/voluntas
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
voluntas-0.1.1-py3-none-any.whl -
Subject digest:
05b01f559201425a3a7041e44bd90f1221b9123759679f0e44f49467f467afba - Sigstore transparency entry: 2147982798
- Sigstore integration time:
-
Permalink:
douglaschalegre/voluntas@ea78c69e83478c4f787782ce81de6755fc25c3eb -
Branch / Tag:
refs/heads/main - Owner: https://github.com/douglaschalegre
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ea78c69e83478c4f787782ce81de6755fc25c3eb -
Trigger Event:
pull_request
-
Statement type: