Skip to content

How do we compress the context? #1898

Description

@SanthoshCheekoti

Checklist

Describe the Question

Hello - I'm using CloudSDK + Langgraph. I have a node in my agent that calls a tool hosted by a remote MCP server. The tool is called repeatedly as part of the agent loop and is generating a lot of context, and hence my token count is very large.

  1. Does SDK support the ability to compress the context based on a trigger ?
  2. Secondly, we are having a system prompt that is a bit heavy. Does SDK prompt caching as shown below? If yes, please provide details on how to use it.
    https://docs.langchain.com/oss/javascript/integrations/middleware/anthropic

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions