Skip to main content

surf-agentic-base

ci licence: EUPL-1.2 python cite

The agentic base layer for SURF: the record and referee for agent runs, the security primitives an agent needs on a shared platform, and the engineering standard that keeps both honest. It is the contracts layer under a set of capability blocks, one per SURF system, that live in their own packages; see docs/architecture/blocks.md.

It is built on the SURF Developer Platform golden path and adopts the common stack wherever the common stack has an answer. It contains only the parts we could not find anywhere else.

The problem it addresses

Agent runs are a fourth execution pattern beside training, fine-tuning and inference: a long-lived loop that consumes inference and executes code. They are expensive, hard to reproduce, and easy to report wrongly. This service records what actually ran with enough provenance to replay it and to audit it, and adjudicates whether a comparison between two configurations is sound enough to publish. It does not drive execution: the job orchestrator and the model server are other systems, and the two HPC modules here are a result channel and cluster facts, nothing more.

Adopted, not written here

It does not ship an agent framework, a tracing backend, a metrics store, a dashboard, an experiment tracker, a workflow engine, or an inference server. Every one of those exists and is better than anything we would write. See the reuse ledger for what is adopted and from where.

The two modules that are the reason it exists

module what it does why nothing off the shelf does it
agentic_base.domain.run_record one row per run: the transcript the model actually received, the provenance of its environment, and the provenance of its outcome label experiment trackers record what a run produced; almost none record who decided whether it was right, or whether the instrument that decided was working
agentic_base.domain.validity adjudicates whether a contrast across arms is sound, by detecting exclusion channels whose rate differs by arm, and reports the per-arm accounting behind the verdict trackers store, version and visualise runs. None of them tell you your comparison is invalid, and no reporting standard in agent evaluation asks for the accounting that would show it

Neither is exported in a private format. agentic_base.provenance turns one record into W3C PROV, an OpenLineage run event and a Process Run Crate, each through that standard's own library, with the scorer and its authority carried as a declared extension whose schema is in docs/schemas/.

The second is not a new mechanism, and the README used to overclaim it as one. Clinical trials have shipped exactly this artifact for two decades: the CONSORT flow diagram, a per-arm accounting of everyone who left the denominator and why, mandatory for publication since 2001, with an extension for AI interventions since 2020. The defect it exposes has a name in the missing-data literature, missingness that is MNAR with respect to the treatment arm. What is missing is not the idea. No experiment tracker implements the check, and no reporting standard in agent evaluation requires the accounting, so validity implements the check and flow_by_arm produces the accounting in the standard's vocabulary: assessed, excluded with reasons, analysed.

Installing

pip install surf-agentic-base                # the library half: four dependencies, Python 3.10+
pip install 'surf-agentic-base[provenance]'  # plus the three provenance-standard libraries
pip install 'surf-agentic-base[service]'     # the service: FastAPI, storage, tracing, MCP

The import name is agentic_base. The distribution is named surf-agentic-base because agentic-base on PyPI belongs to an unrelated project.

Running locally

just run          # uvicorn with reload on :8080
just check        # tests with coverage, ruff, mypy

SQLite by default so it runs with no infrastructure. PostgreSQL, provided as a platform tenant resource, in every deployed environment.

Documentation

The standard

docs/ENGINEERING.md is why the rules are the rules: what each cost to learn, and the guard that enforces it. CONTRIBUTING.md is the short form for someone about to open a pull request.

Where development happens

Here. Changes land on main through pull requests that the gate has passed on both ends of the supported Python range. SURF's own deployment of this service, the environment overlays and the internal pipeline definition, is kept apart from this repository because it describes where the software runs rather than what it does. The mechanism is general and is documented in docs/architecture/deployment-overlay.md: a deployment repository is this one plus an additive overlay, kept current by merging main, with scripts/overlay.py to compose, check and sync.

Versioning and releases

Semantic versioning, with the version taken from the git tag. While the major version is 0, a minor bump may change the public interface. The import name changed once, from app to agentic_base in 0.2.0, because a top-level app collides with the first package any consumer of a web template already has. Releases are tagged vX.Y.Z and each carries generated notes and a built distribution. See CONTRIBUTING.md for the release procedure.

Citation

Cite the repository using CITATION.cff; GitHub renders it under Cite this repository.

Licence

European Union Public Licence v. 1.2. See LICENSE.

Metadata

Release files for surf-agentic-base 0.3.4

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

Source distribution (sdist)

Source distribution for surf-agentic-base 0.3.4
File Size Uploaded
surf_agentic_base-0.3.4.tar.gz 598.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for surf-agentic-base 0.3.4
File Interpreter ABI Platform
surf_agentic_base-0.3.4-py3-none-any.whl Python 3 none any Details

Total release size: 674.9 kB

Release files / surf_agentic_base-0.3.4.tar.gz

Download URL surf_agentic_base-0.3.4.tar.gz
Size 598.1 kB
Tags Source
SHA-256 checksum
How to use checksums
26b8e7901963c26f08110f42df78a9daac883e457c4b58f8adea2ff486ed8ef2
BLAKE2b-256 checksum
How to use checksums
339fe4a4154eeb6c6242f980835a8a449b301d18bd104ca7a104a03eebf1f639
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 12, 2026.

Transparency log

Release files / surf_agentic_base-0.3.4-py3-none-any.whl

Download URL surf_agentic_base-0.3.4-py3-none-any.whl
Size 76.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
71ba8d24c34f50fbb2eb54a3fb74b5d5e2b7d88123596873c4c46da3751d1af8
BLAKE2b-256 checksum
How to use checksums
93e74f43f5537cd2b27da670da1e81e8ce5073d8150fc76bfca797f9a894d5db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 12, 2026.

Transparency log

Release history Release notifications | RSS feed

0.9.0

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

This release

0.3.4 This release

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.0

2 release files

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