Retrieved article excerpt
Open article · Retrieved 2026-10-28T12:30:19.157247+00:00
[jep](https://github.com/tinybig-ai/jep/blob/main/docs/images/jep.png)
# jep
**One interface for every coding agent. On whatever device you're on.**
jep is a remote control for **opencode**, **codex** and **claude**, **pi** and more. Reachable
from **Telegram**, the **Android app**, or any client behind the
[gateway](https://github.com/tinybig-ai/jep/blob/main/docs/GATEWAY.md).
[check](https://github.com/tinybig-ai/jep/actions/workflows/check.yml)
[android](https://github.com/tinybig-ai/jep/actions/workflows/android.yml)
[jep architecture: clients (Telegram, Android, gateway) on the left, a hexagonal core wrapping the HarnessAdapter port in the middle, and harnesses (opencode, Claude Code, Codex) on the right](https://github.com/tinybig-ai/jep/blob/main/docs/images/architecture.png)
Clients on one side, harnesses on the other, the hexagonal core in between.
---
## Why jep
Every agent ships its own CLI, its own models, and its own way of working away
from a desk: Claude Code has a polished mobile app, opencode and codex meet you
at the terminal. Reaching one from another device means bolting a *specific*
app onto a *specific* harness, duplicated per harness, and you still switch
harnesses to reach a given model.
jep is the shared layer: one harness contract, one set of clients, every agent.
It's a framework too, so a new harness or client drops in without touching the
rest.
- **🧠 One core, every harness.** A single `HarnessAdapter` port normalizes each
agent: **opencode** as the flagship, full adapters for **Claude Code** and
**Codex**, so any harness behind the layer is reachable from any device.
- **📱 Clients wherever you are.** A **Telegram bot** with native rich messages
(tables, collapsible thinking and tool calls, stop buttons, permission
prompts) and a **Jetpack Compose Android app**. The
[gateway](https://github.com/tinybig-ai/jep/blob/main/docs/GATEWAY.md) makes a web dashboard, Slack bot, or desktop
widget a client too.
- **⚡ Live from the first word.** Turns stream into an animated draft: a 💭
thinking line, expandable tool calls, the answer tail updating every ~700 ms.
Tap **stop** to cut a turn, **steer** to replace it.
- **🎙 Speak your prompt.** Voice notes are transcribed with whisper and land as
real prompts, with a receipt of what was *heard*.
- **🖥 The repo, from your client.** Read-only git screens (status, log, diff),
one confirmed **push**, and config-as-data toggles for **MCP servers and
skills**.
- **💸 Spend you can see.** A usage screen and pinned cost chip report what the
harness priced each turn: tokens, model, USD. **Free by default** until you
pick a paid model.
- **🔒 Private by default.** Sessions live in an isolated data home, your CLI's
store untouched; the daemon serves Tailscale or your LAN. Self-hosted,
account-free.
---
## Quick start
Two minutes to your first agent reply from wherever you are.
### Requirements
- **Node ≥ 26** (the daemon runs native TypeScript, no build step)
- at least one agent CLI installed: **opencode**, **codex**, or **claude**
### Download
Every [release](https://github.com/tinybig-ai/jep/releases/latest) carries:
- **`jep-<version>.apk`**: the signed Android app. Install it on the phone.
- **`JepBar-<version>.zip`**: the macOS menu-bar app (status and a pairing
QR). Unzip it into Applications. It isn't notarized yet, so open it the first
time with right-click → Open.
- **iOS**: not on the App Store or TestFlight yet. Build it from Xcode; see
[clients/ios](https://github.com/tinybig-ai/jep/blob/main/docs/clients/ios.md).
The daemon is on npm: `npm install -g @tinybig-ai/jep`, then run `jep`.
### 0. One command, no checkout
```
JEP_TG_TOKEN=<from @BotFather> npx --yes @tinybig-ai/jep
```
This runs the Telegram bot. The same daemon serves the Android app and other
clients through the [gateway](https://github.com/tinybig-ai/jep/blob/main/docs/GATEWAY.md) (set `JEP_GW_PORT`); the client
guides are in [docs/clients](https://github.com/tinybig-ai/jep/blob/main/docs/clients). For the launchd daemon, the Android
build, or hacking on jep, clone below.
### 1. Install
```
git clone https://github.com/tinybig-ai/jep.git && cd jep
npm install
```
### 2. Run the daemon
```
# point at a workspace (defaults to the current directory)
export JEP_WORKSPACES="$HOME/your-project"
npm start
```
> On macOS, `sh scripts/install.sh` installs it as a **launchd daemon** that
> survives reboots, crashes and full-disk-access quirks. See
> [docs/PROCESSES.md](https://github.com/tinybig-ai/jep/blob/main/docs/PROCESSES.md). For a quick dev loop, `npm start`
> is all you need.
> Both installers also register a small Claude Code hook
> (`scripts/claude-handoff-hook.mjs`): when you continue a Claude conversation
> from your phone, a desktop window that still has it open catches up on
> your next message: Claude is handed what was said on the phone first. If the
> transcript cannot be read, it stops the message and says to run `claude -c`.
> `JEP_NO_CLAUDE_HOOK=1` skips it.
> On Linux, `sh scripts/install-linux.sh` installs it as a **systemd user
> service** that restarts on a crash and, with `loginctl enable-linger`, comes
> back after a reboot. Logs: `journalctl --user -u jep-tg -f`. CI boots the
> daemon on Debian in mock mode, and has systemd verify the unit, on every push.
### 3. Pick a client
jep runs as one daemon and reaches you through whatever client you prefer.
Each client has its own setup and command surface:
- **Telegram bot** → [clients/telegram](https://github.com/tinybig-ai/jep/blob/main/docs/clients/telegram.md):
pair it from your chat, then text it. Rich messages, voice notes, git and
usage screens, and a streaming stop/steer loop.
- **macOS menu bar** → [clients/macos](https://github.com/tinybig-ai/jep/blob/main/docs/clients/macos.md): daemon status and a QR to pair a phone.
- **iOS app** → [clients/ios](https://github.com/tinybig-ai/jep/blob/main/docs/clients/ios.md): the same app for iPhone and iPad, in SwiftUI.
- **Android app** → [clients/android](https://github.com/tinybig-ai/jep/blob/main/docs/clients/android.md):
Point it at the gateway, pair, and you have conversations, streaming turns,
and notifications in a native Compose client.
- **Anything else** → the [gateway](https://github.com/tinybig-ai/jep/blob/main/docs/GATEWAY.md): a token-authenticated
HTTP + SSE door that any client (web dashboard, Slack bot, desktop widget)
can speak to.
Telegram reaches you from anywhere, since the daemon polls out and nothing is
exposed. The **Android app** and every **gateway** client instead talk *to* your
machine, so they need a network path to it: **Tailscale**, another VPN, or the
LAN. The gateway has no TLS of its own, so it rides the network's encryption
(WireGuard), like SSH.
Client setup lives in those READMEs so the top of this file stays the same
whichever client you choose.
---
## The Android app
An example of one client. It talks to the same daemon over the gateway. The
Telegram face and the gateway itself are in [docs/clients](https://github.com/tinybig-ai/jep/blob/main/docs/clients).
| | | | |
| --- | --- | --- | --- |
| [Conversations](https://github.com/tinybig-ai/jep/blob/main/docs/images/screens/android-sessions.jpg) | [A streaming turn](https://github.com/tinybig-ai/jep/blob/main/docs/images/screens/android-chat.jpg) | [Settings](https://github.com/tinybig-ai/jep/blob/main/docs/images/screens/android-settings.jpg) | [Usage](https://github.com/tinybig-ai/jep/blob/main/docs/images/screens/android-usage.jpg) |
| Conversations | Chat | Settings | Usage |
---
## How it works
jep is a **hexagonal / ports-and-adapters** system. The core defines one
contract (`HarnessAdapter`, domain events, and message types) and two kinds of
adapter plug into it.
```
flowchart LR
subgraph Core["Hexagonal core"]
PORTS["Ports: HarnessAdapter · DomainEvent · Message · Ask<br/>(src/core/ports.ts, types.ts)"]
PURE["Pure satellites<br/>git · usage · skills · mcpconfig · transcribe"]
COMP["Compliance suite<br/>feature-parity gate"]
end
subgraph Harnesses["Agent harnesses (driven adapters)"]
OP["🔵 opencode serve<br/>spawn · SSE · approval"]
CX["🔺 Codex"]
CL["🔶 Claude Code<br/>+ MCP ask bridge"]
YO["🟢 yours → plugins/adapters ⤵"]
end
subgraph Frontends["Presentation (driving adapters)"]
TG["📱 Telegram bot<br/>rich blocks · HTML · streaming"]
GW["🌐 Gateway (HTTP + SSE)<br/>JEP_GW_PORT"]
AND["🤖 Android app<br/>Compose, via Gateway"]
end
TG --> PORTS
GW --> PORTS
AND --> GW
PORTS --> OP
PORTS --> CX
PORTS --> CL
PORTS -.-> YO
PURE -.-> PORTS
COMP -.-> PORTS
```
Loading
### The hexagon in practice
- **The core doesn't know Telegram or opencode.** Frontends see only the port
type, a `provider/model` string, a `Message`, an `AskRequest`. Harnesses emit
`DomainEvent`s; the client decides how to present them.
- **Every reply degrades, never fails.** The render pipeline is
*Rich Message blocks → Telegram HTML (box-drawn tables) → plain text*, and a
rejected parse retries without markup. A fancy feature breaking looks a little
worse; it doesn't crash the bot.
- **State is isolated, credentials are shared.** The daemon runs each harness in
its own `XDG_DATA_HOME` so your CLI's sessions are untouchable, but mirrors
your `auth.json` in so every model in the picker actually runs.
- **Turn ownership follows the caller.** The session started it is the session
that owns it. One process, shared ports, no cross-talk.
Rules and rationales live in [docs/PHILOSOPHY.md](https://github.com/tinybig-ai/jep/blob/main/docs/PHILOSOPHY.md).
---
## Write your own integration
This is the whole point of the architecture: **the seam is small, provable, and
the same on both sides.**
### Add an agent harness (driven side)
Implement `HarnessAdapter` (`src/core/ports.ts`) for your favorite agent, it
doesn't need to run over HTTP, or even be a server.
```
// src/harnesses/my-harness.ts
import type { HarnessAdapter } from "../core/ports.ts"
import type { DomainEvent, Message, SessionSummary } from "../core/types.ts"
export async function startMyHarness(workspace: string): Promise<HarnessAdapter> {
const proc = spawn(`my-harness serve ${workspace}`)
return {
id: "my-harness",
workspace,
endpoint: proc.url,
health: async () => ({ healthy: true, version: "0.1.0" }),
createSession: async (title): Promise<SessionSummary> => /* … */,
prompt: async (sessionID, text, { signal, model, filePaths }): Promise<Message> => {
/* run the actual turn */
},
messages: async (sessionID) => /* history */,
abort: async (sessionID) => /* cancel the in-flight turn */,
respondAsk: async (sessionID, askID, optionID) => /* answer permission prompts */,
events: async function* () { yield { type: "server.connected" } /* stream deltas */ },
close: async () => proc.kill(),
}
}
```
Register it in the harness registry, **one row, and nothing else**:
```
// src/app/harnesses.ts
{ id: "my-harness", icon: "🟢",
start: (dir) => startMyHarness(dir),
available: async () => probeCli("my-harness") }
```
Then prove it. jep ships a **compliance suite** (`src/core/compliance.ts`) that
boots your adapter, creates a session, prompts it, reads history back, and
reports a per-method feature-parity matrix, no boilerplate test to write:
```
npm run probe:harness -- my-harness
```
Every client is written against the same list, so **full parity for your
harness means every client works, unchanged.**
### Build a new client (driving side)
Telegram and the Android app are just two consumers of the core. The
[gateway](https://github.com/tinybig-ai/jep/blob/main/docs/GATEWAY.md) is a thin token-authenticated HTTP + SSE surface over
the *same* ports: sessions, history, prompts, streaming events, asks, usage,
diff