tool-caching

command
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

@sk-task tool-caching#T4.2: comprehensive example with agent + Ollama

This example demonstrates tool result caching at two levels:

  1. Direct tool level: a slow tool wrapped with cache — compare miss vs hit latency
  2. Agent level: an agent with Cache:true uses the same tools; cache counters show savings

Requires Ollama running on localhost:11434 with a model pulled (e.g., gemma3:4b or llama3.2). The cache works with any LLM provider — Ollama is just the example.

Usage:

ollama pull gemma3:4b
go run ./examples/features/tool-caching/

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL