I've been building my own AI agent for the past few months, and the one problem I keep coming back to is hallucinations.
At first I thought the answer was better prompts. Then I added memory. Then I redesigned the architecture, split long-term and short-term memory, added retrieval, planning, and verification. Every time I felt like I'd solved it, another weird failure showed up everytime.
Sometimes the agent remembers things perfectly and other times it confidently ignores its own memory or invents an answer when the information is already available. The frustrating part is that these failures aren't always predictable they often happen after the system gets more capable, not less.