Soveren Agent Platform
Reusable runtime core for durable agent applications.
This repository contains the reusable runtime core shared by agent applications. It is intentionally separate from application repositories:
soveren-agent-platformowns reusable mechanics: durable queueing, run tracking, decision/action framework, batching, scheduler, sessions, integration contracts, and bundled SQLite adapters for the default embedded runtime.poruchenowns private product behavior: prompts, ClickUp tools, approval copy, policies, and app-specific schema.pulsell-agentowns Pulsell-specific media, transcription, vision, task, and workflow behavior.
The current package contains:
- asynchronous SQLite adapters with internal serialized transactions
- durable queue port with a SQLite adapter
- layered migration runner with platform/app migration providers
- platform migrations for
event_queueandagent_runs - durable queue API
- inbound batching module with SQLite state and flush wakeups
- agent worker module that consumes queue events and calls app-provided agents
- cron module with due-job leasing and app-provided handlers
- Telegram interface module that normalizes Telegram ingress into queue events
- optional Telegram adapter for inbound normalization and outbound sending
- high-level Telegram agent bootstrap for default polling deployments
- optional Telegram polling runtime builder with message and callback hooks
- LLM backend contracts and reusable OpenAI-compatible/session-backed backends
- agent run persistence helpers
- durable planner decision reuse across dispatch retries
- optional one-accepted-decision receipts across model and prompt changes
- rich planner context builder for batches, sessions, mailbox, actions, outbound, cron, and routing metadata
- optional app-neutral prompt formatter for rich planner context
- planner envelope that injects session routing and rich context into LLM requests
- execution session mailbox for prompts queued behind busy sessions
- persistent execution-session events, snapshots, and deterministic routing
- reusable stub execution backend and a low-level tmux command-session utility that requires an explicit completion marker
- reusable Codex app-server execution session backend
- optional Docker-isolated Codex backend with coarse resource profiles, persistent idle-stop lifecycle, and bounded egress
- packaged Codex sandbox image, per-conversation networks, and enforced shared egress boundary
- shared, tenant-isolated HTTP credential broker that keeps provider keys out of conversation sandboxes
- explicit app-neutral memory store and access-scoped Codex dynamic tools
- automatic conversation-scoped message history with FTS search, neighboring context, bounded searchable-history pruning, and read-only Codex dynamic tools
- Codex app-server dynamic tool contracts, registry, and fail-closed JSON-RPC tool-call handling
- session backend registry for wiring reusable and custom backends
- platform SQLite migration and schema compatibility checks
- generic actions/approvals lifecycle with app-registered executors
- generic outbound channel queue with app-registered senders
- explicit audited reconciliation for uncertain external effects
- decision dispatcher that maps typed decisions to outbound, actions, session mailbox, or cron side effects
- planner-dispatch helper for fake-tested context to side-effect pipelines
- runtime supervisor and
AgentPlatformAppcomposition helper for standard platform workers
See docs/ARCHITECTURE.md for the current architecture. See docs/API.md for the consumer integration API and quick start. See docs/CONSUMING_APP.md for a practical consuming-app guide covering package dependency, Telegram wiring, and app-owned tools such as ClickUp. See docs/EXTRACTION_PLAN.md for the rollout plan. See docs/PORTS.md for the queue/store abstraction strategy. See deploy/sandbox/README.md for the Docker sandbox deployment path.
Installation
uv add "soveren-agent-platform>=0.5,<0.6"
Use soveren-agent-platform[telegram]>=0.5,<0.6 when the app uses the bundled
Telegram adapter.
Consumer Quick Start
from pathlib import Path
from soveren_agent_platform.agent import AgentEvent, AgentHandler
from soveren_agent_platform.app_api import AgentPlatformApp
class AppAgentHandler(AgentHandler):
async def handle(self, event: AgentEvent) -> None:
...
app = (
AgentPlatformApp(db_path=Path("data/app.db"))
.use_batching()
.use_agent(handler=AppAgentHandler())
)
AgentPlatformApp applies and validates platform migrations before workers
start. Apps with a separate migration pipeline can call
await soveren_agent_platform.storage.bootstrap_platform_storage(db_path) themselves and pass
bootstrap_storage=False.
Local Development
uv sync --group dev
uv run ruff check src tests scripts
uv run mypy
uv run pytest
Release
Before the first release, run Bootstrap Runtime Packages from main. GitHub creates
new GHCR packages as private and does not expose a package-visibility API. After the
workflow creates all three bootstrap tags, set each package to Public in the
organization package settings and rerun the workflow. Its anonymous pulls must pass.
- Open a pull request into
main; direct pushes are blocked. - Wait for Python 3.12, Python 3.13, sandbox smoke, and CodeQL checks.
- Merge with squash or rebase after all conversations are resolved.
- Confirm the three public
bootstrapimages remain anonymously pullable. - Create and push a tag matching the package version, for example
v0.5.0. - Open the Publish workflow in GitHub Actions and approve the pending
pypideployment. PyPI authentication uses the configured trusted publisher, not a stored API token.
The pypi environment accepts only v* tags. The publish workflow additionally
checks that the tag version matches pyproject.toml and that the tagged commit
belongs to main. It fails before release validation unless all runtime package
namespaces have already passed the anonymous bootstrap pull.
Metadata
Release files for soveren-agent-platform 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| soveren_agent_platform-0.5.0.tar.gz | 148.1 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| soveren_agent_platform-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 372.9 kB
Release files / soveren_agent_platform-0.5.0.tar.gz
| Download URL | soveren_agent_platform-0.5.0.tar.gz |
|---|---|
| Size | 148.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
11aa5125aa158a5fcdb91566a45cf4da75be9e411914ddf6006e8b8ef4345f5f
|
|
BLAKE2b-256 checksum How to use checksums |
db562c3268359634698cf0155d6576937ea20233d46734206277968fa27fee38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Jul 24, 2026.
Transparency logRelease files / soveren_agent_platform-0.5.0-py3-none-any.whl
| Download URL | soveren_agent_platform-0.5.0-py3-none-any.whl |
|---|---|
| Size | 224.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
108c706765a3e2d12e9f7f08977523f7cc955ed5174d49307b54a7630b1aac84
|
|
BLAKE2b-256 checksum How to use checksums |
ff49883e37b9d4216347d685c5e600b2a1197388e59f95df534f88f76a124b76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Jul 24, 2026.
Transparency logSecurity for soveren-agent-platform 0.5.0
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.
Attestation for soveren_agent_platform-0.5.0.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 Jul 24, 2026.
Transparency logA 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.