adk_agent_config (erlang_adk v0.10.0)

View Source

Versioned compiler for untrusted declarative agent configuration.

Version 1 is JSON-compatible and deliberately contains only values which can be checked without creating atoms or accepting caller-selected network destinations, commands, headers, or credentials. Trusted providers and dynamic toolsets are selected by binary ID from one immutable adk_config_registry snapshot.

Version 2 retains that boundary and adds data-only composition references. Agent Config files may be JSON or the strict YAML subset implemented by adk_agent_yaml; both formats normalize to the same IR and therefore the same fingerprint when compiled against the same registry snapshot.

Summary

Types

compiled/0

-type compiled() ::
          #{schema_version := pos_integer(),
            fingerprint := binary(),
            registry_generation := pos_integer(),
            registry_instance_id := binary(),
            registry_snapshot_revision_id := binary(),
            name := binary(),
            provider_name := binary(),
            provider := module() | binary(),
            model := binary(),
            config := map(),
            tools := [module() | adk_toolset:descriptor()],
            runner_options := map(),
            references => map()}.

Functions

compile(Json)

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

compile(Json, Options)

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

current_schema_version()

-spec current_schema_version() -> pos_integer().

fingerprint(Config)

-spec fingerprint(compiled()) -> {ok, binary()} | {error, term()}.

Return the stored fingerprint of a compiled configuration.

load_file(Path)

-spec load_file(file:filename_all()) -> {ok, compiled()} | {error, term()}.

load_file(Path0, Options)

-spec load_file(file:filename_all(), map()) -> {ok, compiled()} | {error, term()}.