Skip to main content

Jarvis Core

Validate Release PyPI Python License: MIT

jarvis-agent-core is a small, typed, dependency-free Python library for building portable AI-agent runtimes. It provides reusable contracts and deterministic runtime primitives without requiring a particular model vendor, application, database, deployment platform, user interface or operating-system sandbox.

The package is designed to be useful standalone. Any Python application can install it, implement the provider protocol, and reuse the shared runtime contracts.

Install

Python 3.10+ is required. The current release is 0.16.0.

python -m pip install "jarvis-agent-core==0.16.0"

For development:

git clone https://github.com/abdullahalrifat/jarvis-core.git
cd jarvis-core
python -m pip install -e . -r requirements-dev.txt
python -m pytest

0.16.0 highlights

The 0.16.0 release adds provider-neutral empirical route calibration on top of the existing token-efficient runtime primitives:

  • Empirical route observations capture quality, correctness, latency, token usage, cost, tool failures, cache usage, source and timestamp.
  • Recency-weighted scoring gives recent production evidence more influence than stale observations.
  • Conservative routing safeguards require a minimum sample count and configurable quality floor before measured evidence can change route selection.
  • Reusable utility scoring balances quality and reliability with latency, cost and tool failures.
  • Backward-compatible observations allow existing consumers to continue loading older route evidence.

Calibration ownership

Core is the canonical home for the reusable calibration algorithm. The intended production architecture is:

Jarvis CLI -> AI Stack -> provider/model
     │             │
     └──────┬──────┘
            ▼
       jarvis-core
   contracts + calibration
  • Core: observation contracts, calibration algorithm, recency weighting, quality safeguards and route utility.
  • AI Stack: provider execution, runtime telemetry, persistence and conversion of telemetry into Core observations.
  • Jarvis: CLI behavior, real workload definitions and task-level evaluation.

Neither downstream application should implement a second calibration algorithm, and Core must never depend on either downstream application.

The 0.15.0 release added provider-neutral primitives for making agent execution more token-efficient and predictable:

  • Context budgets for bounded prompt/context construction.
  • Deterministic context compilation so relevant context can be selected and ordered consistently.
  • Agent state ledgers for compact, structured execution state instead of repeatedly replaying large histories.
  • Token estimation and usage/cost accounting for requests and accumulated model usage.
  • Route budgets and adaptive routing so applications can choose an appropriate model based on remaining budget and task signals.
  • Failure and command/file state recording for compact runtime bookkeeping.

These primitives are intentionally provider-neutral. Anthropic, Ollama, Hugging Face, LiteLLM and other provider integrations remain responsibilities of the consuming application. Provider-specific caching metadata, SDK behavior, credentials and transport logic do not belong in Core.

A typical application can use the primitives to keep the agent loop efficient: retrieve only relevant repository context, keep stable state structured and compact, use lightweight/local models for simple work, escalate to stronger models when task signals justify it, and rely on deterministic tools and verification rather than spending model tokens on work the runtime can perform directly.

See CHANGELOG.md for the complete release history.

What Core provides

Core contains provider-neutral building blocks for:

  • model requests, responses, usage and tool calls;
  • provider capability and routing primitives;
  • empirical route calibration and benchmark evidence;
  • agent capabilities and approval decisions;
  • portable sandbox requirements and consumer-owned sandbox executor contracts;
  • token accounting, budgets and context compaction;
  • artifacts and content-addressed references;
  • evidence, verification and completion requirements;
  • failure classification, recovery and retry policy;
  • multi-agent tasks, teams and orchestration;
  • instructions, memory and MCP permission vocabulary;
  • schedules, remote-run and execution-state contracts;
  • leases, permissions and execution-proof records;
  • repository/developer-intelligence primitives;
  • evaluation cases, benchmarks and tracing;
  • review/change transactions and verification policy;
  • reusable sandbox policy and host-boundary validation.

Common agent brain boundary

Core owns the meaning of agent execution: model contracts, tool vocabulary, capabilities, approval semantics, evidence, verification, execution state and portable isolation requirements. Applications own the actual execution adapters.

The Core boundary is deliberately implementation-neutral. A CLI can implement a sandbox with native OS primitives, while a server can implement the same requirements with containers or another isolated worker. Both consume the same policy semantics.

Provider-neutral model boundary

Core defines the model boundary but never ships a model-provider SDK. Concrete HTTP transports, SDK clients, credentials, endpoint-specific request formatting, retries and provider-specific error handling remain application responsibilities.

What Core deliberately does not do

Core does not:

  • call model APIs;
  • store API keys or credentials;
  • execute shell commands or arbitrary repository changes;
  • provide a database or persistence backend;
  • provide a web server, CLI or user interface;
  • start MCP processes;
  • enforce operating-system isolation itself;
  • provide a cloud-worker implementation;
  • impose tenancy, deployment or organization policy.

This boundary keeps the package portable and safe to embed in different applications.

Compatibility and release policy

  • semantic versioning is used while the pre-1.0 API stabilizes;
  • patch releases should remain compatible within a minor line;
  • breaking public contracts require a new minor version while the API remains pre-1.0;
  • releases are immutable once published;
  • PyPI publication uses GitHub Actions Trusted Publishing;
  • the package README is the PyPI project description, so documentation changes intended for PyPI require a new package version;
  • every release-worthy change must update pyproject.toml, CHANGELOG.md, README.md when applicable, and relevant docs/ files in the same PR;
  • CI enforces that the package version, changelog entry and README current-release/install version stay synchronized.

Release flow

code/docs change
    -> version + CHANGELOG + README/docs
    -> CI metadata consistency check
    -> full CI
    -> merge to main
    -> validate exact merged SHA
    -> build wheel + sdist
    -> clean-environment install check
    -> checksums + provenance
    -> GitHub Release
    -> PyPI Trusted Publishing

Consumers should depend on a published PyPI version rather than a mutable Git branch. During local development, an editable checkout may be used explicitly.

Development checks

python scripts/check_release_consistency.py
black --check src tests
ruff check src tests --select E9,F63,F7,F82
pytest -q --cov=jarvis_core --cov-report=term-missing --cov-fail-under=85
python -m build
python -m twine check dist/*

See docs/contract-boundaries.md, docs/empirical-calibration.md, docs/releasing.md, CONTRIBUTING.md, AGENTS.md and SECURITY.md.

License

Jarvis Core is available under the MIT License.

Metadata

Release files for jarvis-agent-core 0.16.0

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

Source distribution (sdist)

Source distribution for jarvis-agent-core 0.16.0
File Size Uploaded
jarvis_agent_core-0.16.0.tar.gz 58.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jarvis-agent-core 0.16.0
File Interpreter ABI Platform
jarvis_agent_core-0.16.0-py3-none-any.whl Python 3 none any Details

Total release size: 116.1 kB

Release files / jarvis_agent_core-0.16.0.tar.gz

Download URL jarvis_agent_core-0.16.0.tar.gz
Size 58.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8cfbb956ac43d0bf01d0b934f1fe2abdee6fca3d5a830a0ac0cd2074943d7f31
BLAKE2b-256 checksum
How to use checksums
99b438cc037fcb5d5bb80bbb1a6e2a81cbb1d07458434e95b3ee7f3336fa5d88
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 13, 2026.

Transparency log

Release files / jarvis_agent_core-0.16.0-py3-none-any.whl

Download URL jarvis_agent_core-0.16.0-py3-none-any.whl
Size 58.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9d65308ddfd8d07849f07ef7f605f2e1b130969fdb002fce3fe783f888c1b4ae
BLAKE2b-256 checksum
How to use checksums
11797b877cc10a8aacf9ad6a50a08d272952429cdb4b7fad82247fb07be89c7b
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 13, 2026.

Transparency log

Release history Release notifications | RSS feed

0.16.1

2 release files

This release

0.16.0 This release

2 release files

0.15.0

2 release files

0.14.0

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.11.0

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.5

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