Hacker News
24.1K subscribers
118K links
Top stories from https://news.ycombinator.com (with 100+ score)
Contribute to the development here: https://github.com/phil-r/hackernewsbot
Also check https://t.me/designer_news

Contacts: @philr
Download Telegram
Writing N-body gravity simulations code in Python (❄️ Score: 150+ in 4 days)

Link: https://readhacker.news/s/6ueLr
Comments: https://readhacker.news/c/6ueLr
Show HN: Muscle-Mem, a behavior cache for AI agents (Score: 150+ in 7 hours)

Link: https://readhacker.news/s/6uuUP
Comments: https://readhacker.news/c/6uuUP

Hi HN! Erik here from Pig.dev, and today I'd like to share a new project we've just open sourced:
Muscle 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.
At Pig, we built computer-use agents for automating legacy Windows applications (healthcare, lending, manufacturing, etc).
A recurring theme we ran into was that businesses already had RPA (pure-software scripts), and it worked for them in most cases. The pull to agents as an RPA alternative was not to have an infinitely flexible "AI Employees" as tech Twitter/X may want you to think, but simply because their RPA breaks under occasional edge-cases and agents can gracefully handle those cases.
Using a pure-agent approach proved to be highly wasteful. Window's accessibility APIs are poor, so you're generally stuck using pure-vision agents, which can run around $40/hr in token costs and take 5x longer than a human to perform a workflow. At this point, you're better off hiring a human.
The goal of Muscle-Mem is to get LLMs out of the hot path of repetitive automations, intelligently swapping between script-based execution for repeat cases, and agent-based automations for discovery and self-healing.
While inspired by computer-use environments, Muscle Mem is designed to generalize to any automation performing discrete tasks in dynamic environments. It took a great deal of thought to figure out an API that generalizes, which I cover more deeply in this blog:
https://erikdunteman.com/blog/muscle-mem/
Check out the repo, consider giving it a star, or dive deeper into the above blog. I look forward to your feedback!
Show HN: Semantic Calculator (king-man+woman=?) (Score: 150+ in 18 hours)

Link: https://readhacker.news/s/6uuXx
Comments: https://readhacker.news/c/6uuXx

I've been playing with embeddings and wanted to try out what results the embedding layer will produce based on just word-by-word input and addition / subtraction, beyond what many videos / papers mention (like the obvious king-man+woman=queen). So I built something that doesn't just give the first answer, but ranks the matches based on distance / cosine symmetry. I polished it a bit so that others can try it out, too.
For now, I only have nouns (and some proper nouns) in the dataset, and pick the most common interpretation among the homographs. Also, it's case sensitive.