You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(skills): Allow opt-in session state injection in skill instructions
Agent instructions support injecting dynamic session state via
`{var_name}`, `{artifact.file_name}`, and `{optional?}` templates, but
skill instructions returned by `load_skill` were emitted verbatim, so a
skill body could not reference per-session state.
Add an opt-in frontmatter flag `adk_inject_session_state` (mirroring the
existing `adk_additional_tools` metadata convention). When set to true,
`LoadSkillTool` routes the skill instructions through the existing
`inject_session_state` utility before returning them. The flag defaults
to disabled so that literal braces in skill markdown (code samples,
JSON, templates) are preserved and existing skills are unaffected.
A missing required variable surfaces a `STATE_INJECTION_ERROR` tool
result rather than raising, consistent with the toolset's other error
responses.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments