erlang_adk (erlang_adk v0.10.0)

View Source

Summary

Functions

Resolve the root process of an Agent Config composition handle.

Await a planning result without an additional caller timeout.

Await a planning result for at most Timeout milliseconds.

Stop new admission and wait a bounded time for active owners.

Cancel planning with the default user_cancelled reason.

Cancel planning with an application-supplied reason.

Validate and compile a declarative workflow specification.

Asynchronously delegate a task to an agent (fire and forget).

Asynchronously delegate a task to an agent and receive a message when done.

Asynchronously delegate and correlate the reply with Ref.

Coarse process liveness for container/platform probes.

Dependency-aware readiness; false while admission is draining.

Return a deterministic, JSON-safe graph descriptor without executable callbacks, credentials, state, or tool arguments.

Execute one fresh-history invocation in an explicit runtime context. Reusing an agent PID through this API never reads or mutates prompt/2's compatibility conversation history.

Submit one complete version-1 client binary frame synchronously. Synchronous calls preserve existing Live ingress backpressure.

Synchronously prompt an agent.

Render a compiled graph as DOT or Mermaid text.

Resume a durable workflow by invocation ID after coordinator or application failure.

Run a trusted planner and executor synchronously with default limits.

Run explicit planning synchronously with bounded runtime options.

Run a compiled workflow synchronously to one terminal outcome.

Return the session service and owned artifact/memory service options selected by the application runtime profile.

Materialize and spawn a compiled Agent Config composition using the operator-owned registry snapshot that produced it.

Materialize against an explicit sealed registry or snapshot.

Start one independently supervised bidirectional Live session. Principal is checked on every subsequent operation and is never returned in status/events. Provider credentials stay inside the session transport.

Start an owner-bound binary bridge for a server-owned Live session.

Start owner-bound explicit planning with default limits.

Start owner-bound explicit planning with bounded runtime options.

Start an independently supervised workflow coordinator.

Start a durably checkpointed workflow and return its stable invocation ID together with the current supervised coordinator pid.

Stop an agent gracefully so its name can be reused.

Stop every process owned by an Agent Config composition.

Detach and stop an owner-bound Live voice bridge.

Types

planning_ref/0

-opaque planning_ref()

Functions

agent_config_root(Composition)

Resolve the root process of an Agent Config composition handle.

await_planning(PlanningRef)

-spec await_planning(planning_ref()) -> {ok, adk_planning_runtime:result()} | {error, term()}.

Await a planning result without an additional caller timeout.

await_planning(PlanningRef, Timeout)

-spec await_planning(planning_ref(), timeout()) -> {ok, adk_planning_runtime:result()} | {error, term()}.

Await a planning result for at most Timeout milliseconds.

await_workflow(WorkflowRef)

await_workflow(WorkflowRef, Timeout)

begin_deployment_drain()

Stop new admission and wait a bounded time for active owners.

begin_deployment_drain(Timeout)

cancel_planning(PlanningRef)

-spec cancel_planning(planning_ref()) -> ok | {error, term()}.

Cancel planning with the default user_cancelled reason.

cancel_planning(PlanningRef, Reason)

-spec cancel_planning(planning_ref(), term()) -> ok | {error, term()}.

Cancel planning with an application-supplied reason.

cancel_workflow(WorkflowRef)

cancel_workflow(WorkflowRef, Reason)

close_live_session(Session, Principal, Reason)

compile_workflow(Spec)

Validate and compile a declarative workflow specification.

delegate(Pid, Message)

Asynchronously delegate a task to an agent (fire and forget).

delegate(Pid, Message, ReplyToPid)

Asynchronously delegate a task to an agent and receive a message when done.

delegate(Pid, Message, ReplyToPid, Ref)

Asynchronously delegate and correlate the reply with Ref.

delete_workflow_invocation(InvocationId, Opts)

deployment_liveness()

Coarse process liveness for container/platform probes.

deployment_readiness()

Dependency-aware readiness; false while admission is draining.

inspect_graph(Compiled)

Return a deterministic, JSON-safe graph descriptor without executable callbacks, credentials, state, or tool arguments.

invoke(AgentPid, Message, Context)

Execute one fresh-history invocation in an explicit runtime context. Reusing an agent PID through this API never reads or mutates prompt/2's compatibility conversation history.

live_ack(Session, Principal, Sequence)

live_ack(Session, Principal, Subscriber, Sequence)

live_activity_end(Session, Principal)

live_activity_start(Session, Principal)

live_audio_stream_end(Session, Principal)

live_send_audio(Session, Principal, Media)

live_send_text(Session, Principal, Text)

live_send_tool_response(Session, Principal, CallId, ToolName, Response)

live_send_video_frame(Session, Principal, Media)

live_status(Session, Principal)

live_status(Session, Principal, TimeoutMs)

live_subscribe(Session, Principal, Credit)

live_subscribe(Session, Principal, Subscriber, Credit)

live_unsubscribe(Session, Principal)

live_unsubscribe(Session, Principal, Subscriber)

live_voice_frame(BridgePid, Frame)

Submit one complete version-1 client binary frame synchronously. Synchronous calls preserve existing Live ingress backpressure.

loop(WorkerPid, ReviewerPid, Prompt, MaxIterations)

parallel(Pids, Prompt)

parallel(Pids, Prompt, Timeout)

prompt(AgentPid, Message)

Synchronously prompt an agent.

render_graph(Compiled, Format)

Render a compiled graph as DOT or Mermaid text.

resume_workflow(Compiled, Checkpoint)

resume_workflow(Compiled, Checkpoint, Opts)

resume_workflow_invocation(InvocationId, Compiled, Opts)

Resume a durable workflow by invocation ID after coordinator or application failure.

run_planning(Planner, Executor, Goal, Context)

-spec run_planning(adk_planner:descriptor(), adk_plan_executor:descriptor(), term(), map()) ->
                      {ok, adk_planning_runtime:result()} | {error, term()}.

Run a trusted planner and executor synchronously with default limits.

run_planning(Planner, Executor, Goal, Context, Opts)

-spec run_planning(adk_planner:descriptor(), adk_plan_executor:descriptor(), term(), map(), map()) ->
                      {ok, adk_planning_runtime:result()} | {error, term()}.

Run explicit planning synchronously with bounded runtime options.

run_workflow(Compiled, InitialState)

Run a compiled workflow synchronously to one terminal outcome.

run_workflow(Compiled, InitialState, Opts)

runtime_runner_spec()

Return the session service and owned artifact/memory service options selected by the application runtime profile.

sequential(Pids, Prompt)

spawn_agent(Name, LLMConfig, Tools)

Spawn a new agent.

spawn_agent_config(Compiled)

Materialize and spawn a compiled Agent Config composition using the operator-owned registry snapshot that produced it.

spawn_agent_config(Compiled, Registry)

Materialize against an explicit sealed registry or snapshot.

start_live_session(SessionId, Principal, Config)

Start one independently supervised bidirectional Live session. Principal is checked on every subsequent operation and is never returned in status/events. Provider credentials stay inside the session transport.

start_live_voice_bridge(Session, Principal, OwnerPid, Opts)

Start an owner-bound binary bridge for a server-owned Live session.

The owner receives only strict binary messages shaped as {adk_live_voice_frame, BridgePid, Frame}. Forwarded Live event credit is released only when the owner submits the exact v1 ACK frame through live_voice_frame/2. The first message is an unsequenced input-format configuration frame and must not be acknowledged. Its 16000 or 24000 Hz rate is derived inside the bridge from trusted Live-session status; callers cannot override it. The Live session must already be active. The bridge terminates when OwnerPid terminates. A provider reconnect invalidates and terminates the bridge independently of subscriber event credit; an input racing that transition is rejected by the same continuity boundary. An adapter must detach capture and create a fresh bridge only after the session resumes.

start_planning(Planner, Executor, Goal, Context)

-spec start_planning(adk_planner:descriptor(), adk_plan_executor:descriptor(), term(), map()) ->
                        {ok, planning_ref()} | {error, term()}.

Start owner-bound explicit planning with default limits.

start_planning(Planner, Executor, Goal, Context, Opts)

-spec start_planning(adk_planner:descriptor(), adk_plan_executor:descriptor(), term(), map(), map()) ->
                        {ok, planning_ref()} | {error, term()}.

Start owner-bound explicit planning with bounded runtime options.

start_workflow(Compiled, InitialState)

Start an independently supervised workflow coordinator.

start_workflow(Compiled, InitialState, Opts)

start_workflow_invocation(Compiled, InitialState, Opts)

Start a durably checkpointed workflow and return its stable invocation ID together with the current supervised coordinator pid.

stop_agent(AgentPid)

Stop an agent gracefully so its name can be reused.

stop_agent_config(Composition)

Stop every process owned by an Agent Config composition.

stop_live_voice_bridge(BridgePid)

Detach and stop an owner-bound Live voice bridge.

workflow_checkpoint(WorkflowRef)

workflow_invocation_status(InvocationId, Opts)

workflow_status(WorkflowRef)