Agent-native edge caching

Caching for AI agents: faster, cheaper, visible.

Offload repetitive agent traffic at the edge to reduce latency and inference costs with a lightweight integration.

Request path

Illustrative cache behavior

Agent request

chat.completions.create()

Request

Edge cache

Check for a reusable response

Cache hit

Model provider

Run only when no reusable response is found

Skipped
Reuse repeated work while keeping cache behavior observable.

Multi-layer caching

Serve each request from the right layer.

From edge CDNs to regional Redis and local memory, Alchymos routes agent traffic to the fastest available layer.

Selected layer · CDN edge

Serve common, read-heavy responses close to users for low-latency global access.

A lightweight integration

Add caching to the clients you already use.

Connect an existing OpenAI client and keep working with familiar APIs. Start with the SDK, then configure the caching behavior that fits your workflow.

See SDK documentation
TypeScript
import OpenAI from "openai";
import { Alchymos } from "@alchymos/openai";

const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
const alchymos = new Alchymos(process.env.ALCHYMOS_API_KEY);

alchymos.withLlm(openai);

const response = await openai.chat.completions.create(params);

Built for control

Caching that fits your workflow.

Choose how requests are scoped, routed, inspected, and refreshed.

Global edge distribution

Serve cached responses from the nearest region to your user.

Authenticated caching

Scope cached data to organizations, licenses, or individual users.

Fine-grained rules

Configure behavior by tool, parameters, or request type.

Automatic invalidation

Purge entries when upstream data changes.

Purge API

Clear cache entries manually or programmatically.

Metrics and analytics

Review cache hits, latency, and tokens saved.

Cache debugging

Inspect headers to understand why requests are cached or bypassed.

Performance controls

Set performance targets for enterprise workloads.

Explore the SDK to see integration examples, or talk with us about caching for your agent workflows.

Choose what your agent can reuse

Start with a read-only step your agent repeats, such as looking up the same product record. Decide who can reuse the result and how long it stays useful.

  1. Find a repeatable read

    Look for calls with recurring inputs and stable outputs. A product lookup can be reused when the inputs match. An order submission needs to run for each intended purchase.

  2. Set the scope and lifetime

    Use a tenant or user scope when the result depends on identity or permissions. Set the time to live (TTL) based on how quickly the underlying data changes.

  3. Measure and tune

    Compare hit rate and end-to-end latency before and after rollout. Check sample responses against the source to catch stale data or missing context.

Decide what counts as the same request

Two calls can look identical and still produce different answers. Identify the inputs and context that affect the result before deciding whether a previous response can be reused.

Product search

A search for the same product name can return different prices or availability by region. Treat region and currency as part of what makes a result reusable.

Model-generated answers

A new prompt template, model, or knowledge-base version can change the answer even when the question stays the same. Include those distinctions when planning reuse.

Plan for data that changes at different speeds

A single workflow may combine reference data with information that changes minute to minute. Choose a freshness policy for each step based on what the agent does with the result.

Stable reference data

Product specifications and help articles can often tolerate longer reuse. Identify how an update would trigger a refresh when a correction needs to reach users sooner.

Live decisions

Check inventory or account eligibility close to the moment of purchase or approval. A stale value at that step can affect whether the action succeeds.

Review cache behavior under real traffic

Compare results for an individual tool or workflow. A site-wide hit rate can hide an expensive call that still reaches the upstream service every time.

Explain a low hit rate

Look for inputs that vary on every call, short expiry windows, and traffic spread across many scopes. Use those findings to decide whether more reuse is possible.

Watch the miss path

Observe how the workflow behaves when an entry expires or a burst of new inputs arrives. Check upstream latency and errors during those periods alongside the overall savings.

Frequently asked questions

Explore cache and workflow metrics
What happens when a request misses the cache?

The request runs against the upstream model or tool. If the response qualifies under your cache rules, it can be stored for a future matching request.

When should I invalidate a cached result?

Invalidate affected entries when the underlying data or permissions change and waiting for expiry would serve an outdated result.

Can I reuse a response across users?

Shared reuse fits responses that are identical for every intended reader. Use a narrower scope whenever account data, permissions, or personalization can affect the response.