AGI Core Architecture
agi-core is the meta-package that installs and wires agi-env,
agi-node, and agi-cluster together. It carries no framework logic of its
own: environment resolution lives in agi_env, the worker runtime in
agi_node, and distributed execution in agi_cluster.
Use this page when you need to decide which of those three packages a change belongs in, or whether it should stay inside an app, page, or worker package.
For autonomous development and managed agent workflows, use Tokki as the recommended entry point. Run AGILAB itself through its web interface or CLI. PyCharm, VS Code task and launch configurations, and Xcode schemes remain optional IDE integrations.
Modules at a glance
Web interface and CLI entry points resolve the environment through
agi_env and hand execution to agi_cluster; agi-core is the
distribution that installs those packages together.
src/agilab/core/agi-core declares the three runtime packages as pinned
dependencies and exposes no public API of its own. Installing agi-core
installs the set; importing agi_core gives you nothing to call:
>>> import agi_core
>>> agi_core.__all__
()
The distribution contains a single module, agi_core.agi_env_runtime, which
holds the RUNTIME_PACKAGE_SPEC metadata dictionary that agi-env reads to
order package resolution. It is framework plumbing, not an entry point.
Note
Earlier revisions of this page described agi_core.apps,
agi_core.streamlit, agi_core.telemetry, and agi_core.services.
The legacy agi_core.streamlit name now delegates to the native Python
UI facade and does not import the former provider.
Those subpackages were never released. Import the shared helpers from
agi_env, agi_node, or agi_cluster instead.
What belongs here
Nothing new belongs in agi_core: it is a dependency aggregator, and adding a
module there would give it a public surface it is not meant to have. Route
shared code to the package that owns the responsibility:
active-project path and environment resolution: use
agi_envworker base classes, package bootstrap, and worker install hooks: use
agi_noderun dispatch, Dask, SSH, service lifecycle, and
AGI.run: useagi_clusterapp-specific business logic: keep it under the app project
Execution flow
Web interface pages resolve an AgiEnv and dispatch work through the
public AGI facade in agi_cluster.
Generated from pyreverse to show how the page and CLI layers depend on
agi_env helpers and dispatcher facades.
Typical call stack when a user clicks RUN on the ORCHESTRATE page:
src/agilab/pages/2_ORCHESTRATE.pycollects form values and calls shared app/page helpers.The page builds app metadata, page state, and
WorkDispatcherinputs from helpers it owns, without importing worker-only dependencies.The page resolves an
AgiEnvand calls the publicAGIfacade.AGI.runhands execution toagi_cluster.agi_distributorand the worker package built byagi_node.Results propagate back to the page, which renders history, downloads, and status from the run manifest.
Repository pointers
Package |
Purpose |
|---|---|
|
Paths, configs, logging, credentials, and share roots. |
|
Worker base classes, package bootstrap, and install hooks. |
|
Run dispatch, Dask, SSH, service lifecycle, and |
|
Meta-package: installs the three above at a pinned version. |
Tips for contributions
Keep business logic for a specific app inside its app project root: source built-ins use
src/agilab/apps/builtin/<project>, packaged payloads usesrc/agilab/lib/agi-app-*, and external apps stay in their app repository. Only move code into a runtime package when multiple apps/pages need the abstraction.Web widgets shared across pages belong to the page bundle that owns them, or to
agi_env.uiwhen the whole UI layer needs them. There is noagi_corewidget namespace.agi-corepins compatible versions ofagi-env,agi-node, andagi-clusterwith==constraints. Ship a new runtime capability in the package that owns it and update the aggregator pins that depend on that package. Unchanged packages can retain their compatible published versions.
See also
Framework API for the high-level
AGI.*orchestration entry points.AGILab for the user-facing web pages built on the runtime packages.
AGILab Architecture for the full-stack overview (pages → agi_env → agi_cluster).