{
  "video": {
    "id": "KtBivPzmOM8",
    "title": "Memory-Aware Agent Harnesses for Anti-Money Laundering — Nacho Martinez, Oracle",
    "duration": 3109,
    "upload_date": null,
    "channel": "AI Engineer",
    "source": "AI Engineer",
    "event_format": ""
  },
  "analysis": {
    "video_id": "KtBivPzmOM8",
    "title": "Memory-Aware Agent Harnesses for Anti-Money Laundering — Nacho Martinez, Oracle",
    "one_liner": "Don't fixate on the frontier model you can't control. Engineer the harness around it instead: the agent loop, memory layers, context compaction, and vector-retrieved toolboxes and skillboxes. Changing the harness alone can make the same model perform better or worse.",
    "summary": "Nacho Martinez (Oracle) argues that the agent harness is the most interesting part of AI right now, because it is the only part of the stack you can really customize. The harness is the data layer of scaffolding for tool use, memory and perception that sits around a frozen frontier model. He walks through the pieces: the agent loop, files vs databases, short-term and long-term memory (episodic, procedural, semantic), context summarization and compaction, toolbox/skillbox retrieval, skill distillation and the instruction hierarchy. He then shows a Codespaces workshop where an autonomous anti-money-laundering agent, running a Grok model on Oracle Cloud (OCI), flags suspicious bank transactions so a human can review them.",
    "key_points": [
      "The harness is the scaffolding for tool use, memory and perception around the model. It is proven that changing only the harness makes the same model perform better or worse on specific tasks.",
      "Files vs databases: having several agents write to the same file is currently worked around with git worktrees. Martinez says databases solved this problem 30 years ago with ACID transactional consistency. Use files for large unstructured data and databases where you need consistency.",
      "Memory taxonomy: short-term memory is the context window. Long-term memory splits into episodic (past conversations, tool logs, summaries), procedural (skills, workflows) and semantic (who the user is, preferences, favorite framework).",
      "Performance degrades as the context grows. A problem is solved much more accurately starting at 0 tokens than at 256k, even though the advertised limit is now 1M. There are two remedies. Summarization: generate a summary and start the next conversation from it. Compaction: store conversation chunks in a database or file under an ID, which the agent pulls back later by ID plus offset.",
      "Toolbox/skillbox pattern: each skill costs about 3,000–5,000 tokens and he has around 100 installed. So tools and skills are vectorized, and the agent loop pulls the most relevant ones with similarity search (k=3 in the workshop, with an optional reranker) and offloads them afterwards. Tools and skills can take more than 50%, even 80%, of a request (35k–100k tokens). Provider caching (he calls it a 'semantic cache') is why this isn't 4–5x more expensive.",
      "Skill distillation: turn past runs into a new SKILL.md in the skillbox, as Hermes Agent pioneered, so later prompts semantically retrieve it. He frames continual learning as three kinds of memory: parametric (weights, LoRA/fine-tuning), representational (embeddings) and non-parametric (the harness work covered in the talk).",
      "The instruction hierarchy weights inputs: the system prompt carries the most weight, the user request ranks third, and skills carry the least. Harness bootstrap overhead varies a lot: Pi sends about 6,000 tokens up front, while other harnesses send 30–40k.",
      "Workshop agent loop: at most 8 iterations and 60 seconds of reasoning per iteration. It assembles context from tools, skills, prior conversations and the database, then searches vector-store knowledge and writes suspicious activity reports for a human to inspect rather than taking drastic action itself."
    ],
    "takeaways": [
      "Spend effort on the harness, not on chasing frontier models. Building a custom harness for a narrow problem can be simple: he would start from scratch so you can strip out the 90% you don't need.",
      "Keep the memory layer simple at first: just short-term and long-term. Promote context worth keeping to long-term storage as raw text, vectorize it later, and add a 'recall long-term memory' step between observing and reasoning, with a distance threshold for discarding irrelevant memories.",
      "Don't load every tool and skill into context. Embed them, retrieve the top-k per request (optionally with a reranker), and consider hybrid search (keyword plus semantic, fused with RRF) instead of grep-style matching.",
      "For database agents, use an MCP server to expose pre-written, proven SQL queries instead of letting agents generate dialect-specific SQL dynamically every time.",
      "Match harness settings to the problem. Long-running autonomous agents with no human in the loop need automatic compaction or summarization and near-infinite patience. A bounded workflow like the AML one can cap the loop at 8 steps."
    ],
    "topics": [
      "agent harnesses",
      "agent memory",
      "context engineering",
      "agent loop",
      "tool retrieval",
      "continual learning",
      "hybrid search",
      "anti-money laundering"
    ],
    "tools": [
      "Oracle",
      "Oracle Cloud Infrastructure (OCI)",
      "Oracle Database",
      "Grok",
      "OpenAI",
      "Anthropic",
      "Claude Code",
      "Codex",
      "Pi",
      "OpenClaw",
      "Hermes Agent",
      "GitHub Codespaces",
      "MCP",
      "DeepLearning.AI",
      "Andrew Ng",
      "PostgreSQL",
      "Firefox"
    ],
    "quotes": [
      {
        "text": "the work tree uh solution or the workaround has been already solved by databases 30 years ago. And we're trying to reinvent the wheel",
        "at": "15:11",
        "url": "https://www.youtube.com/watch?v=KtBivPzmOM8&t=911s"
      },
      {
        "text": "the smaller the context window is the better it will solve a problem.",
        "at": "18:50",
        "url": "https://www.youtube.com/watch?v=KtBivPzmOM8&t=1130s"
      },
      {
        "text": "I'm not putting a 100 skills at the same time into the context window because each skill is like 3,000 5,000 uh tokens.",
        "at": "21:04",
        "url": "https://www.youtube.com/watch?v=KtBivPzmOM8&t=1264s"
      },
      {
        "text": "I would start from scratch because that way you can you get to uh strip 90% of what you don't need.",
        "at": "49:38",
        "url": "https://www.youtube.com/watch?v=KtBivPzmOM8&t=2978s"
      }
    ],
    "words": 9839
  },
  "summary_url": "/#KtBivPzmOM8",
  "transcript": {
    "html": "/transcripts/KtBivPzmOM8.html",
    "txt": "/transcripts/KtBivPzmOM8.txt",
    "vtt": "/transcripts/KtBivPzmOM8.vtt"
  }
}