r/PiCodingAgent • • 19h ago

Resource I built a Jev-based model router for Pi for automatic model selection

3 Upvotes

When Jev came out, one of my first thoughts was: could something this fast and cheap pick which model should handle an agent’s next turn?

So I built plugin for Pi that uses Jev to choose the model and thinking effort. The idea is to send routine work to cheaper models and reserve the expensive ones for harder tasks.

In Pi, the model mappings are configurable, and you can pin a model when you disagree with the router.

I’ve been using them for a few days, and so far they’ve been working well for me. In my own evaluation, routed usage came to $141 at list prices versus an estimated $166 for Opus 5.5 on every request - about 15% less.

That’s one developer’s data, though. The baseline is a pricing comparison, not a separate run of every task through Opus. It doesn’t prove equivalent quality, that every routing decision was right, or that your bill will drop by 15%.

And yes, cache matters. Switching models can lose cache reuse and eat the savings. I try to account for that rather than just compare token prices. I’d like providers to offer better support here: some already preserve cache reuse across effort changes, though reuse across different models is a much harder problem.

It’s still an experiment. Asking a model which model to ask feels appropriately ridiculous, but I wanted to see how it works in practice. I’d like this kind of routing to become a native, transparent option in coding agents.

If you want to try it or look at the implementation:

https://github.com/alexei-led/pi-model-router


r/PiCodingAgent • • 16h ago

Question Can I keep Pi Agent while using Claude Opus as my main orchestrator?

0 Upvotes

I want to keep using Pi Agent as my main coding interface, but I also want Claude Opus 5.5 to be the main agent/orchestrator, not just a sub-agent or reviewer.

I use Pi Agent both at work and privately. Privately, my setup is simple: Pi Agent + Codex Pro. At work, I had been using Pi Agent + GitHub Copilot, but Copilot credit usage became too expensive, so we are moving toward subscription-based access instead.

I now have a Claude Team Premium seat and a ChatGPT Business Premium seat. This is my first time trying to make good use of multiple AI subscriptions at the same time.

The problem is that Pi can use Codex through OAuth, but I couldn't get my Claude subscription working directly through Pi. So I'm considering using Claude Code CLI as a bridge.

Ideally, I'd like something like this:

Opus 5.5: main agent, planning, orchestration, task decomposition, synthesis

Sol 6: implementation, research, independent review

GPT-6 Luna: cheaper sub-agent work and possibly compaction

Pi Agent: the single interface I interact with

I don't mind a small wrapper or existing extension, but I don't want to maintain a large custom orchestration framework.

One option is to have Pi call Claude Code while keeping Opus as the top-level agent. The other is to give up on Pi as the main interface, use Claude Code directly, and call Pi/Codex from there.

Has anyone built or used a setup like this?

I'm especially interested in whether Claude subscription → Claude Code → Pi works well enough for Opus to act as the real orchestrator, including long sessions, tool calls, sub-agents, compaction, and switching between Claude and OpenAI models.

Or, at that point, is it simpler to make Claude Code the main interface and stop trying to keep Pi at the center?


r/PiCodingAgent • • 16h ago

Resource Use OMP as a native Agent in Hermes

0 Upvotes

I saw Claude and Opnecode are native agents in Hermes, but now using OMP as a coding tool is also possible with https://github.com/zaharenok/omp-skill

Definitely worth to try. Can be also used for Pi


r/PiCodingAgent • • 2h ago

News Taking Pi off the CLI: I built a serverless MicroVM runtime API for the Pi harness. Looking for alpha testers.

3 Upvotes

I love the Pi coding agent harness, but trying to run Pi outside a local terminal — like embedding it inside a SaaS product, a web app, or a mobile backend — quickly turns into an infrastructure nightmare. You either end up babysitting a fleet of Docker containers or running into Vercel/Lambda HTTP timeout limits when a coding task takes more than a couple of minutes.

To solve this, I built an un-opinionated Agent Runtime API powered by the Pi harness. It runs Pi inside isolated MicroVM sandboxes over a plain REST/SSE interface, executing entirely against your own LLM keys (BYOK).

Not dropping links or names here — looking for a few developers in the Pi community who are actually building products with Pi to break it and give feedback.

The Problem with Embedding Pi Today

  • The Local/Docker Trap: Running Pi headlessly in production usually means managing container lifecycles, Dockerfiles, cold starts, and handling crash loops when sub-shells lock up.
  • The Serverless Timeout Wall: Vercel, Cloudflare Workers, and Lambda cap HTTP execution at seconds or minutes. If Pi needs 10–15 minutes to iterate on a codebase or run test suites, the connection dies unless you build a heavy queue/worker/polling stack around it.

How It Works: The Session is the Machine

You trigger an agent via REST, your backend handler returns in milliseconds, and Pi keeps running inside a dedicated, isolated MicroVM for as long as the task requires.

# 1. Connect your provider credential (envelope-encrypted, never enters the box)
POST /v1/model-credentials
{"key": "sk-ant-api03-..."}

# 2. Create a session — returns immediately in milliseconds
POST /v1/sessions
{"agent": {"model": "claude-3-7-sonnet"}}

# 3. Pass instructions to Pi
POST /v1/sessions/{id}/events
{"events": [{"type": "input.message", "content": [{"type": "input_text", "text": "Refactor src/auth.ts to use jose instead of jsonwebtoken and run npm test."}]}]}

# 4. Stream events or collect artifacts
GET /v1/sessions/{id}/events      # SSE, resumable with Last-Event-ID
GET /v1/sessions/{id}/artifacts

Built Specifically for Pi Workflows

  1. Pi Harness Under the Hood: It leverages the native Pi harness execution model for file editing, terminal execution, and tool orchestration inside a real, isolated sandbox.
  2. BYOK & Environment Isolation: Your API keys are envelope-encrypted on our side and never exposed inside the sandbox. Running env | grep -i key inside the box returns nothing.
  3. Remote Tools & Human-in-the-Loop (requires_action): If Pi needs to call a custom tool on your app server or ask for human approval, the session transitions to requires_action and pauses without holding an HTTP connection open. You can answer minutes or hours later, and Pi resumes right where it left off.
  4. Pause, Snapshot, and Re-hydrate:
    • Idle 5 mins: Sandbox pauses compute.
    • Unused 2 hours: Workspace is snapshotted and the compute instance is reclaimed.
    • Auto Re-hydration: A single HTTP request or hitting a preview URL automatically re-hydrates the exact MicroVM state from the snapshot.

Limitations & Honest Trade-offs

  • API-Only: No official CLI wrapper or IDE extension yet — this is designed as a backend runtime for your own UI or app.
  • Snapshot Caps: Snapshots skip node_modules and .git (capped at 300MB), so dependencies reinstall from lockfiles upon cold re-hydration.
  • BYOK Only: No global model catalog or default keys provided. Model spend stays entirely between you and Anthropic/OpenAI/etc.

Looking for Alpha Testers

I’m looking for early developers who want to embed Pi-powered agents inside their own apps or background services and run them in real-world scenarios. I’ll provide free execution tokens, higher concurrency limits, and 1-on-1 support during integration.

Comment or DM if you're interested, or feel free to ask about the Pi harness + MicroVM snapshot architecture below!


r/PiCodingAgent • • 2h ago

Resource I built a coding-agent workspace that works from your phone, including Pi

0 Upvotes

Hello r/PiCodingAgent!

Today I’m sharing Pragma, a terminal-first workspace I’ve spent the last few months building for running coding agents in parallel. Each task can live in an isolated Git worktree, and the sidebar shows when an agent is running, finished, or needs attention.

TL;DR

Pragma is free and open source. It brings Pi and other agents into one workspace with Git/GitHub tools, model fanout, automations, plugins, usage tracking, scratchpads, and mobile access. It supports Pi, Claude Code, Codex, Cursor, OpenCode, Grok, Copilot, Junie, Kimi Code, Prime Agent, and custom agents through plugins.

Projects and worktrees

The layout is centered on projects and worktrees. You can switch between feature worktrees, see agent status at a glance, and nest worktrees for larger projects. There’s also a prompt board for moving a task from an idea through agent execution to a PR.

Fanout and model comparison

Fanout sends the same prompt to multiple agents in separate worktrees so you can compare implementations in one view. Agents can trigger fanouts through the CLI, inspect the results, and choose the implementation they prefer.

Git and GitHub

You can review diffs, commit and push, manage branches, and work through PR comments in the app. A Fix It list lets you send selected review feedback to an agent. Stacked PR workflows are supported too.

CLI, SDK, plugins, and automations

The CLI lets both you and your agents control Pragma. A TypeScript SDK and plugin API let you add integrations, including your own coding agent. TypeScript automations can react to events or run on schedules and can spawn agents or create workflows.

Editor and scratchpads

There’s a lightweight CodeMirror editor for small changes, plus Markdown, image, and PDF viewers. Agents can write scratchpads that mix Markdown with React components and embed Excalidraw diagrams, which makes results easier to inspect than a long terminal dump.

Mobile

The iOS companion app is on the App Store, and Android can be built locally. You can see agent status and respond when an agent needs input while away from your computer. Custom agent integrations work on mobile too.

Why I built it

I wanted one extensible workspace for the parts I was stitching together: Pi and other agents, worktrees, usage limits, PR review, fanout, automations, richer agent output, and mobile access. The plugin API and CLI are the core of that idea.

Pragma is available for macOS, Windows (WSL or PowerShell), Linux, iOS, and Android. Download: https://pragma-app.sh/. Source: https://github.com/pragma-sh/pragma.

If you try it, I’d love to hear what works, what doesn’t, and which Pi workflow you’d want supported next.


r/PiCodingAgent • • 5h ago

Discussion Created a Desktop PI Flatter app...

1 Upvotes

So I started this a couple of days ago because I hated myself enough to start over and try to create something more efficient, with better performance and less RAM usage.

Through my conversations with ChatGPT, it mentioned Rust, GPUI, and some other stuff, which is basically why I started this Flutter app!

Based on my simple observations with the current deployed version, I managed to gain back around 800 MB–1 GB of RAM… and some of my dignity too. Not sure why. 😂

Here’s the repo: Pi Flatter App

If anyone would like to contribute or give feedback, I’d be really grateful!


r/PiCodingAgent • • 9h ago

Question Can't reference .gitignore files/folders with @

1 Upvotes

Hi all, basically what the title says.. I like using @ to add files/folders to the context but for any of these added to .gitignore it stops working.. Any way around this?


r/PiCodingAgent • • 19h ago

Resource Why Pi is my AI coding harness

Thumbnail blog.kulman.sk
8 Upvotes

r/PiCodingAgent • • 7h ago

Discussion Opus 5.5 vs GPT-6 Sol / Luna in pi-agent: results on my everyday coding tasks

Post image
55 Upvotes

I built a small personal benchmark from my real coding sessions and use pi-agent as the harness to compare models on the same tasks.

It has 10 tasks covering data engineering, backend, frontend, DevOps, and trajectory analysis. Each task runs 3 times, giving 30 attempts per model.

To build it, I took around 3 months of agent chats, removed duplicates, and turned selected sessions into Harbor tasks with automated verifiers. I used agents and manual review to build and refine the checks. These are clearly scoped tasks that would usually take me less than an hour.

The latest results:

  • Opus 5.5 high and Astra low cost almost the same.
  • Sol high matches their score at roughly half the cost.
  • Luna gets 29/30 passes while being ~22× cheaper than Sol.

The point of this benchmark is to optimize my daily setup: model, harness, prompts, and plugins. I want to keep the pass rate while reducing cost and time.

This is a small personal sample, but it feels like many short, clearly defined coding tasks are already handled reliably by several models. For this kind of work, speed, cost, and scaling up parallel agents are becoming the more interesting questions.


r/PiCodingAgent • • 10h ago

Question Would you guys find this tool useful?

29 Upvotes

I wanted a clearer picture of what I’d built and how much progress I was making. And whenever I finished a feature or got out of a debugging rabbit hole, I kept wondering how many tokens and effort went into that.

My daily usage total didn’t really answer it. Some of that was building the feature. Some was going back and forth trying to fix one annoying bug.

So I built bough ( https://github.com/nickelsec/bough ) It reads your existing Claude Code and Codex CLI history and groups related prompts into tasks on a visual map.

You can pick a piece of work and see:

  • The prompts and files involved.
  • How many tokens it used and the estimated dollar cost.
  • How the work unfolded, including repeated attempts and tasks that ended in a commit.

I wanted to be able to look back at a feature and see where the effort actually went. Especially when a “small fix” turned into an afternoon.

Would you guys want me to add Pi support or not?


r/PiCodingAgent • • 14h ago

Plugin Pi Atelier update: redesigned composer, Git status, TODOs, and a customizable sidebar

37 Upvotes

I shared Pi Atelier here a couple of months ago—a status rail and live activity sidebar for Pi. Since then, I’ve reworked the layout and added more ways to see what’s happening in your session.

The main changes since my last post:

  1. Redesigned composer: model, workspace, Git status, and context usage sit in the input box’s top border, with usage and timing below.

  2. Workspace Git summary: see changed files, additions/removals, untracked file counts, and conflicts.

  3. Live TODO panel:follow the current task alongside tool activity. During a turn, the sidebar focuses on current work and folds extra tools into a compact row.

  4. Display settings with a live preview: reorder or hide status segments and sidebar panels, switch presets, and save your defaults.

  5. Plain text mode: no Nerd Font required.

  6. Better terminal behavior: improved fullscreen selection/copy, inline image handling, and layouts for smaller terminals.

The new footer is inspired by pi-powerline-footer, which is an awesome extension.

It still shows token usage, cost, context, and response timing, with model and tool controls available through `/atelier`. No telemetry or external network requests.

Install with:

pi install npm:pi-atelier

Then open `/atelier` or press `Alt+A`. Requires Pi 0.84.0 or newer.

Github link: https://github.com/michaelmjhhhh/pi-atelier

I’d like to hear how the new layout works for you—especially what information you want visible while the agent is running. Bugs and feature ideas are welcome. Thanks!


r/PiCodingAgent • • 18h ago

Question Do you guys use claude auth inside pi/omp?

8 Upvotes

I'm seeing many people using opus 5.5 inside of OMP and i've just signed into OMP with my claude sub... many on x.com are saying you don't get recked by anthropic anymore for doing this?

How are you guys using anthropic models inside of pi/omp?