Agent Utilities
7/8/26Less than 1 minute
Agent Utilities
Info
Utility classes for the agent module.
Utilities
| Utility | Description |
|---|---|
| AgentIpUtils | IP address sanitization and normalization |
| AgentJsonUtils | JSON repair and safe serialization |
| AgentStreamChunkUtils | Text splitting for SSE streaming |
| AgentStringUtils | String trimming and normalization |
| AgentToolUtils | Tool implementations (weather, web search, etc.) |
Key Functions
AgentIpUtils
sanitizeIp(value)— Clean and normalize IP addresses
AgentJsonUtils
repairLiteralNewlinesInStrings(json)— Fix unescaped newlines in JSON stringstoSafeJson(objectMapper, obj, maxLength)— Safe JSON serialization with length limit
AgentStreamChunkUtils
splitForStreaming(text)— Split text into chunks for SSE streaming
AgentStringUtils
trimToEmpty(value)— Trim string, return empty if nulltrimToDefault(value, default)— Trim string, return default if null/blanklowerTrim(value)— Lowercase and trim
AgentToolUtils
- Weather queries, web search, IP geolocation, time, session context
Changelog
7/8/26, 5:52 AM
View All Changelog
9f290-on

