A municipal agent caches structured tool-step results in Azure Managed Redis. Which data-structure approach fits?
Select an answer to reveal the explanation.
Short Explanation
Hashes/JSON in Redis are labeled cubbies for each tool field—agents can grab just the permit status without unpacking a mystery blob every time.
Full Explanation
A municipal agent that caches structured tool-step results in Azure Managed Redis should prefer Redis hash or Redis JSON structures when field-level reads matter, rather than opaque undifferentiated blobs. Hashes/JSON let the agent fetch permit status or a single tool field without deserializing an entire blob on every agent step in a permitting workflow. Always storing tool results as one undifferentiated string blob even when field-level reads are required forces full parse cost and complicates partial updates when only one field changes. Caching structured results only in Cosmos change feed leases misuses the lease store—an indexer coordination mechanism—as a general application cache and risks corrupting indexer progress. Refusing to cache tool results and calling every downstream system on each agent step forever maximizes latency and dependency load for routine civic agent loops. Exam caveat: structure choice follows access pattern; blobs can still fit opaque payloads, but field-heavy agent state belongs in hash/JSON with TTLs. Operationally, model tool results as Redis hashes or JSON documents, read only needed fields in agent steps, and verify cache hit rates and partial-read latency during permitting workflows.