# Building On-Device AI Agents on Android with Google ADK -- Part 3: Demystifying ToolContext --...

DevFeed: [Building On-Device AI Agents on Android with Google ADK -- Part 3: Demystifying ToolContext --...](<https://devfeed.tech/articles/building-on-device-ai-agents-on-android-with-google-adk-part-3-demystifying-toolcontext-57484.md>)

Original publisher: [Read original article](<https://proandroiddev.com/building-on-device-ai-agents-on-android-with-google-adk-part-3-demystifying-toolcontext-f578992168cb?source=rss----c72404660798---4>)

Author: Pankaj Rai

Published: 2026-09-21T18:06:15Z

Content type: article

Language: en

Sources: [ProAndroidDev](<https://devfeed.tech/sources/proandroiddev-medium.md>)

Topics: [google-adk](<https://devfeed.tech/topics/google-adk.md>), [On-device AI](<https://devfeed.tech/topics/on-device-ai.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [adk](<https://devfeed.tech/tags/adk.md>), [agents](<https://devfeed.tech/tags/agents.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agent](<https://devfeed.tech/tags/ai-agent.md>), [ai-agents](<https://devfeed.tech/tags/ai-agents.md>), [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [artifacts](<https://devfeed.tech/tags/artifacts.md>), [artificial-intelligence](<https://devfeed.tech/tags/artificial-intelligence.md>), [autonomous](<https://devfeed.tech/tags/autonomous.md>), [autonomous-agents](<https://devfeed.tech/tags/autonomous-agents.md>), [context](<https://devfeed.tech/tags/context.md>), [google-adk](<https://devfeed.tech/tags/google-adk.md>), [metadata](<https://devfeed.tech/tags/metadata.md>), [on-device](<https://devfeed.tech/tags/on-device.md>), [on-device-ai](<https://devfeed.tech/tags/on-device-ai.md>), [runtime](<https://devfeed.tech/tags/runtime.md>), [stateless](<https://devfeed.tech/tags/stateless.md>), [tools](<https://devfeed.tech/tags/tools.md>), [user](<https://devfeed.tech/tags/user.md>)

## AI overview

The excerpt introduces Google ADK's `ToolContext` as a runtime handle that gives tools access to execution context beyond their input arguments and return values. It frames the need around identifying the active user and session, accessing earlier conversation context, and persisting intermediate documents or generated files across turns. The article says it will examine session metadata and ADK Artifacts, but the supplied text does not include the implementation details or explain how artifacts are versioned or stored.

## Source excerpt

Go deep into the engine. Learn how ToolContext allows tools to inspect the active session, read user metadata, and save versioned... Continue reading on ProAndroidDev "