Minimal App Project
Overview
Minimal starter template you can copy to bootstrap a new AGILab application.
Demonstrates the project layout expected by the platform (manager package, worker package,
app_argsdefinitions, Analysis configuration) with minimal business logic so you can focus on custom code.Ships with a small custom Streamlit argument form and an empty
pre_prompt.jsonprompt seed so copied projects have explicit places for UI customisation and WORKFLOW prompts.
Scientific placeholders
The template is intentionally lightweight, but many AGILab workflows ultimately fit the pattern of learning or calibrating a function \(f_\theta\):
where \(\ell\) is a task-dependent loss (regression, classification, imitation learning, etc.). You can use the Minimal App skeleton to prototype the data loading, feature extraction, and artifact export around this core loop.
Manager (minimal_app.minimal_app)
Lightweight
BaseWorkersubclass that prepares app-owned shared input and output directories throughenv.resolve_share_path.Accepts validated
MinimalAppArgsvalues, supportsreset_targetcleanup of the output directory, and keepsfrom_toml/to_tomlhelpers for the same settings round-trip used by richer apps.Leaves work distribution as a template hook:
build_distributioncurrently returns empty placeholder structures until a copied project adds real stages.
Args (minimal_app.app_args)
Simple Pydantic model with defaults for
data_in,data_out,files,nfile,nskip,nread, andreset_target.src/app_settings.tomlintentionally seeds an empty[args]table; the runtime loads model defaults, then persists concrete values only after the customsrc/app_args_form.pyedits them.The model still migrates legacy
data_uriinput intodata_inso older snippets can be adapted without changing the scaffold shape first.
Worker (minimal_app_worker.minimal_app_worker)
Concrete
MinimalAppWorkersubclass ofagi_node.polars_worker.PolarsWorker.It intentionally adds no domain logic; the class exists so installers and worker deployment can discover a real worker package while copied projects replace the inherited placeholder behavior with domain-specific processing.
Reducer contract status
minimal_app_project is template-only. It intentionally does not ship a
reducer contract because the manager distribution hook and worker behavior are
scaffold placeholders and no concrete merge output exists yet. This is an
explicit reducer exemption for the starter template, not a gap in a promoted
domain app.
When a cloned project starts producing durable worker summaries, add a
reduction.py module, emit reduce_summary_worker_<id>.json artifacts, and
export a *_REDUCE_CONTRACT symbol from the manager package. That keeps custom
apps aligned with the shared agi_node reducer contract without treating the
starter template as an unfinished built-in app.
Assets & Tests
README.mdandpyproject.tomldescribe the installable project package and its runtime dependencies.src/app_settings.tomlcarries cluster defaults plus the intentionally empty[args]seed.src/app_args_form.pyis the current custom ORCHESTRATE form for path and small run-control arguments; tailor it when you need additional validation or widgets.src/pre_prompt.jsonis currently an empty prompt list.Repo-level tests exercise the installer, clone path, runtime bootstrap, and minimal app environment behavior rather than project-local
test/_test_*files.
API Reference
Minimal manager implementation for the minimal_app sample project.
- class minimal_app.minimal_app.MinimalApp(env, args=None, **kwargs)[source]
Bases:
BaseWorkerLightweight orchestration surface for the minimal_app example.
- build_distribution(_workers=None)[source]
- Return type:
Tuple[List[List],List[List[Tuple[int,int]]],str,str,str]
- classmethod from_toml(env, settings_path='app_settings.toml', section='args', **overrides)[source]
- Return type:
- static pool_init(vars)[source]
Per-pool-child initializer hook; default is a no-op.
- Return type:
None
- to_toml(settings_path='app_settings.toml', section='args', create_missing=True)[source]
- Return type:
None
- worker_vars = {}
- class minimal_app.minimal_app.MinimalAppApp(env, args=None, **kwargs)[source]
Bases:
MinimalAppAlias retaining the historical suffix for compatibility.
Argument management helpers for the minimal_app sample project.
- minimal_app.app_args.ArgsModel
alias of
MinimalAppArgs
- minimal_app.app_args.ArgsOverrides
alias of
MinimalAppArgsTD
- class minimal_app.app_args.MinimalAppArgs(**data)[source]
Bases:
BaseModelRuntime parameters for the minimal_app application.
- data_in
- data_out
- files
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- nfile
- nread
- nskip
- reset_target
- class minimal_app.app_args.MinimalAppArgsTD[source]
Bases:
TypedDict- data_in
- data_out
- files
- nfile
- nread
- nskip
- reset_target
- minimal_app.app_args.dump_args(args, settings_path, *, section='args', create_missing=True)[source]
- Return type:
None
Default worker implementation for the minimal_app project.
This worker simply inherits the PolarsWorker so that projects with minimal
requirements still provide a concrete worker class. Downstream installers rely
on the class name MinimalAppWorker to determine the runtime bundle to ship.
- class minimal_app_worker.minimal_app_worker.MinimalAppWorker[source]
Bases:
PolarsWorkerPolars worker used by the minimal_app sample application.