Inspiration

Alfredo Memory Agent was inspired by a simple problem: AI agents are powerful, but they usually forget everything between sessions. Users have to repeat preferences, constraints, past decisions, and important context over and over again. I wanted Alfredo to act more like a real long-running assistant: one that can remember useful information, ignore stale details, and explain why something was recalled.

What it does

Alfredo Memory Agent is a persistent memory layer for AI agents. It stores user preferences, facts, and interaction history in a local SQLite vault, retrieves the most relevant memories for a new request, and packs only trusted memories into the agent context. It also supports memory lifecycle behavior: memories can be reinforced when useful, superseded when a preference changes, archived when stale, and explicitly forgotten. The project includes a CLI demo, Python SDK-style integration, MCP integration paths, Qwen Cloud provider wiring, and a synthetic benchmark with thousands of memory records to test long-term recall behavior.

How we built it

We built Alfredo as a Python project with a modular architecture. The core pieces include a memory store, deterministic and semantic embedding support, retrieval scoring, context budgeting, forgetting logic, lifecycle events, and integration layers for CLI, MCP, and Qwen-compatible chat APIs. For persistence, Alfredo uses SQLite so the memory vault can run locally and remain inspectable. The demo and benchmark are deterministic, which makes the behavior easier to verify during judging without depending on a live model call every time.

Challenges we ran into

The hardest part was deciding what should count as useful memory. Saving every message is easy, but it creates noise and wastes context. Alfredo needed to retrieve memories that are relevant, current, trusted, and small enough to fit into a bounded prompt. Another challenge was making the demo understandable without voice narration. We needed the terminal demo to clearly show learning, recalling, superseding, forgetting, and benchmark evidence using large visible text and inspectable output.

Accomplishments that we're proud of

We are proud that Alfredo is more than a simple chat history wrapper. It models memory as a lifecycle: learn, retrieve, trust, pack, reinforce, supersede, and forget. We are also proud of the benchmark and demo flow. The project includes synthetic evaluation data for sustained-memory behavior and a clear console demo that shows how the agent remembers across sessions while keeping context small and explainable.

What we learned

We learned that long-term agent memory is not just a storage problem. A useful memory system needs retrieval policy, trust signals, context limits, stale-memory handling, and clear evidence for why a memory was selected or dropped. We also learned that hackathon-ready AI projects need more than working code. The architecture diagram, demo video, deployment proof, and documentation are all part of making the system understandable and credible.

What's next for Alfredo Memory Agent

Next, we want to improve the hosted deployment path and make Alfredo easier to connect to production agents. That includes a cleaner Alibaba Cloud backend deployment, stronger Qwen Cloud integration examples, and a more polished MCP server workflow. We also want to expand the memory evaluation suite with more realistic multi-user scenarios, better contradiction handling, privacy controls, and optional managed storage backends for larger deployments.

Built With

  • alibabacloudpythonsdk
  • click
  • dashscopeapi
  • fallback-embeddings
  • forgetting
  • mcp
  • mcp-server
  • memory-listing
  • numpy
  • oh-my-pi
  • omp
  • openai
  • orchestrator-behavior
  • pytest
  • pytestsug
  • python
  • pytorch
  • qwencloud
  • qwencloud-provider-wiring
  • retrieval
  • sdk
  • sentence-transformers
  • sqlite
Share this project:

Updates

Submission history