Class FilesystemInterceptor.Builder
java.lang.Object
com.alibaba.cloud.ai.graph.agent.extension.interceptor.FilesystemInterceptor.Builder
- Enclosing class:
- FilesystemInterceptor
Builder for FilesystemInterceptor with comprehensive configuration options.
Note: Token limit and large result eviction features have been moved to
LargeResultEvictionInterceptor. Use both interceptors together if needed.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCustomToolDescription(String toolName, String description) Add a single custom tool description.build()customToolDescriptions(Map<String, String> customToolDescriptions) Set custom tool descriptions to override defaults.readOnly(boolean readOnly) Set whether the filesystem should be read-only.systemPrompt(String systemPrompt) Set custom system prompt to guide filesystem usage.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
systemPrompt
Set custom system prompt to guide filesystem usage. Set to null to disable system prompt injection. -
readOnly
Set whether the filesystem should be read-only. When true, write_file and edit_file tools are not provided. Default: false -
customToolDescriptions
public FilesystemInterceptor.Builder customToolDescriptions(Map<String, String> customToolDescriptions) Set custom tool descriptions to override defaults. Map keys should be tool names: "ls", "read_file", "write_file", "edit_file", "glob", "grep". Example:Map<String, String> customDescs = Map.of( "read_file", "Custom read file description", "write_file", "Custom write file description" ); builder.customToolDescriptions(customDescs); -
addCustomToolDescription
Add a single custom tool description. Convenience method for adding one description at a time.- Parameters:
toolName- Name of the tool ("ls", "read_file", etc.)description- Custom description for the tool
-
build
-