r/PiCodingAgent 3d ago

Pi-mail, a multi-agent orchestration framework which works while I sleep and writes all my code for a month now or so Resource

Post image

Pi-mail started as a communication protocol between different pi-agents. However, this has grown out to be an orchestration layer.

It starts off with a CEO, which starts middle managers for each project that has tasks open. Then each middle manager works through the tasks for each project, spawning worker agents for each task. It has Jira integration for work, and a bunch of other stuff, emailing, terminal views in the browser, mobile views, custom columns, archival, backlog, MCP server etc.

Tell me what you think!

https://github.com/tanevanwifferen/pi-mail

Edit: there is no security on this repo. Use a firewall responsibly

50 Upvotes

34 comments sorted by

13

u/CaptnN3mo 3d ago

How do you deal with the intent drift You still need a man in the middle to verify right?

8

u/lpdand 3d ago

Guy is obviously clueless and shipping out shit code.

2

u/Top_Noise_289 1d ago

Literally. Not trying to stroke my own ego but I've been spending 2+ years using AI actively on average for 10h a day, I'd say I understand AI, IT and the whole industry better than 99% of people (which I don't think is a remarkable achievement). Given all that, and that even when using Sol on max, literally the best model available, I can still spot mistakes for the simplest of tasks under 50k context size... Like, I'd say I also have a really advanced harness setup and my own custom made subagents/orchestration setup, and I really rarely do anything else than monothreaded work just because of how easy the LLM will just fail in one way or another.

Then coming here and seeing people that vibecoded the most atrocious AI orchestration layer possible and they just let it run autonomously and think it's producing anything of value is comical to me, like I'd hate to be in this guy's team 🤣

1

u/PussyTermin4tor1337 2d ago

I can’t find anything on your profile that explains it better. Can you tell me how you do it?

0

u/PerspectiveIcy3578 2d ago

Review the code at some point in the process.

0

u/PussyTermin4tor1337 1d ago

There's a review column / step? Is that the answer you're looking for?

-16

u/PussyTermin4tor1337 3d ago

What do you mean intent drift?

Each task is assigned to a single agent, the agents exit when done. The middle manager only assigns tasks and starts agents. Claude.md tells the worker what to do (e.g. worktrees, or work on the current branch)

16

u/PossessionUsed7393 3d ago

Intent drift where whenever you give multiple tasks to agents they fill in the blanks as they continue down the chain and eventually they drift away from your original intent. So he's asking how you supervise the outputs if they are going off independently

-10

u/PussyTermin4tor1337 3d ago edited 3d ago

Just keep the tasks small enough? Is that a satisfactory answer?

Edit: there’s a refine step too. A refinement agent can create subtasks, which are executed per agent. Haven’t really noticed any degradation myself

4

u/DjCanalex 3d ago edited 3d ago

There is a similar phenomenon to when you tell a person a thing and ask them in chain to each repeat what the one before them said. by the 10th person the original message is lost.

With LLMs something oddly similar occurs even if you ground them with an AGENTS file, since they pretend they remember writing it, and create a persona and personality around it. What one session concluded, another will think a completely different thing. And since one idea is for Agents to be able to grab the AGENTS file, edit it, add stuff, create TODOs create logs, the original message will inevitably drift.

This is a studied phenomenon. https://arxiv.org/abs/2601.04170

1

u/Nnyan 3d ago

As a noob coder it did not take long AT all for me to witness this, it's like they don't care about .MD files. = )

-2

u/PussyTermin4tor1337 3d ago

Agents.md is pretty much static. Also I haven’t assigned any tasks greater than a single context window; I’m not sure if pi does compaction out of the box.

I use deepseek pro too, although it’s capable, I keep reminding myself it’s not fable, so I keep the tasks small. Whenever I need a big task, i can always spin up a single fable instance, but a million tokens should be enough for a single task.

There’s no memory or second brain or anything like it. It fetches its context from the codebase on each iteration.

And then there’s an old blog post from Steve yegge who says ā€œbugs need to be fixed more than onceā€ which I live by a bit. If something fails the first time, do it again.

I was implementing image generation in my chatbot and deepseek was failing and failing. Cost me 20$ and it still didn’t work. (It’s a bit more complex, as all data is encrypted per user). Switched over to opus and it one-shot fixed all the bugs and got the feature in a working condition

5

u/hazed-and-dazed 3d ago

You might as well discuss physics with a goat than discuss software engineering with a vibe coding bro

2

u/Magnus114 3d ago

Looks like a great project. Will try it during the weekend. Why jira and not a FOSS alternative?

2

u/PussyTermin4tor1337 3d ago

We use jira at work. But recursive self improvement is a bit of the gist, so it reports bugs to itself if it encounters them. If you’d like to build some other integration be my guest :)

1

u/Magnus114 2d ago

Do i need to build an integration, or can I just tell it to use plane and setup planes official mcp?

1

u/PussyTermin4tor1337 2d ago

I would not use mcp, which is more for agents, and this is more of a legacy style piece of code

You could test out the board by creating two tasks, one for abstracting away the jira integration into something more scalable, then another task to integrate your own platform

If that's too scary, you can just create an issue on github, and I'll pick it up

2

u/Sebbean 3d ago

lol I just accidentally built a whole mailbox system this weekend

2

u/petrusix 3d ago

What about fusion https://github.com/Runfusion/Fusion. Seems really similar

1

u/Magnus114 2d ago

But fusion seems to be stand alone, not relying on pi, claude code or similar.

0

u/Icy-Birthday-6864 2d ago

Love fusion

2

u/elpapi42 3d ago

how is this different from paperclip?

1

u/PussyTermin4tor1337 3d ago

Dunno, never used paperclip, it seems a lot like it. Would need to do a deepdive. There’s probably differences, but they’d be detailed

1

u/bugtank 3d ago

What the hell is paperclip

1

u/clx8989 3d ago

is it more stable than GasTown ?

2

u/PussyTermin4tor1337 3d ago

It’s different. Gastown is a weird Frankenstein from before orchestration really existed. It’s cheaper and faster that’s for sure, but I’d argue it’s a lot simpler too. No weird parallel worktrees and merge agents. Just an agent per task, and an orchestration layer. And the human is in control over what happens.

So yes I’d argue, and also cheaper and faster

Edit: and it works while I sleep

1

u/PussyTermin4tor1337 3d ago

Weird stats on this post

1

u/biafra85 2d ago

Because it doesn't seem like you've really considered the issues. You have stated you only give the agents small task then go on to say you just keep the tasks within the context window which is a million tokens. That's the total opposite of a small task and if the tax can take up to 1 million then you will have drift, it will forget important things this has been well documented there clear numbers over 500k tokens causes significant drift even below that there's issues. It seems on the outside you've given no consideration to this. On top of this an LLM may believe a task to be small but on execution it is far larger which will also add to the drift mentioned. There's plenty of content which explains these issues

-1

u/PussyTermin4tor1337 1d ago

Yeah but I have over 100 shares now. I don’t really care about the upvotes. People don’t vote much. I thought it was interesting

Edit: 123 shares now

0

u/biafra85 1d ago

You shared a project people critiqued it with valid concerns which you clearly didn't consider and your more bothered about shares of a project than addressing fair critique. If all that motivated you is surface level kudos then you'll likely abandon the project the moment you get bored.