Skip to main content

AgentCore

AgentCore is the engine runtime package for FrontierAgent. It is the single source of truth for the product-neutral execution engine: FrontierAgent owns the product experience and composition, while AgentCore owns the reusable runtime beneath it.

The repository exists to remove a failure-prone workflow: implementing a core change independently in two products and then opening more pull requests to reconcile the copies. Shared behavior is changed and reviewed here once; FrontierAgent consumes an immutable AgentCore release and keeps only its product adapters, workflows, tools, and user-facing surfaces.

Current scope

Version 0.2.x contains the converged foundation layer:

  • native message types and constructors;
  • token-estimation helpers;
  • compaction policy and deterministic compactor;
  • context-budget estimation and non-blocking tokenizer access;
  • message trimming;
  • bounded LLM summaries, projected-token triggers, and tiered compaction;
  • session-isolated, content-addressed spill storage for recoverable tool output;
  • product-neutral identity/status types, kernel events, and task-local execution context propagation;
  • failure-isolated async event dispatch and composable fail-closed tool permission policy;
  • provider-neutral LLM response, stream, and client contracts;
  • profile-driven auxiliary-client construction, summary execution, legacy cooldown fallback, and task-local external-API metering;
  • loop configuration, lifecycle contexts, observer protocol, intervention merging, and observer dispatch helpers.
  • streamed tool-call recovery checks for missing required arguments.
  • LLM binding, response normalization, streaming assembly/watchdogs, retry classification, runaway recovery, and physical-call orchestration.
  • model profiles, thinking/history normalization, and multi-format tool-call parsing;
  • parallel tool execution and the complete agent-loop orchestration engine, with product behavior isolated behind typed hooks.
  • append-only, scope-isolated durable run journals with content-addressed blob attachments, projections, and event-sourced notes;
  • MiniDAG execution, declarative pipeline models, dynamic graph construction, and scoped service/agent/pipeline/topology registries;
  • reusable LLM middleware for proxying, summarization, skill injection, and stream-repetition detection;
  • portable loop observers for budget/context/wall-clock guards, finalization, repetition detection, SSE events, task boards, and bounded trajectories;
  • complete agent-bus communication, spawn control, reusable sessions, result recovery, fan-in policy, shared pools and stop signals;
  • portable tools, task/finalization budgets, role-scoped resource management, and backend-injected DAG scheduling;
  • filesystem skill loaders, session history, renewable wall-time leases, and language helpers.

The initial extraction is based on the already-merged integration branches:

  • ApodexHarness c1229050 (PR #501);
  • FrontierAgent (originally extracted from FrontierAgentInternal) 63b89c8 (PR #92).

Those revisions are provenance, not runtime dependencies. AgentCore tests and builds without either product checkout.

The shared loop accepts product decisions through explicit hooks. Products own composition roots, endpoint configuration, metering policy, durable-journal root/scope selection, and sandbox mount policy; they no longer need private copies of the orchestration, parsing, context-management, DAG, observer, or spill-storage engines.

Repository boundary

Code belongs in AgentCore when it:

  • has the same behavioral contract in every product;
  • does not import miroharness, frontier_agent, workflows, plugins, storage, or deployment configuration;
  • accepts product behavior through typed inputs or explicit hooks;
  • has tests that run without either product repository installed.

Provider catalogs, credentials, endpoint selection, host session-affinity context, billing policy, durable process/event-store implementations, user/session retention policy, checkpoint association, workflow node implementations, sandbox mounting/authorization, UI history, and product-specific observers remain in their product. AgentCore owns the provider transports and product-neutral affinity lifecycle safeguards.

Development

uv sync --frozen --extra dev
uv run ruff check agent_core tests scripts
uv run pyright agent_core
uv run pytest -q
uv build

For local work beside the product repositories:

uv pip install -e ../AgentCore

AgentCore uses the import namespace agent_core and the distribution name apodex-agent-core.

Consuming the release package

AgentCore is published on PyPI:

uv add apodex-agent-core        # or: pip install apodex-agent-core

FrontierAgent pins an exact version:

dependencies = [
  "apodex-agent-core==0.3.0",
]

Exact, because this is a 0.x series where a MINOR bump may be breaking. The pin makes each upgrade a reviewable event: Dependabot opens a pull request against it and FrontierAgent CI decides whether the new version is safe. See docs/downstream-bump.md.

No credential is involved anywhere in that path — the repository and the package are both public. Every release also has a GitHub Release carrying the wheel, the sdist, and its changelog section. See docs/versioning.md for what a version number means and CHANGELOG.md for what changed.

Release package contract

Each AgentCore release is the installable engine runtime used by FrontierAgent. The release must:

  • publish both a Python wheel and source distribution built from the tagged, clean repository state;
  • include the agent_core package, py.typed, README, and Apache-2.0 license, with package metadata matching the tag;
  • expose only product-neutral runtime APIs and keep FrontierAgent imports, prompts, workflow profiles, tools, UI/TUI code, benchmarks, credentials, and deployment configuration out of the package;
  • document compatibility or migration impact in CHANGELOG.md, and use the versioning rules in docs/versioning.md;
  • pass lint, type checking, the complete test suite, and an install/import smoke test against the built wheel before publication;
  • attach the wheel, source distribution, and matching changelog section to the GitHub Release, and publish the same artifacts to PyPI so Dependabot can open FrontierAgent's bump pull request.

A release is not complete merely because a tag exists. It is complete when its artifacts can be installed in a clean Python 3.12 environment, import agent_core succeeds, the artifacts carry the repository license, and FrontierAgent CI passes against the exact released version. Release artifacts must not depend on a sibling checkout or files outside the distribution.

Change and release workflow

  1. Reproduce a shared bug with an AgentCore test.

  2. Change AgentCore in one pull request. Bump [project].version, run uv lock, and add a CHANGELOG.md entry — CI fails a pull request that changes published code without a version bump.

  3. Merge, then tag and push:

    git switch main && git pull
    git tag -a v0.3.0 -m 'AgentCore 0.3.0'
    git push origin v0.3.0
    

    The Release workflow verifies the tag matches the declared version, re-runs the full check suite against the tagged tree, builds and validates the artifacts, publishes them to PyPI through Trusted Publishing, then creates a retry-safe GitHub Release with the wheel, sdist, and changelog section.

  4. Dependabot normally opens an exact-version bump PR in each product. While GitHub's current uv updater defect is unresolved, open that PR with the documented no-credential manual fallback instead. See docs/downstream-bump.md.

  5. Product CI validates adapters and end-to-end behavior. Product PRs must not patch vendored/shared implementation code.

docs/versioning.md covers the version scheme, what counts as a breaking change, why AgentCore is not on 1.0 yet, and why publishing to PyPI replaced the earlier Git-pin approach.

Product-only bugs stay in the product repository. If a proposed fix needs to edit both products' core copies, that is evidence it belongs here.

Migration plan

  1. Foundation (complete): messages, token estimation, deterministic compaction, context budget, trimming.
  2. Runtime contracts (complete): LLM protocols, loop types, errors, retry classification, and explicit product hooks are shared.
  3. LLM runtime (complete): binding, calls, streaming, response normalization, runaway recovery, and the public llm_client facade.
  4. Agent loop (complete in AgentCore): model/tool parsing, hook-driven tool execution, and agent_loop orchestration.
  5. Context management Phase 2 (complete in AgentCore): calibrated trigger, bounded LLM summary, tier selection, observability, and spill storage.
  6. Runtime foundation (complete in AgentCore): task identity/status, execution ContextVars, kernel events, event dispatch, and tool permissions.
  7. Portable runtime batch (complete in AgentCore): durable run journals, MiniDAG/graph construction, middleware/observers, agent-bus coordination primitives (shared pools and stop signals), skills, session history, models, and scoped registries.
  8. Agent-bus scheduling (complete in AgentCore): communication models, durable result-message recovery, runtime, spawn guard, reusable sessions, bus/fan-in orchestration, resource management, task budgets, and the backend-injected DAG scheduler. Product tool assembly, persistence backends, and workflow policy remain downstream.
  9. Provider substrate (complete in AgentCore): shared provider transports, fallback engine, prompt cache, usage metadata normalization, and non-blocking streaming behind product configuration and session-affinity adapters.
  10. Shared runtime closeout: portable usage metering, configurable aux-LLM construction, summary execution, tool-call repair/guardrails, and safe workflow-default merging.
  11. Remove product compatibility facades after downstream imports have moved to agent_core and the compatibility window has elapsed.

Each slice must leave product CI green and must not depend on a floating branch.

License

AgentCore is licensed under the Apache License 2.0, the same license as FrontierAgent.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apodex_agent_core-0.3.0.tar.gz (595.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

apodex_agent_core-0.3.0-py3-none-any.whl (431.6 kB view details)

Uploaded Python 3

File details

Details for the file apodex_agent_core-0.3.0.tar.gz.

File metadata

  • Download URL: apodex_agent_core-0.3.0.tar.gz
  • Upload date:
  • Size: 595.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for apodex_agent_core-0.3.0.tar.gz
Algorithm Hash digest
SHA256 180adfa21ce2444ce1d880d79943ab55e877f7d2d507d843112d2a436b57aea4
MD5 926531f0e50e7fe977ed67ba24e8a3c5
BLAKE2b-256 4dfda27152657ff83ce28234d84586d7533969470970706c80d7ff52fa4fb130

See more details on using hashes here.

Provenance

The following attestation bundles were made for apodex_agent_core-0.3.0.tar.gz:

Publisher: release.yml on ApodexAI/AgentCore

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file apodex_agent_core-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for apodex_agent_core-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28414cb26c9580a9551895ce87cbfa4188c484b3839c503cb84e1b771fda54dd
MD5 029ebf104e475f616575d2fbf7fc29f0
BLAKE2b-256 9c078da9a0a3217906f98bdb032473b4303ec588c4a1081da4f0c42c60136d34

See more details on using hashes here.

Provenance

The following attestation bundles were made for apodex_agent_core-0.3.0-py3-none-any.whl:

Publisher: release.yml on ApodexAI/AgentCore

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.10.0

2 files

0.9.0

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

0.7.0

2 files

0.4.0

2 files

This release

0.3.0 This release

2 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