README recipe coverage

View Source

This document maps the current root README.md recipes to their prerequisites and validation. It intentionally follows named README sections instead of assigning fence numbers, so examples can be simplified or reordered without breaking an artificial identifier scheme.

Prerequisite labels have the following meanings:

  • Local — no remote model or service is needed. A writable temporary directory, local Mnesia database, or loopback socket may still be used.
  • Provider key — the literal recipe makes a remote model request and needs the matching key, network access, quota, and an enabled model.
  • External service — the complete integration needs a service such as an OIDC issuer, MCP server, OpenAPI endpoint, OTLP collector, or public A2A peer.
  • Application adapter — the application must provide trusted code or configuration, such as a sandbox, credential source, resource resolver, or authorization policy.

Deterministic tests use probes, fake transports, loopback fixtures, and local stores. They validate Erlang ADK behavior without spending provider quota. Live provider checks supplement these tests; they never replace them.

User recipes

Recipe and README sectionPrerequisitesDeterministic coverageLive validation
Compile, start the application, and add it as a dependency — InstallationLocal; dependency download requires network on a fresh checkouterlang_adk_startup_test; complete compile/package gates belowNone
Create and prompt a Gemini agent — Your first agentProvider keyreadme_examples_test:direct_agent_and_provider_error/0; adk_llm_test; adk_llm_gemini_testGemini REST
Configure Gemini, OpenAI, Anthropic, and compatible profiles — Choose a model providerLocal for validation; provider key for a remote call; external service for a compatible endpointreadme_examples_test:multi_provider_profile_contract/0; adk_provider_profile_test; adk_provider_registry_test; adk_provider_registry_live_test; adk_provider_credential_test; provider request/stream codec testsGemini profiles: Gemini REST. OpenAI, Anthropic, and compatible providers have no first-party paid suite
Load an Erlang tool and let an agent call it — Add an Erlang toolProvider key for model selection; Local for schema and execution checksreadme_examples_test:example_modules_compile_and_load/0; adk_json_schema_test; adk_tool_call_test; adk_runner_tools_testweather_tool_round_trip in Gemini REST
Run agents sequentially, in parallel, by delegation, or as sub-agents — Run multiple agentsProvider key for the literal agentsreadme_examples_test:correlated_async_delegation/0, sequential_parallel_and_loop/0, sub_agent_and_agent_as_tool/0; erlang_adk_orchestrator_test; adk_agent_tree_test; adk_sub_agents_test; adk_concurrency_stress_SUITEDelegation, orchestration, and sub-agent cases in Gemini REST
Compile and run an application-controlled workflow — Run a workflowLocalreadme_workflow_examples_test; adk_workflow_test; adk_workflow_graph_test; adk_workflow_public_contract_test; adk_workflow_contract_ledger; adk_durable_workflow_testNone; the README workflow is deliberately provider-independent
Run an agent with events, sessions, stable run IDs, cancellation, and background triggers — Use the RunnerProvider key for the literal run; Local for deterministic probesreadme_examples_test:sync_and_async_runner/0, supervised_run_api/0, ambient_background_runtime/0; adk_runner_test; adk_run_test; adk_ambient_test; adk_ambient_concurrency_SUITERunner cases in Gemini REST
Pause for confirmation or long-running work and resume it — Human approval and long-running workLocal; provider key only for the optional model-driven pathreadme_examples_test:tool_confirmation_contract/0, suspension_and_pkce_contract/0; adk_tool_confirmation_test; adk_direct_confirmation_test; adk_hitl_test; adk_hitl_mnesia_restart_test; adk_suspension_testhuman_approval in Gemini REST
Stream UTF-8 text — Streaming and multimodal inputProvider keyreadme_examples_test:deterministic_streaming/0, runner_provider_streaming/0; adk_streaming_test; provider stream codec testsstreaming in Gemini REST
Send canonical text and image content — Streaming and multimodal inputProvider keyreadme_examples_test:multimodal_content_contract/0, supervised_content_streaming/0; adk_content_test; Gemini, OpenAI, Anthropic, and compatible content/request testsmultimodal_content in Gemini REST
Start a Gemini Live session and use audio, image, tools, transcription, and browser framing — Realtime sessions and browser voiceProvider keyadk_live_public_api_test; adk_live_session_test; adk_live_media_test; adk_live_gemini_codec_test; adk_live_gun_transport_test; adk_live_tool_execution_test; adk_live_voice_protocol_test; adk_live_voice_bridge_testGemini Live
Start an OpenAI Realtime session — Realtime sessions and browser voiceProvider keyadk_live_session_profile_test; adk_live_session_multi_frame_test; adk_live_openai_codec_test; adk_live_openai_gun_transport_test; voice protocol and bridge testsNo first-party paid suite; run an application-owned smoke against the configured Realtime model
Use ETS or Mnesia sessions and query, branch, or rewind history — Sessions, artifacts, memory, and contextLocalreadme_examples_test:session_scopes_and_temp_state/0, session_query_pagination_and_rewind/0; adk_session_service_test; adk_state_scoping_test; adk_session_query_test; erlang_adk_session_mnesia_testmnesia_runner in Gemini REST
Store immutable artifacts in ETS or the filesystem — Sessions, artifacts, memory, and contextLocal; writable storage for the filesystem adapterreadme_examples_test:memory_and_artifacts/0; adk_artifact_conformance_test; adk_artifact_ets_test; adk_artifact_fs_test; adk_context_capability_test; adk_context_runner_testartifact_and_memory_tools in Gemini REST
Retrieve and ingest exact-user memory — Sessions, artifacts, memory, and contextLocal; provider key for model-selected retrievalreadme_examples_test:memory_and_artifacts/0; adk_memory_conformance_test; adk_memory_v2_ets_test; adk_memory_mnesia_test; adk_memory_outbox_test; adk_context_runner_testartifact_and_memory_tools in Gemini REST
Select, compact, and cache provider request context — Sessions, artifacts, memory, and contextLocal for policy and cache behavior; provider key for a real provider cacheadk_context_policy_test; adk_context_envelope_test; adk_context_compaction_test; adk_context_cache_test; adk_context_cache_gemini_test; adk_context_runner_testcontext_cache in Gemini REST
Turn an OpenAPI operation into agent tools — IntegrationsExternal service; provider key when a model selects the tool; application adapter for protected credentialsreadme_examples_test:openapi_toolset_as_agent_tools/0; adk_openapi_schema_test; adk_openapi_toolset_test; adk_openapi_toolset_boundaries_test; adk_openapi_production_adapters_test; adk_openapi_gun_transport_security_testRun an application-owned smoke against the selected OpenAPI endpoint and provider
Connect to or expose MCP tools — IntegrationsLocal for repository fixtures; external service for a real MCP peerreadme_examples_test:mcp_stdio_fixture/0, mcp_streamable_http_fixture/0; adk_mcp_test; adk_mcp_streamable_http_SUITERun an application-owned stdio or HTTPS MCP interoperability smoke
Execute model-requested code through an external sandbox — IntegrationsApplication adapter and external serviceadk_code_toolset_test; normal tool policy, timeout, and cancellation testsRun the owning application's sandbox conformance and isolation checks
Expose or call agents through A2A 1.0 — IntegrationsApplication adapter for public authentication; external service for a real peer; provider key only when the backing agent calls a modeladk_a2a_v1_codec_test; adk_a2a_v1_server_test; adk_a2a_v1_http_test; adk_a2a_v1_client_security_test; adk_a2a_v1_auth_test; adk_a2a_v1_agent_executor_testRun an application-owned authenticated HTTPS peer smoke
Add plugins, callbacks, metrics, traces, and OTLP export — Plugins, observability, and evaluationLocal for pipelines and telemetry; application adapter and external service for a real exporter/collectorreadme_examples_test:callbacks_and_telemetry/0, plugins_observability_and_eval_sets/0; adk_plugin_pipeline_test; adk_plugin_runner_integration_test; adk_plugin_builtin_test; adk_plugin_stateful_test; adk_observability_v2_test; adk_observability_runner_test; adk_trace_context_test; adk_otlp_json_test; adk_otlp_http_json_exporter_testSend a smoke trace to the deployment's configured OTLP endpoint
Evaluate an agent and render or compare reports — Plugins, observability, and evaluationProvider key for the checked CLI agent; Local for criteria and report fixturesreadme_examples_test:plugins_observability_and_eval_sets/0, lightweight_evaluation/0; adk_eval_set_test; adk_eval_criteria_test; adk_eval_v2_test; adk_eval_dev_view_test; adk_eval_llm_judge_test; adk_cli_testEvaluation and rubric-judge cases in Gemini REST
Validate inbound OIDC/JWT and obtain outbound OAuth credentials — AuthenticationExternal service and application adapteradk_oidc_security_test; adk_oidcc_adapters_test; adk_auth_test; adk_auth_bounds_test; adk_auth_rotation_test; adk_authorization_flow_test; adk_suspension_testRun an application-owned issuer discovery, login, refresh, revocation, and scope smoke
Build the CLI, validate configuration, run once, or use the console — CLI and local developer UILocal for doctor and validation; provider key for run, console, and model-backed evaluationadk_cli_test; checked examples/agent.json and examples/eval.jsonUse the literal adk run, console, or evaluate command in the README
Start the authenticated loopback developer UI — CLI and local developer UILocal; provider key for model calls; application adapter for artifact, memory, context, or Live panelsadk_cli_test; adk_dev_http_test; adk_dev_v05_http_test; adk_dev_v07_http_test; erlang_adk_startup_testStart adk serve as shown in the README and exercise the required panel/API from a second process
Start the Phoenix companion with local authentication — Phoenix UIExternal service for first dependency download; provider key for model/Live callsmix precommit, including Phoenix ExUnit and browser/audio Node tests with fake providersStart Phoenix as shown in the README; follow its guide to create a Live session and test browser voice
Use Phoenix with OIDC or in a production release — Phoenix UIExternal service and application adapterPhoenix auth/controller/gateway/LiveView tests; production asset, release, audit, and smoke gates in RELEASING.mdRun an application-owned OIDC login and authenticated agent/Live smoke over the deployed TLS boundary

Check mapping

README checkPrerequisitesWhat it validates
Quick check while developingLocalCompilation plus the focused README and workflow EUnit modules
Core checks before opening a pull requestLocal; loopback sockets must be permittedClean compile, complete EUnit and deterministic Common Test, Dialyzer, fresh aggregate coverage, and Xref
If README examples changedLocalFocused recipe behavior plus warning-as-error compilation of checked example modules
If the Phoenix application changedExternal service for the initial dependency/tool downloadLocked dependencies, formatting, warning-free compilation, assets, browser/audio JavaScript, ExUnit, and the exact dependency-audit policy
Documentation, CLI, and package checksLocal after dependencies are presentCLI assembly and smoke checks, ExDoc, Hex package assembly, package contents, and clean extracted-package compilation
Optional paid Gemini checksProvider keyReal Gemini REST and Gemini Live interoperability; these commands are deliberately outside the deterministic gate

The complete deterministic command is authoritative for Erlang behavior:

./rebar3 do clean, compile, eunit, ct, dialyzer
./scripts/coverage.sh
./rebar3 xref

The focused README commands are useful diagnostics, but they are not a replacement for the complete gate:

./rebar3 eunit --module=readme_examples_test
./rebar3 eunit --module=readme_workflow_examples_test

Live provider commands

Gemini REST

This suite exercises REST generation, streaming, tools, Runner, orchestration, multimodal content, data services, evaluation, and related README behavior with gemini-3.1-flash-lite:

export GEMINI_API_KEY="your_google_api_key"
ERLANG_ADK_GEMINI_REST=1 ./rebar3 ct \
  --suite test/readme/readme_live_gemini_SUITE.erl

Gemini Live

This independent suite exercises the bidirectional WebSocket path with gemini-3.1-flash-live-preview:

export GEMINI_API_KEY="your_google_api_key"
ERLANG_ADK_GEMINI_LIVE=1 ./rebar3 ct \
  --suite test/models/gemini/gemini_live_SUITE.erl

Both commands require network access, quota, and explicit permission to make provider calls. A skip, provider rejection, quota error, or network failure is not a passing provider result. OpenAI Responses, Anthropic Messages, compatible Chat Completions, and OpenAI Realtime have deterministic codec and injected-transport coverage, but this repository does not currently provide equivalent first-party paid suites for them.

Detailed test selection, coverage rules, provider-result interpretation, and release acceptance are documented in TESTING.md and RELEASING.md.