Platform Feature

Lazy Module Activation

Just-in-time tool provisioning for spawned agents

Active
January 2026
The Problem

Tools had to live in the parent session

If an agent needed a specific tool, that tool had to be activated at the root level — even if you never used it.

Cluttered Sessions
Root sessions filled with tools you didn't need. Every specialized agent tool visible to everyone.
Security Concerns
Tools available to parent when only specific agents should have access. Overly broad permissions by default.
Performance Overhead
Activating tools has a cost — downloading, installing, adding to sys.path. Paying that cost for tools you never use.
The Solution

Activate tools on spawn

Agents declare what they need. Amplifier provides it just-in-time.

Agent Config
tools: [shadow]
On Spawn
async_resolve()
Agent Session
Tool Available
Your root session stays clean. The agent gets exactly what it needs. No cross-contamination.
The Difference

Before vs. After

Before: Eager Activation
Root session tools:
read_file, write_file, bash, grep, glob, web_search, web_fetch, task, todo, shadow, recipes, python_check…

Problem:
Every tool any agent might need lives in root. Cluttered. Insecure. Wasteful.
After: Lazy Activation
Root session tools:
read_file, write_file, bash, grep, glob, web_search, web_fetch, task, todo

shadow-operator agent:
+ shadow (lazy activated on spawn)

Clean separation.
How It Works

Three-layer resolution pipeline

# Layer 1: ModuleLoader (amplifier-core, loader.py) # Tries async resolution first, falls back to sync if hasattr(source_resolver, "async_resolve"): source = await source_resolver.async_resolve( module_id, source_hint=config.get("source") ) # Layer 2: BundleModuleResolver (amplifier-foundation, bundle.py) # Thread-safe on-demand activation with asyncio.Lock async def async_resolve(self, module_id, source_hint=None): async with self._activation_lock: module_path = await self._activator.activate( module_id, hint ) # Layer 3: ModuleActivator (amplifier-foundation, activator.py) # Download, install deps, add to sys.path
Architecture

Separation of concerns across two repos

Kernel (amplifier-core)

ModuleLoader

598 lines. Defines TYPE_TO_MOUNT_POINT mapping for 6 module types. Tries async_resolve() first, falls back to sync resolve() for backward compatibility.

loader.py → 71dda22
Application (amplifier-foundation)

BundleModuleResolver

Adds async_resolve() with asyncio.Lock for thread-safe concurrent activation. Delegates to ModuleActivator when a module isn't in the parent's activation set.

bundle.py → dfbe1ce
Mechanism (amplifier-foundation)

ModuleActivator

282 lines. Downloads module source, installs Python dependencies via uv, adds to sys.path. Tracks activated set to skip duplicates.

modules/activator.py
Key Benefits

Why this matters

🎯

Tool Separation

Clean, minimal toolsets in root sessions. Each agent gets exactly what it needs — nothing more.

🔐

Least Privilege

Agents get tools only when spawned. No overly broad access in parent sessions.

Performance

No wasted activation cost for tools you never use. Pay only when spawning.

🔗

Composability

Cross-bundle tool sharing without tight coupling. Bundles stay independently composable.

Real-World Impact

Validated in production

7
Parent session tools
9
Agent session tools
Agent sessions successfully obtained python-check and python-execute tools without parent pre-activation. Source: foundation commit dfbe1ce test results.
Development Velocity

Coordinated architecture change

2
Repositories
2
Coordinated commits
1
Day
amplifier-core
71dda22
Async module resolution with fallback · 75 insertions
amplifier-foundation
dfbe1ce
Lazy activation in BundleModuleResolver · 81 insertions
Primary contributor: Brian Krabach · Both commits: January 14, 2026
Sources

Research Methodology

Data as of: February 20, 2026

Feature status: Active (async_resolve present in current codebase)

Research performed:

Gaps: Original deck claimed 3 repos including amplifier-bundle-shadow (commit 2971a20). This third repo was not verified in local workspace. Deck updated to reflect only confirmed evidence.

Primary contributor: Brian Krabach (~96% of amplifier-core commits, ~94% of amplifier-foundation commits)

Get Started

Tools where they belong

Agents declare. Amplifier provides. Sessions stay clean.

More Amplifier Stories