agi-core Demo

Use this page only when you intentionally want the notebook path first.

If you want the main AGILAB product path first, use Quick-Start and run the built-in flight_telemetry_project from the web UI. This page shows how to run the built-in Minimal App example in a notebook using published packages.

Start here

Use the Kaggle launcher first:

Open In Kaggle

This launcher installs the published AGILAB runtime packages into an isolated Kaggle venv under /kaggle/working and runs the built-in Minimal App example app (minimal_app_project) without mutating the base notebook kernel packages.

Kaggle note: enable Internet in the notebook settings for the first install.

What will happen

The first notebook does only one thing:

  • it prepares an isolated runtime environment from published packages

  • it loads the built-in Minimal App example app

  • it runs one local AGI.run(...) call

  • it shows you where the run artifacts were written

What success looks like

Your first notebook run is complete when:

  • the notebook run finishes without error

  • you can inspect fresh output under ~/log/execute/minimal_app

Local PyPI fallback

If you want local Jupyter instead of Kaggle, use the published packages in a clean environment:

mkdir ~/agi-core-demo && cd ~/agi-core-demo
uv venv
source .venv/bin/activate
uv pip install "agilab[examples]"
jupyter lab

Then use the minimal notebook cells below in a blank notebook.

Minimal notebook cells

Cell 1: select the built-in Minimal App example app and create the local request.

from agi_cluster.agi_distributor import AGI
from agilab.notebook_demo import notebook_agi_core_context

APP = "minimal_app_project"  # built-in Minimal App example app
context = notebook_agi_core_context(APP, verbose=1)
app_env = context.app_env
request = context.request
print("App:", context.app)
print("Log root:", context.log_root)

Cell 2: install the worker if needed, then run the visible AGI.run(...) call.

from agilab.notebook_demo import install_if_needed

await install_if_needed(app_env, request=request)
result = await AGI.run(app_env, request=request)
result

Cell 3: inspect the run artifacts.

from agilab.notebook_demo import notebook_log_root

log_root = notebook_log_root(app_env)
print(log_root)

How this maps back to the web UI

  • Notebook notebook_app_env(\"minimal_app_project\") is the compact form of AgiEnv(...) and corresponds to choosing the built-in Minimal App example app in PROJECT.

  • Notebook notebook_local_request() creates the small local RunRequest that ORCHESTRATE would generate for a one-worker run.

  • Notebook AGI.run(...) corresponds to the generated snippet from ORCHESTRATE.

  • The output path under ~/log/execute/minimal_app is the same family of artifacts the UI writes and reuses.

The ORCHESTRATE → Notebook export uses await main() for Deploy scheduler & workers, CHECK distribute and RUN. These cells run in Jupyter’s existing event loop. The generated Python snippets retain asyncio.run(main()) for execution as standalone scripts. When this notebook is imported into WORKFLOW, the generated async entrypoint is adapted back to standalone Python execution while preserving edits made to the cell body and arguments.

Advanced notebook routes

If you want source-checkout launchers, benchmark notebooks, Data + DAG, worker path inspection, or the source-checkout local notebook flow, use Advanced Notebook Routes.