praval.app
Explicit application ownership for Praval runtimes.
Functions
Return the default app that backs compatibility shims. |
|
Reset the default app for tests. |
Classes
|
Own agents and a Reef for explicit lifecycle cleanup. |
- class praval.app.PravalApp(*, reef=None, provider_registry=None, use_global_reef=False)[source]
Bases:
objectOwn agents and a Reef for explicit lifecycle cleanup.
PravalAppdoes not isolate provider registries or redirect an agent’s Reef convenience methods in 0.8. Use it when explicit ownership and deterministic cleanup are useful, not as a dependency-injection boundary.- Parameters:
reef (Optional[Reef])
provider_registry (Optional[ProviderRegistry])
use_global_reef (bool)
- __init__(*, reef=None, provider_registry=None, use_global_reef=False)[source]
- Parameters:
reef (Reef | None)
provider_registry (ProviderRegistry | None)
use_global_reef (bool)
- Return type:
None
- create_agent(name, **kwargs)[source]
Create and retain an agent owned by this app.
- Return type:
- Parameters:
name (str)
kwargs (Any)