adk_agent_composition (erlang_adk v0.10.0)

View Source

Runtime materializer for a compiled declarative Agent Config.

The compiler persists IDs only. This module resolves those IDs against the exact sealed registry snapshot named by the compiled fingerprint, spawns sub-agents bottom-up, and injects only process references into the parent. Credential descriptors are never returned; callers receive only the opaque credential profile ID already present in the compiled public IR.

Summary

Functions

Spawn a composition in an invocation-local namespace. This is used by concurrent evaluation samples so roots and every generated sub-agent retain their declarative identity without colliding in the process registry.

Types

handle/0

-type handle() ::
          #{tag := '$adk_agent_composition',
            root := pid(),
            agents := [pid()],
            runner_options := map(),
            workflows := map(),
            credential_profiles := map()}.

Functions

credential_profiles(_)

-spec credential_profiles(handle()) -> {ok, map()} | {error, term()}.

resolve(Compiled)

-spec resolve(map()) -> {ok, map()} | {error, term()}.

resolve(Compiled, Registry)

-spec resolve(map(), term()) -> {ok, map()} | {error, term()}.

root(_)

-spec root(handle()) -> {ok, pid()} | {error, term()}.

runner_options(_)

-spec runner_options(handle()) -> {ok, map()} | {error, term()}.

spawn(Compiled)

-spec spawn(map()) -> {ok, handle()} | {error, term()}.

spawn(Compiled, Registry)

-spec spawn(map(), term()) -> {ok, handle()} | {error, term()}.

spawn_scoped(Compiled, Scope)

-spec spawn_scoped(map(), binary()) -> {ok, handle()} | {error, term()}.

Spawn a composition in an invocation-local namespace. This is used by concurrent evaluation samples so roots and every generated sub-agent retain their declarative identity without colliding in the process registry.

spawn_scoped(Compiled, Registry, Scope)

-spec spawn_scoped(map(), term(), binary()) -> {ok, handle()} | {error, term()}.

stop(_)

-spec stop(handle()) -> ok.

workflows(_)

-spec workflows(handle()) -> {ok, map()} | {error, term()}.