BaselithCore
Agents that survive production. Durable execution, enforced budgets, and EU AI Act evidence — self-hosted, with no companion SaaS.
BaselithCore is a Python orchestration engine for agentic AI. Execution state is checkpointed as a run proceeds, so an interrupted process resumes from its last completed step instead of replaying side effects. Every request carries a budget that caps iterations, tool calls, tokens and USD spend, and every step emits OpenTelemetry spans and Prometheus metrics with real cost attached. The audit trail a regulated deployment has to produce is written while the system runs, not reconstructed from logs afterwards.
Quick start · Docs · Website · Marketplace · Architecture · Contributing
Writing a plugin? You keep your source. The plugin exception lets any plugin that uses the framework as a library ship under any licence you like, including a closed one. Same terms for everyone.
Why BaselithCore
- Agents that survive production. Durable execution with checkpoint/resume, replayable tool steps, state history and fork/rewind — a
SIGKILLmid-run recovers without repeating a single side effect. - Everything included, nothing rented. Evaluation suites, LLM-as-judge, red-teaming, OpenTelemetry tracing, Prometheus metrics with real USD cost, Helm/Terraform deployment — built in and self-hosted, with no companion SaaS to subscribe to.
- Brakes, not just horsepower. Autonomy gating, durable human-in-the-loop approvals, per-request cost budgets, prompt-injection guardrails, sandboxed code execution — every seam fail-closed by default, plus opt-in EU AI Act / GDPR / NIS2 / DORA primitives with evidence trails.
Sixty seconds
pip install baselith-core
from core.agent import Agent, Crew, Task
researcher = Agent(system_prompt="You are a meticulous researcher.")
writer = Agent(system_prompt="You write crisp executive summaries.")
crew = Crew(agents=[researcher, writer], tasks=[
Task("Research {topic} and list the key facts.", agent=researcher),
Task("Write a summary from the research.", agent=writer),
])
report = (await crew.run(inputs={"topic": "vector databases"})).final
Typed, budgeted and observable from the first line — the quickstart adds tools, structured output and a checkpoint store.
Architecture at a glance
graph TD
subgraph SC["Sacred Core (Agnostic Engine)"]
A["Core Orchestrator<br/>(intent · routing · adaptive loop · durable checkpoint/resume)"]
F["Flow Handlers"]
subgraph COG["Cognitive Layer"]
RE["Reasoning<br/>(MCTS · Tree-of-Thoughts)"]
WM["World Model<br/>(risk · rollback · simulation)"]
SW["Swarm<br/>(auction protocols)"]
PL["Planning"]
MT["Meta · Reflection · Adversarial"]
end
LP["Engineered Loops<br/>(verifier · stall guard · escalation)"]
M["Memory Hierarchy<br/>(STM → MTM → LTM)"]
S["Storage Layer<br/>(Postgres · Qdrant/pgvector · Redis)"]
R["Plugin Registry"]
RES["Resilience · Observability · Guardrails"]
end
A --> COG
A --> F
A --> LP
A --> M
M --> S
COG --> M
R --> C["Custom Agent Plugins"]
R --> D["Capability Extensions"]
R -.->|Inject Handlers| A
R -.->|Inject Routers| G["API Gateway"]
A --> H["LLM Layer<br/>(Anthropic · OpenAI · Gemini · Ollama · HF)<br/>native tool-calling · typed output · cross-provider fallback"]
F --> H
A --> I["Interop<br/>(MCP · A2A streaming · AP2 mandates · realtime duplex)"]
A -.->|wrapped by| RES
Two rules hold the shape: core/ stays domain-agnostic, and everything
domain-specific is a plugin. The architecture
docs go deeper.
What's inside — the full capability list
| Typed agents & declarative crews | Single-import Agent, sequential/parallel/manager-led Crew, free-form group chat → Agent API |
| Durable execution & time-travel | Checkpoint/resume (Postgres, SQLite or in-memory), replayable tool steps, state history, fork/rewind → Orchestration |
| Loop engineering | Verifier-owned loops with stall detection, feed-forward lessons, escalation and resumable outcomes → Loops |
| Structured event streaming | Per-run agent events in-process or over SSE, plus async run submission with completion webhooks → Orchestration |
| Cognitive layer | MCTS, Tree-of-Thoughts, world model, swarm auctions & bounded handoffs → Reasoning · Swarm |
| Governance & safety | Autonomy gating, durable human-in-the-loop, plan approval, loop & tool budgets, layered guardrails, sandboxed code → Autonomy & Safety |
| Memory & RAG | STM→MTM→LTM hierarchy, hybrid search, hierarchical chunking, full RAG pipeline, Qdrant or pgvector backends → Memory |
| Multimodal | Vision, native PDF and audio content blocks, duplex realtime voice with barge-in → Realtime |
| Interoperability | Native dual-era MCP (server + client + declarative registry), A2A peer interop, AP2 signed-mandate commerce → MCP · A2A |
| Self-improvement, governed | Skill evolution, prompt compilation and evolutionary search — every change eval-gated, audited and human-approvable → Skill Evolution |
| Evaluation & observability | Trajectory eval in CI, multi-model bake-off, LLM-as-judge, red-team, OTel + Prometheus with USD cost metrics → Evaluation |
| Regulatory toolkit | Opt-in EU AI Act / GDPR / NIS2 / DORA primitives with evidence trails → Regulatory Compliance |
| Production deployment | Docker, Helm, Terraform, SLO rules, typed SDKs → Deployment |
Quick start
pip install baselith-core # core engine
docker compose up -d # Redis, PostgreSQL, Qdrant (optional)
baselith doctor # validate environment and configuration
Optional capabilities (RAG, browser automation, OCR, extra model providers, vector backends, …) install as extras — the installation guide has the full list.
Contributing
Contributions are welcome, and the on-ramps are deliberately marked:
- good first issue — scoped, with context and an acceptance check
- help wanted — bigger pieces that need an owner
- Discussions — questions, ideas, and what you built
CONTRIBUTING.md covers the dev setup, the quality gates your PR has to pass, and the review turnaround you can expect.
Version 0.31.0 ships 6,884 tests at 80% branch coverage, gated in CI at a 75% floor alongside strict typing, architecture-boundary and docs-consistency checks.
Licence
BaselithCore is licensed under the GNU Affero General Public License v3.0 only (AGPL-3.0-only) — see LICENSE.
LICENSE.exception grants an additional permission under
AGPL section 7: a plugin that uses the framework as a library — rather than
modifying it — may be licensed under any terms you choose, including closed
ones, and section 13 never reaches it. The permission is offered to everyone on
identical terms. Two conditions come with it: your plugin must carry the notice
described in section 3(c), and patching files under core/ makes it a modified
framework rather than a plugin, in which case AGPL-3.0-only applies in full. See
plugin packaging for what
the notice has to say.
Copyright © 2026 BaselithCore Team.
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 baselith_core-0.31.1.tar.gz.
File metadata
- Download URL: baselith_core-0.31.1.tar.gz
- Upload date:
- Size: 2.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30ee0f548b64ef98e90605e6a74dd2575dfabe6aee87e302592a854a93b7f04b
|
|
| MD5 |
c97d4d54de094e1482c32aa0f8b47610
|
|
| BLAKE2b-256 |
1ca8329e15d2d32ec04878b1c0409d9096c1002e2c3533a7df58726428c29afd
|
Provenance
The following attestation bundles were made for baselith_core-0.31.1.tar.gz:
Publisher:
ci.yml on baselithcore/baselithcore
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
baselith_core-0.31.1.tar.gz -
Subject digest:
30ee0f548b64ef98e90605e6a74dd2575dfabe6aee87e302592a854a93b7f04b - Sigstore transparency entry: 2743072284
- Sigstore integration time:
-
Permalink:
baselithcore/baselithcore@eeef1150e6a31cad54178e5e96c598e7da9d35c3 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/baselithcore
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@eeef1150e6a31cad54178e5e96c598e7da9d35c3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file baselith_core-0.31.1-py3-none-any.whl.
File metadata
- Download URL: baselith_core-0.31.1-py3-none-any.whl
- Upload date:
- Size: 2.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c97a9370fbff379932726ebb93c3e32c37be93359a89d8b494ebb52b42f7e3af
|
|
| MD5 |
e814581187b7a692a65409806d916791
|
|
| BLAKE2b-256 |
457af64a8313672900fd26bfd610a1cc389af0a0e815af8bc9d7e83e48ff8b76
|
Provenance
The following attestation bundles were made for baselith_core-0.31.1-py3-none-any.whl:
Publisher:
ci.yml on baselithcore/baselithcore
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
baselith_core-0.31.1-py3-none-any.whl -
Subject digest:
c97a9370fbff379932726ebb93c3e32c37be93359a89d8b494ebb52b42f7e3af - Sigstore transparency entry: 2743072355
- Sigstore integration time:
-
Permalink:
baselithcore/baselithcore@eeef1150e6a31cad54178e5e96c598e7da9d35c3 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/baselithcore
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@eeef1150e6a31cad54178e5e96c598e7da9d35c3 -
Trigger Event:
push
-
Statement type: