Meet Pipal
What Pipal is, what it is not, and the one promise it makes: your conversation outlives the tab and the process.
Open a browser tab, type a line, and press Send. The reply can come from a model online, or from a tiny echo model on the computer in front of you. Either way, Pipal keeps the conversation. When you come back tomorrow, you can open the same chat.
In this chapter
- Send your first message with Local echo
- Know what stays when you leave the tab
- Pick a profile and find your next chapter
Your first chat can stay on your machine
- Terminal
- Pipal
- Browser
Terminal → Pipal · pnpm dev
Start Pipal
Build the browser files, then start the server and web build watchers.
Browser → Pipal · Open page
Open your workspace
Go to
http://127.0.0.1:8080. With the default settings, sign in using the token fromdata/access-token.Browser → Pipal · Create chat
Start a Local echo chat
Open Runtime from the composer’s model button, choose Local echo under Model, and press Send. The browser first asks Pipal to create the chat with that model.
Pipal → Browser · Chat ID
The browser gets a chat to watch
Pipal returns the new conversation, including its ID.
Browser → Pipal · Watch chat
Start watching the new conversation
The browser starts watching the new ID for updates as it prepares to post the message.
Browser → Pipal · Send message
Submit the line
The browser posts the message to the new chat. Pipal saves the accepted message and the work of answering it.
Pipal → Browser · Reply
See your words come back
Local echo prefixes your message text with
Local echo:. The server sends the browser the conversation as it changes.
Terminal → Pipal
Start Pipal
Build the browser files, then start the server and web build watchers.
Pipal is a chat workspace you run yourself. You open it in a browser, but the computer running Pipal has the job of answering messages and keeping the history. That computer is the hostThe computer running the Pipal server process.. One long-lived Node.js process serves the page, coordinates model and tool calls, and keeps conversation data in a private directory. Where everything lives and runs takes you through those places. main.ts
You’ll see a reply beginning with Local echo: and the text you sent. That gives you a quick way to check that the page, the server, and the saved chat all work before you connect a model account. For a chat that can write an answer of its own, select a configured model from a provider such as OpenAI or DeepSeek. Profiles and models shows how to connect one. models.ts
Pipal is built for one operator. Signing in from a second browser gives you another view of the same workspace. The server listens only on loopback, an address on the host itself, and serves HTTP. To reach it from another device over HTTPS, put a proxy in front of it and set server.origin to the public HTTPS origin. config.ts app.ts
Open the workspace again in another tab and select the same chat from the sidebar. The token unlocks Pipal itself. Local echo works without a separate model account. app.ts models.ts
For a start without file watchers, run pnpm build followed by pnpm start from the checkout. The second command expects the browser files from the first. If the server cannot find them, it tells you to build the client. Both ways of starting use the same data directory when you keep the same configuration. package.json main.ts
Deep diveWhat starts when you run pnpm dev
The root script runs the web build first, then starts the server and web watch scripts in parallel. The web watch script rebuilds the files Hono serves, and a browser refresh loads those files. The server’s watch script starts start.mjs from the repository root. This keeps the same web output directory in use whether you start the watchers or build the web client once and run pnpm start. package.json package.json package.json
The config loader defaults to token mode and port 8080. After it opens the runtime, the host loads or creates the token and hands it to the app before listening. The token loader uses an exclusive create so later starts can reuse the existing file. Local echo comes from Pi AI’s faux provider, with a response function supplied by Pipal. That function adds Local echo: before the text of the latest user message. config.ts main.ts auth.ts models.ts
The login route issues a browser cookie after it verifies the token. Other protected API routes look up the session named by that cookie. You can therefore reload the page without pasting the token for every request. Starting a new server process clears its sign-in sessions. Sign in again with the same token file. app.ts auth.ts
The chat stays when the tab goes away
To see the difference, type a draft in a second chat and reload that tab before pressing Send. The browser can restore the draft from its own storage. It becomes part of the server’s conversation history only after Pipal accepts it. drafts.ts index.ts
Wait for your message to appear in the chat, then close the tab. When you reopen Pipal, you can find the chat in the workspace and read the reply. Pipal records the message and the work of answering it together. If the server itself stops during a reply, a new process can recover unfinished work that is still within its deadline. Durable by default follows what gets saved and how Pipal decides what to pick up. index.ts
Deep diveWhat the reconnect and restart tests look for
The API test closes its stream after the run starts. It opens a fresh stream and waits for the saved answer, then compares the messages against a separate request for the conversation. The stream is a way of following the conversation. Its lifetime is separate from the lifetime of the work the server accepted. app.test.ts
The recovery test goes further. It kills a child process during a model call, then opens the same store in a fresh process. The test checks that work resumes and that retrying a send keeps its original receipt. Recovery still has a deadline to honor. At startup Pipal examines pending submissions, arms the work from its saved deadline, and resumes the harness. recovery.test.ts recovery-worker.ts index.ts
Pick a job for the assistant
| Feature | Try asking for | What it does |
|---|---|---|
| Chat | A clearer project update | Writes, plans, and can hand work to a specialist. |
| Developer | A fix for the code you pasted | Works with supplied code or a project you give it access to. |
| Code reviewer | A review of an attached patch | Looks for regressions and points to their locations. |
| Sysadmin | A check on disk space | Uses enabled diagnostics on the host when the model can call tools. |
Choose up to two columns
| Feature | Try asking for | What it does |
|---|---|---|
| Chat | A clearer project update | Writes, plans, and can hand work to a specialist. |
| Developer | A fix for the code you pasted | Works with supplied code or a project you give it access to. |
| Code reviewer | A review of an attached patch | Looks for regressions and points to their locations. |
| Sysadmin | A check on disk space | Uses enabled diagnostics on the host when the model can call tools. |
Click the model name in the composer and use Runtime → Profile to choose a profileA named set of instructions, defaults, and tool grants that Pipal applies to a conversation.. Chat is the starting profile in a fresh browser with the bundled profiles. You can select a specialist directly when you already know what you need. The profile supplies instructions and grants tools that are enabled on the host, so choosing Code reviewer gives a model different directions from choosing Developer. RuntimePicker.svelte profiles.ts
For project work, the signed-in owner enables a locationThe place a chat uses for project tools, either the Pipal host, an account reached over SSH, or a Docker project. in Settings → Workspace. Developer can work on the host with This machine, connect to a development account with SSH machine, or work in a container with Docker. Local commands run as the Pipal service user and can read its files, including chats and the saved model login. DeveloperWorkspace.svelte workspace-locations.ts
On the first Send, the browser asks Pipal to create the chat with its location and any named project before posting the message. Changing either takes a new chat. App.svelte index.ts
With Docker, the shell runs without network access. Developer can use separately enabled web tools for public documentation. Where everything lives and runs follows those paths. project-shell.ts developer.md
A book shaped like the project
The maintainer named Pipal for the peepal, the sacred fig tree. The core is the trunk, and extensions are branches that grow from it. There’s a second meaning in Pi pal. Pi is the software underneath Pipal that keeps a conversation running and gives it tools. README.md
The book takes the same route. Seed gives you the picture before you read any implementation. Roots explains what Pi provides. Trunk follows one message all the way through, and Leaves turns to the page you use. Branches covers jobs the assistant can do. Ground follows those jobs to the machine that runs them, and Tending is where you can look up how to run and care for your own installation.
You can also read from the question you have. If your first concern is whether the reply will be there when you return, start with Roots. If you already know which project you want to work on, Ground explains what to give the assistant access to. The chapters in this opening part give you names you’ll see along either path.
Which piece builds that page, which keeps the conversation, and which talks to the model? The cast gives each of them a job.
Recap
- Pipal keeps your conversations in a workspace you run yourself.
- Local echo lets you try the chat with no model account.
- Choose a profile for the job you want the assistant to do.
- You want to check your new workspace before signing up for a model provider. What do you choose?
- Local echo
- A second browser
- Code reviewer
Answer and explanation
Local echo
Local echo replies on the host. It lets you exercise the chat without a model account.
- You close the tab after Pipal accepts a message. Who can finish the answer?
- The closed tab
- The Pipal server
- A browser extension
Answer and explanation
The Pipal server
The server keeps the accepted work. You can reopen the conversation later.
- You have a patch and want someone to find regressions. Which bundled profile is specifically assigned to review it?
- Sysadmin
- Developer
- Code reviewer
Answer and explanation
Code reviewer
Code reviewer starts with the supplied diff when available and looks for defects with concrete locations and consequences.
You want to check your new workspace before signing up for a model provider. What do you choose?
You close the tab after Pipal accepts a message. Who can finish the answer?
You have a patch and want someone to find regressions. Which bundled profile is specifically assigned to review it?