Skip to main content

bbagents

Buy me a coffee

Python building blocks for agent systems: tools, planning, model selection, memory, human approval, tracing, and evaluation. Works with LangGraph or your own runtime.

Companion code for Agentic AI: Architecture, Theory, and Practice. Buy on Brilberry Press or Buy on Barnes & Nobles.

Agentic AI: Architecture, Theory, and Practice by Marco Dinacci

Requires Python 3.11+.

Install from PyPI:

python -m pip install bbagents

For development, install from a repository checkout and run the tests:

python -m pip install -e '.[dev]'
pytest

Complete application example

Agent Stranded is a more complete example: an autonomous survival game using bbagents planning, tools, memory, skills, communication, and tracing, with an optional local LLM. Its code, documentation, and run instructions live in that separate repository.

Features

  • Typed tools, dependency-checked plans, structured model decisions and validation.
  • Prioritized behavior controllers with explicit abstention and selection traces.
  • Native behavior trees with running actions, cancellation and execution traces.
  • Typed decision-tree policies compiled to native trees, with event priorities and hysteresis.
  • Per-agent model selection, routing constraints, cost estimates and caching.
  • Capability policies, human intervention, explicit delegation and LangGraph interrupts.
  • Bounded async execution, retry policies, execution journals and effect reconciliation.
  • Versioned checkpoints, SQLite persistence, task budgets and completion gates.
  • Budgeted context, summarization contracts and provider-neutral retrieval (RAG).
  • Scoped, revisioned memory and skills; evaluated and approved procedure promotion.
  • Roles, messages, delegation and organizational governance.
  • Structured traces, isolated evaluation trials and compaction-continuation checks.
  • Optional Ollama, LangChain, LangGraph, LangSmith and Langfuse integrations.

No mandatory runtime dependencies. Applications own domain behavior and adapters.

See examples, demos and the guide.

Maintainers: see release instructions for publishing to PyPI.

Metadata

Release files for bbagents 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bbagents 0.4.1
File Size Uploaded Provenance Actions
bbagents-0.4.1.tar.gz 144.4 kB With provenance Details for bbagents-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bbagents 0.4.1
File Interpreter ABI Platform Actions
bbagents-0.4.1-py3-none-any.whl Python 3 none any Details for bbagents-0.4.1-py3-none-any.whl

Total release size: 221.6 kB

Release files / bbagents-0.4.1.tar.gz

Download URL bbagents-0.4.1.tar.gz
Size 144.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7e4a5191df170af201c1bae4e956e5df9e240e2053b2af22a5ab7b1cd0bf7a89
BLAKE2b-256 checksum
How to use checksums
f1e98062a9fe3b9f0173ddc88af33eca7870c346f172ccdb266ce9f798bdf53d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Release files / bbagents-0.4.1-py3-none-any.whl

Download URL bbagents-0.4.1-py3-none-any.whl
Size 77.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f435f306740acf36b1efed875bd2772cdcf869f8892477ace8e2896bb190950e
BLAKE2b-256 checksum
How to use checksums
7cd168187d5b2a35b48ef639a5096b5e136626da0dbaa729f9ce220d96842ad2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Security for bbagents 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for bbagents-0.4.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page