FreshCtx™

before_tool_callback integration

FreshCtx + Google Agent Development Kit

Use google_adk_tool_callback() as an ADK agent's before_tool_callback to skip a protected tool body when evidence is stale.

What FreshCtx protects

FreshCtx revalidates declared evidence before ADK invokes a named tool. Current evidence returns no override; a blocking result becomes a structured tool response and the tool body is skipped.

Where the pre-action boundary sits

The boundary is ADK's native pre-tool callback. tool_names limits the callback to explicitly protected tools, and depends_on may be a resolver receiving (tool, tool_context) so identifiers come from session state rather than tool arguments.

Limitations

  • Tools that do not traverse the configured agent-level before-tool callback are outside this boundary.
  • FreshCtx does not own ADK model or tool selection, sessions, state, retries, confirmations, long-running operation completion, transactions, or idempotency.

Installation

install
python -m pip install 'freshctx[google-adk]==0.9.0'

Minimal example

Google Agent Development Kit · minimal example
from freshctx.integrations.google_adk import google_adk_tool_callback

freshness = google_adk_tool_callback(
    depends_on=[decision],
    store=store,
    tool_names=["write_record"],
)

agent = Agent(
    name="bounded_agent",
    model=model,
    tools=[write_record],
    before_tool_callback=freshness,
)

Continue

Third-party names and logos are trademarks of their respective owners. Their appearance identifies compatible integration surfaces and does not imply endorsement or partnership.