You’re viewing the v1.5.8 (legacy) docs. Go to the latest docs →
Gaunt Sloth Assistant
    Preparing search index...
    • Create Anthropic prompt caching middleware. This middleware adds cache control headers to reduce API costs.

      Returns Promise<
          AgentMiddleware<
              any,
              any,
              any,
              readonly (ClientTool | ServerTool)[],
              readonly (() => StreamTransformer<any>)[],
          >,
      >