Inspiration

We feel like AI is not at the point where it can code yet. Even as experienced developers, we still find ourselves checking documentation, not only because it's good practice but because it's necessary to stay up to date on rapidly changing software. APIs shift, packages deprecate, and docs update, but today's coding agents don't adapt. They guess based on whatever was true at training time, and you pay for every hallucinated fix, every dead-end refactor, and every round-trip that a current source of truth would have prevented.

We wanted to build something different: a coding agent where knowledge is enough, where the agent treats the live web as a first-class resource instead of relying on a frozen training snapshot.

What it does

perplx is a terminal-native AI coding agent powered by the Perplexity Agent API. It follows a simple loop: intent → live research → explain → act.

You describe a task in plain language from your terminal. The agent researches in real time, pulling current docs, release notes, and trustworthy sources via Perplexity-backed web search, then proposes edits with short, readable explanations of what will change, why it's grounded in up-to-date sources, and what to double-check before you run it. You always stay in control.

Key features include:

  • Live research: every suggestion is informed by what vendors actually ship now, not a frozen snapshot
  • Readable summaries before you run anything: non-trivial changes come with auditable plans tied to current sources
  • Skills & repeatable workflows: define your team's scripts, conventions, and guardrails so the agent repeats your patterns instead of improvising
  • Session sharing: share coding sessions via share.perplx.net with full markdown and syntax highlighting
  • Three model tiers: choose between Rush (fast), Fast (balanced + reasoning), and Smart (full reasoning) depending on the task, all backed by frontier models like Claude Opus 4.6 and GPT-5.4

How we built it

The core agent is written in TypeScript and compiles to a standalone binary via Bun. The architecture is split into a few key pieces:

  • tool/ — The CLI agent itself, with modules for argument parsing, the core agent session loop, interactive and print modes, the Perplexity provider integration, and web search tooling.
  • worker/ — A session-sharing backend built on Cloudflare Workers with Hono as the web framework and Cloudflare D1 as the database, powering share.perplx.net.

Challenges we ran into

Session management was trickier than expected. Conversations need to be serializable, resumable, and shareable, each with different constraints. Getting the session sharing pipeline right (agent → local storage → Cloudflare Worker → rendered view with syntax highlighting) required careful coordination across the stack.

We also wrestled with model routing. Exposing three tiers through a unified interface while letting users switch mid-session with Ctrl+P meant the provider layer had to be stateless enough to swap models without losing conversation context.

Accomplishments that we're proud of

  • The research loop actually works. When you ask perplx to upgrade a dependency or migrate an API, it pulls the current migration guide, not a hallucinated version of one from 18 months ago.
  • It's a real, installable tool. Not a demo or a notebook, you git clone, build, and have a binary in your PATH that works in any project directory.
  • Session sharing is seamless. One command generates a shareable link with fully rendered markdown and syntax-highlighted code. It makes pair debugging and handoffs dramatically easier.

What we learned

  • Terminal UX is an art. Building a good interactive experience in the terminal is a very different challenge from web UI work. Streaming responses, handling interrupts, and making model switching feel fluid required a lot of iteration.
  • Cloudflare's edge stack is incredibly productive. Workers + D1 + Pages let us ship a full session-sharing backend with persistence and a docs site with very little infrastructure overhead.
  • Bun as a build target is powerful. Compiling TypeScript into a standalone binary via bun build --compile gave us distribution simplicity we wouldn't have gotten with a traditional Node.js setup.

Built With

Share this project:

Updates