[{"data":1,"prerenderedAt":345},["ShallowReactive",2],{"project-43988381":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":34,"aspects":35,"strip":42,"post_text":43,"what":44,"said":74,"maker_in_thread":173,"shape":185,"grid":190,"attempts":308,"same_week":309,"maker_shows":18,"maker_hidden":337,"reader_version":338,"card":339},"43988381","Muscle-Mem","A behavior cache for AI agents","title","Show HN: Muscle-Mem, a behavior cache for AI agents","https:\u002F\u002Fgithub.com\u002Fpig-dot-dev\u002Fmuscle-mem","github.com","edunteman",1747251506,2025,226,51,273,3837,8,"notable","ai","agent caching sdk","library",[24,25,26,27,28],"ai agents","agent caching","computer use","rpa","trajectory replay","mixed",0.209,{"positive":18,"neutral":18,"mixed":32,"critical":33},2,3,21,{"execution":36,"idea":39,"design":41},{"positive":37,"critical":38},0,1,{"positive":40,"critical":32},5,{"positive":38,"critical":37},[37,37,37,37,37,37,37,38,37,37,40,40,33,33,37,33,37,33,33,37,38,37,40,37,33,37,40,40,38,33,40,37,33,37,33,37,33,37,37,40],"Hi HN! Erik here from Pig.dev, and today I'd like to share a new project we've just open sourced:\n\nMuscle Mem is an SDK that records your agent's tool-calling patterns as it solves tasks, and will deterministically replay those learned trajectories whenever the task is encountered again, falling back to agent mode if edge cases are detected. Like a JIT compiler, for behaviors.\n\nAt Pig, we built computer-use agents for automating legacy Windows applications (healthcare, lending, manufacturing, etc).\n\nA recurring theme we ran into was that businesses already had RPA (pure-software scripts), and ",{"problem":45,"audience":51,"pricing":59,"motivation":60,"time_to_build":59,"stack":64,"openness":71,"stage":72,"team_size":73},{"value":46,"source":47,"evidence":48},"Agents waste tokens and time repeating known automation tasks; LLMs are in the hot path of repetitive workflows","maker",[49],{"id":50},"post",{"value":52,"source":53,"evidence":54},"Teams building AI agents, especially computer-use and RPA-style automation","inferred",[55,56],{"id":50},{"id":57,"by":11,"text":58},"43990257","I struggled with this one for a while in the design, and didn't want to be hasty in making any decisions that lock us into a direction. I definitely want to support…",null,{"value":61,"source":47,"evidence":62},"Pure-vision computer-use agents for legacy Windows apps were too costly and slow; scripted RPA breaks on edge cases",[63],{"id":50},[65],{"value":66,"source":47,"evidence":67},"Python",[68],{"id":69,"by":11,"text":70},"43992199","Definitely, but there's lots of API surface area to figure out first, so will stick strictly to python for now. I can see a future where this ends up with a native storage\u002Fquery…","open_source","launched","team",{"praise":75,"objections":99,"requests":126,"questions":145,"alternatives":153},[76,92],{"value":77,"source":78,"evidence":79},"Interesting idea and promising direction for agent memory","commenter",[80,84,88],{"id":81,"by":82,"text":83},"43989416","lherron","Feels kinda like JIT compiling your agent prompts into code. Awesome concept, hope it pans out.",{"id":85,"by":86,"text":87},"43992832","parsabg","I've been thinking about this (funnily, also while building a browser use type agent [1]) and I think this is a solid direction to explore. My implementation stores tuples of…",{"id":89,"by":90,"text":91},"43989110","joshstrange","This is a neat idea and is similar to something I've been turning over in my head. LLMs are very powerful for taking a bunch of disparate tools\u002Finformation\u002Fetc and generating…",{"value":93,"source":78,"evidence":94},"Clean API design",[95],{"id":96,"by":97,"text":98},"43990185","adchurch","now that's a beautiful api!",[100,115],{"value":101,"source":78,"evidence":102},"Hard to define cache hits and validate environment state reliably",[103,107,111],{"id":104,"by":105,"text":106},"43989752","deepdarkforest","Not sure if this can work. We played around with something similar too for computer use, but comparing embeddings to cache validate the starting position is super gray, no clear…",{"id":108,"by":109,"text":110},"43989033","huevosabio","I love the idea! I think the problem will be defining wether there is a cache-hit or not, since \"agents\" are loosely defined and the tasks include basically anything.",{"id":112,"by":113,"text":114},"43990420","swairshah","The tricky question is what env state do you compare in order to decide if its a cache hit or miss? just screen status, screen status + all open apps, that + all running…",{"value":116,"source":78,"evidence":117},"Could be replaced by a simple bash script or fixing the software",[118,122],{"id":119,"by":120,"text":121},"43990883","zombiwoof","I love how we are back to “it could have just been a bash script” territory already",{"id":123,"by":124,"text":125},"43989862","allmathl","> At Pig, we built computer-use agents for automating legacy Windows applications (healthcare, lending, manufacturing, etc). How do you justify this vs fixing the software to…",[127,138],{"value":128,"source":78,"evidence":129},"TypeScript version",[130,134],{"id":131,"by":132,"text":133},"43991958","android521","Hi, Erik, any plan to release a typescript library? I think you could reach more developers with a typescript version",{"id":135,"by":136,"text":137},"43992616","craftedid","Would love to see a TypeScript version too — feels like it could unlock some interesting use cases beyond backend agents.",{"value":139,"source":78,"evidence":140},"Support for partial trajectory cache hits",[141],{"id":142,"by":143,"text":144},"43989430","dmos62","I love the minimal approach and general-use focus. If I understand correctly, the engine caches trajectories in the simplest way possible, so if you have a cached trajectory…",[146],{"value":147,"source":78,"evidence":148},"Whether trajectories could be used to fine-tune a model",[149],{"id":150,"by":151,"text":152},"43988590","dbish","Do you see these trajectories being used to fine tune a model automatically in some way rather then just replay, that way similar workflows might be improved too?",[154,161,167],{"value":155,"source":78,"evidence":156},"Letta \u002F MemGPT",[157],{"id":158,"by":159,"text":160},"43998967","pacjam","check out Letta - the OSS codebase (https:\u002F\u002Fgithub.com\u002Fletta-ai\u002Fletta) is basically focused on solving the memory\u002Fcontext problem in a generalized way (via \"agentic context…",{"value":162,"source":47,"evidence":163},"Voyager",[164],{"id":165,"by":11,"text":166},"43990374","This is very similar to what Voyager did https:\u002F\u002Farxiv.org\u002Fabs\u002F2305.16291 Their implementation uses actual code, JS scripts in their case, as the stored trajectories, which has…",{"value":168,"source":47,"evidence":169},"Prompt caching",[170],{"id":171,"by":11,"text":172},"43990405","you mean like https:\u002F\u002Fwww.anthropic.com\u002Fnews\u002Fprompt-caching or just saving LLM chat message history? If the latter, saving chat history is useless without some snapshot of the…",{"comments":174,"answered":40,"key":175},14,[176,179,182],{"id":177,"text":178},"43999253","Love your sleep time stuff! It's an inspiration for Muscle Mem",{"id":180,"text":181},"43990179","Thanks for sharing your experience! I'd love to chat about what you did to make this work, if I may use it to inform the design of this system. I'm at erik [at] pig.dev To…",{"id":183,"text":184},"43988854","In a way, a Muscle Mem trajectory is just a new \"meta tool\" that combines sequential use of other tools, with parameters that flow through it all. One form factor I toyed with…",{"commenters":186,"max_depth":187,"maker_replies":174,"first_comment_mins":188,"lifespan_hours":189},31,4,22,30,[191,195,199,202,205,207,208,210,213,215,219,221,224,226,227,228,229,230,232,234,236,238,241,243,245,249,253,258,260,263,264,266,268,270,273,276,278,279,283,284,286,291,295,299,301,303,306],[192,37,37,193,194,37],"43991197","other\u002Fneutral\u002Fidea","mindwok",[196,37,37,197,198,37],"43991636","other\u002Fneutral\u002Fnone","ramoz",[200,37,37,197,201,37],"43994547","FisherKK",[203,37,37,193,204,37],"43997565","hnuser123456",[206,37,37,193,204,37],"43997414",[158,37,37,197,159,37],[177,37,37,209,11,38],"project\u002Fpositive\u002Fidea",[211,37,37,193,212,37],"44001182","tom_m",[104,38,38,214,105,37],"project\u002Fcritical\u002Fexecution",[216,38,37,217,218,37],"43989825","commenter\u002Fneutral\u002Fnone","arathis",[180,38,37,220,11,38],"project\u002Fneutral\u002Fdesign",[222,32,40,209,223,37],"43988789","web-cowboy",[183,32,37,225,11,38],"project\u002Fneutral\u002Fidea",[85,33,40,209,86,37],[112,187,33,225,113,37],[142,40,33,225,143,37],[57,40,37,225,11,38],[231,40,33,225,143,37],"43992383",[233,40,37,217,11,38],"43992451",[150,235,33,225,151,37],6,[237,235,37,225,11,38],"43988793",[108,239,33,240,109,37],7,"project\u002Fmixed\u002Fidea",[242,239,37,225,11,38],"43989164",[123,18,38,244,124,37],"project\u002Fcritical\u002Fidea",[246,18,37,247,248,37],"43989877","commenter\u002Fneutral\u002Fidea","nawgz",[250,251,40,209,252,37],"43989464",9,"nico",[254,255,40,256,257,37],"43994379",10,"maker\u002Fpositive\u002Fnone","fkjadoon94",[259,255,37,217,11,38],"43997893",[131,261,33,262,132,37],11,"project\u002Fneutral\u002Fnone",[69,261,37,262,11,38],[135,261,40,265,136,37],"project\u002Fpositive\u002Fnone",[81,267,40,209,82,37],12,[119,269,38,244,120,37],13,[271,269,37,217,272,37],"43996833","ramesh31",[274,174,33,240,275,37],"43989296","DrNosferatu",[89,277,40,209,90,37],15,[165,277,37,225,11,38],[280,281,33,225,282,37],"43988980",16,"ivanovm",[171,281,37,225,11,38],[285,281,33,225,272,37],"43996803",[287,288,37,289,290,37],"43992034",17,"other\u002Fcritical\u002Fnone","revskill",[292,293,37,197,294,37],"43989382",18,"hackgician",[296,293,33,297,298,37],"43989457","project\u002Fneutral\u002Fexecution","ctoth",[300,293,37,297,11,38],"43990311",[302,293,37,220,11,38],"43990332",[96,304,40,305,97,37],19,"project\u002Fpositive\u002Fdesign",[307,304,37,217,11,38],"43990381",[],[310,315,320,325,330,334],{"id":311,"name":312,"points":313,"category":314},"43935394","Hyvector",331,"dev_tools",{"id":316,"name":317,"points":318,"category":319},"43928118","qtap",259,"infrastructure",{"id":321,"name":322,"points":323,"category":324},"43975423","HelixDB",237,"data",{"id":326,"name":327,"points":328,"category":329},"43936097","Aberdeen",224,"languages",{"id":331,"name":332,"points":333,"category":20},"43964201","Airweave",176,{"id":335,"name":336,"points":333,"category":20},"43988533","Semantic Calculator",false,"v2",{"id":340,"name":5,"line":6,"ai":337,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":341,"top":18,"kw":342,"maker":11,"domain":10,"tier":19,"attempts":37,"strip":343,"url":9,"mix":344,"praise":77,"objection":101,"sub":21},43988381,0.21,[24,25,26,27,28],"0000000100553303033010503055135030303005",[18,18,32,33],1794036674820]