You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The amplifier-foundation API is fully documented via Python docstrings and type hints. This overview lists what's exported; for details, read the source files directly.
Why this approach? Documentation that duplicates code becomes context poisoning when it drifts. The code IS the authoritative reference.
Utilities for spawning sub-sessions with provider/model preferences.
Export
Source
Purpose
ProviderPreference
spawn_utils.py
Dataclass for provider/model preference (supports glob patterns)
apply_provider_preferences
spawn_utils.py
Apply ordered preferences to mount plan
resolve_model_pattern
spawn_utils.py
Resolve glob patterns (e.g., claude-haiku-*) to concrete model names
is_glob_pattern
spawn_utils.py
Check if model string contains glob characters
Cost Bridge Utilities
Utilities for propagating child-session costs to parent coordinators in
app-layer spawn wrappers. Import via from amplifier_foundation import ....
Export
Source
Purpose
bridge_child_cost
bundle/_prepared.py
Collect child session's session.cost contributions and register them as a single contributor on the parent coordinator. Never raises — errors are logged as warnings.
sum_cost_usd
bundle/_prepared.py
Sum a list of collect_contributions() results into a single Decimal | None. Returns None when no cost data is present. Tolerates both Decimal and str values.
Reading the Source
Each source file has comprehensive docstrings. To read them:
# In your editor
code amplifier_foundation/bundle.py
# Or via Python
python -c "from amplifier_foundation import Bundle; help(Bundle)"# Or via pydoc
python -m pydoc amplifier_foundation.Bundle