Urgent.News

What's breaking now, across thousands of outlets.

Tech

Crystals: agent memory that arrives before you act

Most agent memory is a search box. The model wonders something, a retriever runs, chunks come back. That design has one load-bearing hole: retrieval fires only when the agent already suspects it needs help. The expensive mistakes are the confident ones, and a confident agent never queries. So we push instead. A note gets bound to an action , and it arrives in the moment before that action runs,…

Agent memory in AI systems often takes the form of a search box, with a retriever pulling relevant chunks when an agent suspects it needs assistance. To avoid costly mistakes from confident agents, crystals are introduced. A crystal is a markdown file containing a binding block at the top, specifying which actions it responds to and when it should be delivered. The crystal arrives before the action is executed, ensuring the information is available even if the agent was not explicitly asked for it.

The crystal contains a substring matching rule, which is simple yet robust, matching plain text substrings case-insensitively without word boundaries. This approach allows for easy auditing and prevents drift in the system's behavior. However, a significant challenge arises when a crystal's content exceeds the token budget, causing it to be cut off before reaching the model. This results in a "crystal failure," where the agent fails to execute the intended action due to the missing information.

To address this issue, a new approach is proposed, focusing on the earlier stage of the system where the note is matched and budgeted. By ensuring that the crystal's content is correctly matched and delivered within the token budget, the system can avoid these failures and maintain reliable agent memory. This field report presents a new perspective on agent memory, highlighting the importance of efficient channel management and budget allocation to prevent costly mistakes in real-world deployments.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Integração com o iFood: o problema na homologação do developer

O desafio Hoje eu quero falar da Temperô, um SaaS multi-tenant de gestão de restaurantes: pedidos, cozinha, caixa, comandas, várias unidades por restaurante.

  • Temperô SaaS integrates iFood marketplace, syncing orders to kitchen and delivery.
  • Used polling instead of webhook, requiring refactoring of token cache.
  • Bug in mapping code to fullCode caused switch to compare against incorrect field.

More from Friday 25 September →