Prime Agent: A self-improving RLM agent

Posted by Xeophon 1 day ago

Counter249Comment63OpenOriginal

Comments

Comment by _joel 22 hours ago

Installer might look pretty but it installs to the homebrew dir, despite not being a homebrew package. Very dirty. No uninstall method.

Comment by embedding-shape 20 hours ago

> it installs to the homebrew dir, despite not being a homebrew package

I can see the reasoning trace in front of me...

> Hmm, user asked me to install so CLI is globally available for their user, but didn't instruct where. I inspected $PATH and only directory I can write to is where Homebrew packages live. The user didn't say "Don't pretend it is a Homebrew package" so this seems like a suitable location, lets save it there as it fits what the user asked for.

Comment by _joel 19 hours ago

yea, you're probably right, if only there wasn't a local writeable bin path that wasn't homebrew they could put it :D

Comment by axus 1 day ago

Comment by windowshopping 1 day ago

I vouch for this story, personally. I love it. I consider it a classic among science fiction novellas.

It does include some brutal sadomasochism with graphic torture, that's true, and that's why it isn't better known. If that part bothers you, which is fair, I would skim past it. The story overall is quite worth it

Comment by dilap 17 hours ago

Years and years ago I saw this story on k5 when it came out and never read it -- but from commentary I always thought was some sort of hard sci-fi exploration of what happens when we get AGI/ASI.

So all these years later AI is real, I see the story again, and I figure, hey, why not read it. And how very surprised I was to find out it's basically a horny kink story with a little bit of AI/SF window dressing!

Comment by 17 hours ago

Comment by Jordan-117 1 day ago

Tbh the torture scenes are not nearly as disturbing as the underage incest. It's like "Saw" vs. a pedo flick from the 70s. Especially weird since the latter is portrayed like some kind of innocent ideal.

It's frustrating because apart from those (awful) aspects the story is quite thoughtful and compelling. I always recommend people skip the final chapter since the resulting existential cliffhanger is far better than the bizarre last-minute swerve into gratuitous sex abuse.

Comment by embedding-shape 19 hours ago

> the underage incest [...] Especially weird since the latter is portrayed like some kind of innocent ideal.

(Potential spoilers to the story ahead) Are you talking specifically about the "re-population" stuff from the ending? It was many years I last read it, but I seem to recall that there was hesitation and stuff involved, together with "This is literally the only way to re-populate since we're just two people" basically, not sure what other direction it could have gone into, unless you'd just skip describing it completely. But maybe I misremember (or my brain subconsciously suppress my memory) more of the same horrible stuff from the story?

Comment by Jordan-117 18 hours ago

Yes, the final chapter.

Aside from it being biologically impossible to repopulate from a single couple, it was not really portrayed ambiguously. I don't care to reread it, but from what I remember, the main protagonist was the driving force behind it, grooms her own (single-digit-age?) daughter into the idea, who then sleeps with her own father in graphic detail. He is a little hesitant at first, but relents almost immediately, and this is implied to be a good thing. Cue decades of continued child-incest and inbreeding.

Putting the characters in that situation and resolving it the explicit way he did was a deliberate choice the author makes -- it didn't have to be that way.

Comment by elaida73 11 hours ago

>It appeared to listen intently as a man in a cleric's uniform railed. "God made all intelligent creatures," the man was saying in a powerful voice. "You may have the apprearance of thinking, but you are really just parroting the responses taught you by that man there." He pointed at Lawrence.

Comment by ajmurmann 18 hours ago

My issue was that the violence and incest were one of the main drivers of the story. It felt like reading some sex novela that happens to have some great scifi elements rather than the other way around.

Comment by phrotoma 19 hours ago

I put this novella into the same bucket as the altered carbon books. So glad I read them, absolutely packed with weird ideas, but I will probably never have the stomach to revisit them.

Comment by 23 hours ago

Comment by nullc 1 day ago

You shouldn't link that without mentioning that it is a particularly intense S&M/rape/incest fetish piece, and that the squick content is entirely integral to the story. I'm generally dubious of "trigger warnings" but if ever there was something that needed content tags-- this is it.

If you imagine it being written for alt.sex.stories.moderated but somehow failing to be erotic by virtue of being too explicit, and being a few orders of magnitude better writing for that venue... then you wouldn't be too far off. [Started making a silly example of how some sex story could fail like that and then realized I was litterally describing a scene from prime intellect].

It's also arguably the origin of a lot of the mentally ill ai-safety hysteria. Arguably an enjoyable romp for those who understand that it's fiction, but it seems a lot of people cannot.

Comment by axus 17 hours ago

You and everyone else saying so are correct; I forgot how bad it was when I posted the link. "Prime Agent" obviously used the story for branding or a callback, so this is 100% on-topic, but I should have re-examined what I was posting and added a warning.

Comment by JSR_FDED 23 hours ago

I went into this thinking I’m a big boy and don’t need all these warnings.

I was wrong.

Comment by EarlKing 1 day ago

For everyone downvoting: It's literally a story about the creation of mankind's first artificial general intelligence, Prime Intellect, and the consequences of that discovery.

Comment by JLO64 1 day ago

I feel that more warning is needed for this book. Everything you’ve stated is true, but the book’s first chapter contains some of the most disturbing depictions of stuff I don’t know I can type here on HN. Additionally, the last chapter put a really bad taste in my mouth.

That said, the stuff that deals with AI and its implications on the universe was great and more relevant than ever. The way PI works is pretty similar to how we use subagents to tackle large repos!

Comment by heed 1 day ago

yea the beginning is pretty gory / horrific. it almost made me stop reading but you can't deny the world building is.. unique

Comment by ajmurmann 18 hours ago

Is it only the first chapter? I remember it to be the bulk of the book.

Comment by EarlKing 1 day ago

Yeah, there's no question this one's over-the-top when it comes to trying to gross out the reader, but I'd like to think people can overlook that.

Comment by KiwiJohnno 1 day ago

Not just the first AGI, but the book deals with a (very) hard-takeoff scenario of the singularity. The AI, Prime Intellect starts recursively increasing its capabilities and things rapidly spin out of control. This is actually a small part of the book, most of the book is about what happens after this - Its a fantastic read, yes as other posters have said there is some extremely graphic sex and violence in this book, but it is not gratuitous. I highly reccommend.

Comment by 1 day ago

Comment by andai 1 day ago

A write up on RLM (Recursive Language Models) by one of the authors of the RLM paper:

https://alexzhang13.github.io/blog/2025/rlm/

Comment by embedding-shape 1 day ago

LLM-generated code that seemingly went without much review or design is always such an interesting dive into just how bloated you can make code. In this repository, multiple files are close to 10K LOC, one file contains a switch statement that has so many case statements it spans more than 1000 lines, and lots of other fun stuff.

I guess it depends on the model you're trying to use, but seems most of them prefer smaller codebases, they work a lot better with less code, which kind of makes sense. With that in mind, I'd probably aim for something way smaller to bootstrap a self-improving agent. Then I'd use this "Prime Agent" as an example to my self-improving agent for what it should not evolve to.

Comment by c-hendricks 1 day ago

> one file contains a switch statement that has so many case statements it spans more than 1000 lines

Probably best to leave YandereDev's code out of the training data.

Comment by tosh 1 day ago

here is a take on a smol agent ("smol")

  - 21 lines of Go
  - no 3rd party dependencies
https://github.com/smol-env/smol

easier to add and customize stuff when you start from a small base

think of it as your starter dough

Comment by efskap 8 hours ago

I dig the spirit, but if I'm meant to understand it in an afternoon, why is it codegolfed to such an extent? It's like reading the output of a minifier, not idiomatic Go.

Comment by vivzkestrel 20 hours ago

got one in typescript? or node.js with javascript?

Comment by tosh 18 hours ago

I'm adding python in a few minutes and then looking into other languages including javascript and typescript

all with the same zero 3rd party dependencies approach

also want to do clojure, unfortunately it looks like java does not come with json support out of the box

Comment by embedding-shape 16 hours ago

> also want to do clojure, unfortunately it looks like java does not come with json support out of the box

Clojure has clojure.data.json (https://clojure.github.io/data.json/), should be easy to use albeit not blazing fast exactly, doesn't really matter here though. Otherwise, you could use Babashka, comes with Cheshire (and others) out of the box.

Comment by tosh 16 hours ago

ty for the pointers

I like the babashka angle!

Comment by evanjrowley 14 hours ago

The stuff 99% of agents are coded in? Please tell me this was sarcasm.

Comment by tosh 6 minutes ago

i'm also not a fan of javascript and typescript (let alone the ecosystem they come with)

but the runtimes are everywhere

and a smol agent /w no 3rd party dependencies is probably a good option to have in a pinch

Comment by ben_w 22 hours ago

> In this repository, multiple files are close to 10K LOC, one file contains a switch statement that has so many case statements it spans more than 1000 lines, and lots of other fun stuff.

Pft. Over multiple cases?

I've seen 1000 lines inside a single if-block. The clause was always true. I was not able to break that thing up in my time at that company.

Human wrote that nonsense.

Thing is, the app was pretty successful despite all the stuff wrong with the code. And this success is why I've been bullish on GenAI code itself, even though I'm also bearish on AI companies being able to profit from that.

Comment by dd8601fn 17 hours ago

At all feels a bit like being bullish on the adjustable wrench, to me.

It has lots of utility. Very broad… but not the best for a lot of things. It will be a ubiquitous tool. Outcomes will depend heavily on the quality of the mechanic unless you’re tightening a bolt on your fence gate.

Comment by andai 1 day ago

Bash is all you need.

https://minimal-agent.com/

Comment by digidecode 1 day ago

[dead]

Comment by whattheheckheck 1 day ago

Literally says who. Swe are the least credible "engineers". "It depends" "No you cant track us" "No we have no credentials system other than big company shill certs"

Comment by nullbio 1 day ago

How on Earth do we solve this bloat and death-by-a-thousand-cuts issue with frontier LLMs? Are there any actual solutions or attempts at solutions to this problem that I can try? Any tools or frameworks? I've tried re-architecture skills, dedicated cleanup sessions, and a bunch of other stuff, but nothing really works well.

Comment by kooi 4 hours ago

Add Sentrux to the LLM loop. https://github.com/sentrux/sentrux

It's an offline coding grader. It works well: You ask for a new module, LLM starts spitting out bloated crap, the code score goes down. LLM keep looping until code score is back up.

Not a substitute for human code review, but keeps things within tight guard rails.

Comment by nullbio 1 minute ago

Very nice, thank you. This looks interesting.

Comment by KingMob 2 hours ago

Are you the author? The font size and contrast is kind of poor.

Comment by embedding-shape 22 hours ago

Don't try to "run as fast as possible" and just add code willy-nilly, think about the design, refactor as you add new features/fixes and intentionally be a bit slower and more considerate.

It's not a technical problem, if you steer the LLMs enough and actually review what they do, you can build proper and clean software with them.

Comment by nullbio 14 hours ago

Yeah, but that's boring. :)

Comment by impulser_ 23 hours ago

Don't have it write the whole thing in one session.

Comment by trenchgun 1 day ago

Interesting, so they shipped slop? Succumbed to their own AI psychosis?

Comment by supermdguy 1 day ago

It'll be really interesting when they run RL training on the harness self-improvement loop. I've tried using LLMs for harness engineering, but it often creates too much bloat that weighs things down in the end. Guessing it's just not something the models are tuned to do by default.

Curious if anyone's tried using RL for harness engineering? I think we're still pretty far away from the optimal harness, especially when it comes to long-context memory management.

Comment by astrobiased 1 day ago

Yes, used bert model with decent results.

Comment by fizx 1 day ago

What policy would you use?

Comment by astrobiased 1 day ago

Not RL. SFT.

Comment by riddlemethat 1 day ago

I built one of these RLM harnesses and a local MCP server along with logging, memories, and project rules based on directories. It worked great for a while but the foundational models have largely caught up to the point where they don't need this harness anymore. At least for my use cases. I can basically just store context in .md in the directories we work out of together and accomplish what I need.

Comment by hypercube33 1 day ago

I went the skills route - skill improvement skill and a rule to use it always. Basically it's directed that if anything causes more than a hop of thinking - failure - try something else it should flag that it needs to learn it as a skill so it never does it other than first shot again or if an existing skill fails improve it after it solves whatever problem. it then syncs the files to a shared location and updates the version and also pulls new skills. this let's a team use it or you have multiple workstations.

Comment by oofbey 1 day ago

The core idea of the RLM paper is to make a regular LLM act more like a coding agent - offload context to something external that needs to be explicitly queried instead of filling up valuable context. The "recursion" part of the paper really only wins because they use a top-tier model for the root agent, and cheaper models for the sub-agents.

Prime Agent took the RLM idea (which is really just an academic view on how coding agents have always worked) and then added this "continual harness" idea. This part isn't super well described in the blog post, but includes some message passing between the agents, and the ability to share code.

Overall I chalk it up as neat, but not revolutionary. Another version of what most of these systems are already doing.

Comment by stared 1 day ago

It is impressive that it (almost) saturates ARC-AGI-3, https://x.com/PrimeIntellect/status/2085087000764568010.

I am curious - how does it fare for other benchmarks, or everyday programming?

Comment by tintor 1 day ago

PrimeIntelect is not on official ARC-AGI-3 leaderboard: https://arcprize.org/leaderboard

Comment by stared 1 day ago

Good to know!

Is it that it wasn't accepted yet, or are there issues with how it was run?

Comment by noahbp 1 day ago

It’s a self-improving harness, and ARC-AGI-3 is explicitly a few-shot benchmark. It’s likely that it gave itself more than the maximum number of tries to learn the games, or even hardcoded the answers.

There’s a lot of improvement to be had from the benchmark harnesses, but sometimes, like with ARC-AGI-3, the limitations are intentional.

Comment by andriy_koval 13 hours ago

leaderboard likely has results from "semi-private" dataset, and graph above likely from public dataset, so it can be easily overfit.

Comment by sexyketchup777 1 day ago

As models get stronger, huge harnesses may become less useful. An overly opinionated harness could even constrain the model’s reasoning instead of improving it.

Comment by ViscountPenguin 1 day ago

I'd assume the best harness for a model will tend to be the one that it's RLVF'd on.

Comment by znnajdla 17 hours ago

Very interesting idea but without any concrete examples of performance on real tasks its just a pretty idea

Comment by mromanuk 16 hours ago

They achieved 95% in ARC-AGI-3. [0]

0: https://x.com/PrimeIntellect/status/2085087000764568010

Comment by krm01 17 hours ago

Examples and ROI

Comment by woah 1 day ago

Might actually try this

Comment by zuzululu 1 day ago

this seems like its going to rip through tokens like crazy

self improvement is not a new idea but at current economics its not feasible

Comment by 1 day ago

Comment by eliaseffects 18 hours ago

[flagged]

Comment by modgate 1 day ago

[flagged]

Comment by monocola 22 hours ago

[flagged]

Comment by mukundzzha 1 day ago

[flagged]

Comment by Lortu_AEGIS 1 day ago

[dead]

Comment by amdahl 1 day ago

[dead]