‹ BackHN Continuity

Thread

Agents don't need memory, they need documentation

363 points · 259 comments · kmeh

  1. bushido · · focus · HN ↗
    Something I started doing recently was writing out principles instead of memories.

    Essentially patterns the agents need to always think in. I also implemented a versioning system to the principles that need to be quoted in any comments which are there in the code. That way, when my principles evolve, so does the code.

    I did package it up in a way that I can share it with friends [0]. System still evolving, but the last two-ish months that I've used it has served me really, really well, And it's been even better with the latest models.

    I've had surprisingly good adherence from agents on this technique.

    [0] <a href="https:&#x2F;&#x2F;principledriven.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;principledriven.dev&#x2F;

    1. visarga · · focus · HN ↗
      I wrote a cli tool the agent is instructed to call. The tool collects answers to a few questions from the agent, and responds with a steering command. Sometimes it responds with more questions, and then shows the command.

      The questions are designed specifically to identify the state the agent is in, in order to assign its steering. Changing this tool changes how the agent works. You just need to make the use of this tool a necessity so it does not forget to call it.

      Unlike principles and memories, questions are more openended and tend sometimes to trigger the right mentality in the agent even before it gets to the policy itself. In my opinion agents get lost in local work losing the big picture, my questions jog the big picture back into attention.

      1. call ssp tool, no arg, it just reads features from the repo, like most other tools -&gt; ssp locates state and sends 4-5 questions

      2. agent responds the first batch -&gt; state is further narrowed down -&gt; ssp sends a second batch of questions

      3. agent responds again to the interview -&gt; state gets finally pinned down -&gt; agent gets the steering assigned

      4. a log is created of this ssp session, and reflection on the log used to refine the questions and steerings in the ssp tool (name comes from State-Space Policy)

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.