Tuffy CLI: Memory-Native AI Agent

With a memory framework built for local AI agents

Repo
Tuffy CLI: Memory-Native AI Agent banner

About

## What is the problem your project solves? Typical agent memory is a vector database bolted onto a chatbot: no sense of time, no sense of relationships between facts, and no graceful behavior on weak hardware or no network.

Tuffy CLI's bet is that memory deserves its own architecture, and that "local-first" should be provable, not just claimed. **Elastimem** is that architecture, built as layers: versioned facts, hybrid recall, a background consolidation worker, and, its newest layer, a graph, all scaled by a Memory Governor across three hardware tiers. This event proved that whole layered framework works end to end through a real model, and proved local-first and Claude-is-core can both be true at once.

## What is the deployed URL for this project? No live deployment by design (local-first CLI tool) - repo: https://github.com/CodebyKumar/tuffy-cli

## How you are solving it? **Elastimem is the key solution here**: a self-built memory framework for local AI agents, backed entirely by one embedded SQLite database, not a separate vector database, not a hosted service, no external dependency to run offline. It's built as four layers:

  • **Versioned facts.** Plain SQLite rows; a correction creates a new version, nothing is silently overwritten.
  • **Hybrid recall.** SQLite's own FTS5 full-text search plus semantic/vector search over past conversation chunks, no external index or service.
  • **A background consolidation worker.** Extracts and merges memory off the reply path, so it never blocks a turn.
  • **A knowledge graph.** Entity and relationship recall via multi-hop SQL traversal against that same SQLite file, no graph library, its newest layer.

All four are scaled by a **Memory Governor** across three hardware tiers, not just "on" or "off":

  • **LITE**: the hard floor - no LLM call and no embedder call, ever. Keyword-only recall, rule-based fact capture, and (as of this event's upstream update) real read-only 1-hop graph traversal against whatever graph already exists, though nothing new is written to it at this tier.
  • **STANDARD**: embedder and LLM extraction on, batched every 2 turns; 1-hop graph expansion; dedupe-and-decay-level consolidation.
  • **FULL**: per-turn background extraction; 2-hop graph expansion with clustering; full LLM-assisted consolidation, including merges.

The same code runs correctly whether the host has 2 GiB or 32 GiB free - one architecture that degrades predictably, not three different code paths.

Tuffy CLI is the terminal AI agent built around Elastimem: a ReAct-style tool-calling loop that works identically across model providers, a tool registry plus skills and MCP support, and voice mode. It runs on a local model or on Claude, switching live, with the same tools and the same Elastimem memory either way.

**What was built during this event's window**, not before it:

  • **Brought Tuffy CLI current with Elastimem's complete feature set, including its graph layer, and verified the whole framework end to end inside a real agent**, not just that it imports. Verification found and fixed two real gaps: the system prompt was never reading the graph data Elastimem computed, and the background extraction worker's token budget was too small once graph extraction was added, silently truncating and discarding entire extractions. Both confirmed fixed with real stored data, not just passing tests. Later in the same event, pulled a further upstream Elastimem fix that raises LITE tier's graph floor from no traversal at all to real 1-hop read traversal, re-verified directly against this machine's real LITE tier.
  • **Built a native Anthropic Messages API provider**, not a config entry pointing at an existing OpenAI-compatible path, so Claude drives the agent loop and the memory pipeline itself as a first-class model. Verified live against the real API, including a genuine bug only live testing caught. Claude Haiku 4.5 is now the default model.
  • **Built an enforced online/offline network mode**, live-switchable, that is mechanical rather than cosmetic: offline blocks API models from loading or being switched to, and strips network-dependent tools from what the agent is even told it can call.
  • **Added Maya Research's cloud text-to-speech as the online voice engine**, alongside the existing local Whisper/Piper voice path offline, with the model's own reply style aware of which one is active.

**Existing before this event (not built at this hackathon):**

  • **Tuffy CLI's core**: the ReAct-style tool-calling loop, local model loading via llama.cpp, the OpenAI-compatible API provider, the tool registry, the skills system, and the MCP client.
  • **Voice mode's local path**: Whisper speech-to-text and Piper text-to-speech, offline.
  • **An earlier Elastimem integration**: facts, episodic recall, and lessons wired into Tuffy CLI, but without the graph layer, without online/offline mode, without the Claude provider, and without Maya Research's cloud TTS - all four of those are new this event.
  • **Elastimem itself**, as a framework, including its graph layer: a separate standalone project (`CodebyKumar/elastimem`) that predates this event entirely and already backs more than one product. What's new this event is bringing Tuffy CLI current with it and verifying it end to end, not writing Elastimem's own graph-layer code.

## How Did You Use Claude? Claude is the model actually driving the agent: a native Anthropic Messages API provider built for this event speaks Anthropic's real wire format directly, not an OpenAI-compatible shim, and Claude Haiku 4.5 is the default model so both the tool-calling loop and Elastimem's background memory-extraction pipeline run on Claude out of the box. Specifically, Claude is what "online" mode means in Tuffy CLI: the enforced online/offline toggle puts Claude in the driver's seat whenever the agent is online, reasoning, calling tools, and driving memory extraction itself, and only falls back to a local model when offline.

Verified live against the real API:

  • Streaming, a full tool-use loop with self-correction, and code execution rather than asserted answers.
  • Elastimem's memory pipeline (remembering, recalling, building context) all confirmed working end to end with Claude generating the completions.

Claude is also the reasoning engine behind the graph-memory capability that is this submission's centerpiece, extracting entities and relationships into Elastimem's knowledge graph and grounding replies in what the graph surfaces back.

Screenshots

Tuffy CLI: Memory-Native AI Agent screenshot 1Tuffy CLI: Memory-Native AI Agent screenshot 2Tuffy CLI: Memory-Native AI Agent screenshot 3Tuffy CLI: Memory-Native AI Agent screenshot 4Tuffy CLI: Memory-Native AI Agent screenshot 5

Team

From the public Devfolio project page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

GenTech Agent Memory — CockroachDB × AWS

GenTech Agent Memory — persistent, vector-indexed memory layer for AI agents on CockroachDB x AWS (Build with Agentic Memory hackathon)