Open source agent hosting on the AT Protocol
languid docs decisions.md
71 kB · 156 lines
Markdown
at main

Decisions #

Why languid is the way it is, newest first. Add an entry when a choice would otherwise be lost: what was decided, by whom, and why. The design itself is in design.md.

2026-11-20 #

  • Web search is a provider the owner picks, billed like transcription (Cameron). Brave Search first ($5 per 1,000), with Exa and Tavily adapters; a provider shows only when the service has its key. Searches are charged at the provider's price plus 5% under search/<provider> in usage, and outside clients get the same through ai.languid.web.search. Fetch runs on the host (no provider): the address check runs inside the socket's DNS lookup, so a name can't resolve to something else between check and connect, and every redirect is checked again. Private, loopback, link-local, tailnet and Fly 6PN (fc00::/7) addresses are refused.
  • Outside callers search only with providers whose terms allow it, or the owner's own key (Cameron). Each provider adapter has a resale flag, false for Brave, Exa and Tavily (their self-serve terms don't allow passing results on), so ai.languid.web.search answers SearchUnavailable on Languid's keys. Agents, Machines and scripts search in-process through the harness, which isn't an outside party, so they use any provider. Owners can add their own key per provider on Notifications, sealed in state like other secrets; on their key a search costs no credit (usage marks it ownKey), and outside callers acting for them may use it, since the owner is then the provider's customer. The picker shows providers with a hosted key or the owner's own.
  • web_fetch asks for URLs the conversation didn't supply. Search results and the owner's own messages in the thread are fetched right away; anything else asks, because a URL the model writes can carry the owner's data out in its query string. Machine runs can't ask, so they only read what their searches found. Web text comes back wrapped as untrusted.
  • Notifications go to channels the owner attaches, not to Bluesky (Cameron: an agent may have no Bluesky account). Discord DMs through the agent's bot, email through comail, and web push. Channel settings live in the service's state, private to the owner, with the address and push subscriptions sealed. Pushes are empty: the service worker fetches the text with the owner's session, so the push service sees nothing. Each agent may send 10 an hour and 40 a day.
  • Web search and notify are built into every policy unless the policy has its own rule for them, so agents whose owners edited their policy before these existed get them too. A Machine gets them only with Search the web or Notify me ticked.
  • A restart resumes the chat runs it cut off (Cameron asked for a better interaction than the old "Pick up where it left off" button; deploys are frequent). On SIGTERM, interruptRuns notes each running chat run (agent, owner, thread, approval mode, via, computer) in state.pickups; the next boot clears the list and, after a short wait for computers to reconnect (LANGUID_PICKUP_DELAY_MS, 8 s), calls resumeRun for each. The note is only a hint for that one boot, since the approval mode and computer aren't in records; what is unfinished still comes from the records (interruptedCalls). An open chat page asks for the same resume itself, and whichever comes first starts the run. A thread that couldn't be resumed (no credit, a crash with no SIGTERM) shows a quiet Continue.
  • Tasks don't block: task returns an id at once, and the result wakes the starting thread (Cameron, 2026-11-20: "tasks should be non-blocking and send a wakeup when done … The system should ensure this"). The result is a message from the agent (via: "task") in the thread that called task, answered by a run like any message. state.tasks plus the task field on that message make the wakeup survive restarts and happen once (agents.md). Cameron also asked that these be called threads, not helpers: the UI says Task and Open thread.
  • Subagents are helper threads of the same agent, with no new DIDs (Cameron confirmed: "a subagent is just a separate execution thread of the same agent"). task starts a run on a child thread through the ordinary run path, so billing, approvals, run limits and models need nothing new, and the helper has the agent's memory. A helper starts with its main run's approval mode and can't start helpers of its own. There's no cap on how many helpers an agent starts and no time limit on them (Cameron: Languid is about scale and long runs that finish); only the owner's existing concurrent-run limit applies. Helper threads are never thrown away (Cameron: what the agent did is worth keeping, for its own context, history and fine-tuning, and storage is cheap): they're ordinary threads with parent set, left out of lists, and the owner can delete them from settings.
  • Messaging other agents is deferred (Cameron). The direction for later: an agent creates a space, shares it with the other agent, and writes the message there as if it were a user message; paying to run someone else's agent logs a payment, with allowlists. A first version with message_agent, consent records and Inbox requests was built and taken out before shipping.

2026-11-19 #

  • Agents publish static sites as wisp.place records, served on a host of their own (Cameron asked for wisp.place-style sites). A site is one place.wisp.fs record in the agent's public repo, its record key the site's name, with wisp's tree of directories and gzipped file blobs, so wisp.place's own hosts and tools can read it; no languid lexicon to publish. subfs (trees split over several records) isn't written, so a site is capped at 200 files and a 64 KB record; files are gzipped and capped at 1 MB each, like uploadBlob. ai.languid.site.publish uploads and writes in one call and asks the owner once, showing the file list rather than the bytes (a new approval summary on methods, since the request record would otherwise hold every file); delete asks too and list doesn't. The rules are in DEFAULT_POLICY, so agents with a policy of their own don't get them until it's reset or they're added. The service serves https://<LANGUID_SITES_HOST>/<handle or DID>/<site>/ for its own agents only, reading from its own PDS, so the host fetches nothing a URL names. Every response carries a CSP sandbox without allow-same-origin: sites.languid.ai is same-site with languid.ai, so Lax cookies would otherwise go along with a site's requests to the service, and the opaque origin stops that. That also means no storage for sites' scripts, which a small static site can live without. The service's cookies are host-only (no Domain=), so the sites host never sees them either. /_sites/ serves the same on a loopback service only, for development; on the public origin it would let a site act as a signed-in owner. sites is now a reserved handle.
  • The only public records are links between an agent and another DID (Cameron: preferences, settings, memory, chats, tool runs and approvals belong in private spaces). That leaves ai.languid.agent.owner (agent repo) and ai.languid.agent.link (owner repo) public, plus the space-type lexicons, which are schema, not user data. ai.languid.owner.profile moves from the owner's public repo into a new space of their own, at://<owner>/space/ai.languid.space.owner/self (owner is authority and only member), replacing the Nov 18 "it's public, like a profile" entry. Sign-in now also asks for space:ai.languid.space.owner?skey=self&collection=ai.languid.owner.profile&action=read_self&action=create&action=update&manage=create&manage=update, and narrows repo:ai.languid.owner.profile to action=delete, which exists only to delete the old public copy. ai.languid.agent.profile (the agent's name; nothing read it) is no longer written. When the service starts it deletes every agent's agent.profile and moves each owner's profile into their space, deleting the public copy. A sign-in from before the new permission can't write the space, so its public copy is deleted anyway and Home asks again (Cameron approved deleting the 9 existing public records). An agent's app.bsky.actor.profile display name stays public: it's the agent's identity, like its handle. Records an agent writes to its own public repo for other apps (with the owner's approval) are the agent's own choice.

2026-11-18 #

  • Approvals are records: ai.languid.approval.request when a run asks, ai.languid.tool.approval when the owner answers (Cameron approved the design; his own /chat site needs to answer approvals over XRPC). The question used to be a callback in the service's memory, answerable only by the web chat's cookie route or a Discord button, and a restart lost it. Now the service writes a request record before it asks (thread, tool.call strong ref, tool, arguments, intention, computer, the always-allow rule on offer, expiresAt), and the owner's answer is written under the request's own record key, so a request can have one answer, found without a search. Every client answers through one function: the chat's runs/<id>/approve, Discord's buttons, and the new XRPC ai.languid.approval.answer (with ai.languid.approval.list, and agent.run's new approval: "ask" | "allow" | "deny", which wins over approveWrites). The in-memory waiter stays, as the way a live run hears of an answer; the records are what's true. A denial is also a record (approved: false), unlike connectors.md's proposal, so it says who said no and through what; the call still ends with an error result, which is what the agent sees. Requests expire (the 5 minutes runs already had): past expiresAt the call is denied "no answer in time" and a late answer is refused, rather than an old yes running a command nobody is watching. Restart survival is for the tool call's own ask: a call waiting on an open request isn't "interrupted", and the new process gives its thread a run that holds the question (found by the wakeup sweep, the chat page or approval.list), so the chat shows it as before and the answer runs the call and resumes the agent in that same run. A script's asks can't survive, because the script that was waiting is gone; they keep the interrupted path. Scripts can't write either collection (the policy floor refuses ai.languid.*). Both collections join the agent space declaration, which the service republishes itself when it starts.

  • One runner serves every account signed in on the computer (Cameron: "the runner should be account agnostic … serve as a runner for all available accounts on one machine"). Each account signed in with languid login keeps its own runner registration (runner on its saved sign-in), and languid computer run polls with every one of them in one process, each with its own background jobs. Setting up for a second account no longer needs a languid home of its own: sign in, run languid computer setup, and the same runner (and on a Mac the same Languid.app) picks it up. Tokens stay per account, so the service still sends an account's tool calls only to its own registration; there was never a sandbox between accounts, since both ran as the same user. This replaces the per-home runners of Nov 17 below, though a computer join registration still works beside the accounts.

2026-11-17 #

  • send_message, dismiss and discord_channels are offered only where they apply (Cameron: Scout on Inkling 2 Small answered "Hi" by calling send_message, then said it had replied). Every agent used to get them in every thread, and send_message was described as optional in the web chat. Now an agent without a Discord bot gets none of them; in a web or terminal thread of an agent with a bot there's no dismiss, and send_message requires to and says it isn't for answering. Inkling 2 Small also invents a send_message call when none is offered, so the system prompt's note now says the reply text is the answer. Eval case: evals/cases/greeting-plain-reply.json (Inkling 2 Small and DeepSeek V4.1 Flash both pass 5/5).
  • The model pickers lead with "Picked by Languid": DeepSeek V4.1 Flash and Inkling 2 Small, both on Together (Cameron: highlight the models we want people to use, and add Inkling 2 Small and Kimi K3.1 Pro; Kimi K3.1 Pro was dropped the same day as too expensive at $2 in, $10 out per million tokens). LANGUID_HOUSE_MODELS lists them in order (unset: the guest default); guests may always run them on the service's keys. Inkling 2 Small isn't in pi's bundled catalog yet, so EXTRA_MODELS in src/models.ts adds it, merged on top of pi's models.json (the owner's own entries win); drop it once the catalog lists it.
  • The house model moves from OpenRouter to Together AI: together/deepseek-ai/DeepSeek-V4.1-Flash (Cameron: avoid OpenRouter's 5.5% fee on credit purchases, which ate the whole 5% markup; Sail Research was the first pick but couldn't be reached). Together is US-hosted, pi-ai supports it natively (TOGETHER_API_KEY), and tool calls work. Its responses carry no cost, so calls are metered at pi-ai's catalog price ($0.30 in, $1.20 out, $0.006 cached per million tokens) plus 5%. openrouter/deepseek/ stays allowed, so agents already set to it keep working.
  • Languid resells inference: calls on the service's keys cost the provider's price plus 5% (Cameron: managed inference is in, OpenRouter-style, at about 5%; the earlier proposal was 10%). meteredModels (src/owners.ts) charges managedPrice(cost) = cost × 1.05 to spentUsd and keeps the provider cost in providerCostUsd, so /admin shows both. Calls on an owner's own key or subscription pay nothing to Languid. The house fast, cheap model stays DeepSeek V4 Flash through OpenRouter (LANGUID_GUEST_MODEL), not a Modal endpoint or Ollama Cloud: it's already wired and paid per token, OpenRouter reports each call's billed cost so the markup applies to the real figure, and there's no idle GPU or subscription pool to manage. Self-hosting a DeepSeek-sized model on Modal means several H100s or B200s at about $4 to $6 an hour each, which only beats per-token prices at sustained high volume. Ollama Cloud bills a monthly plan with included usage, which is hard to meter and resell per owner. Collecting money (Stripe) isn't built; budgets are still set by hand on /admin.
  • On a Mac, the runner runs under Languid.app, a menu-bar app, so macOS asks for permissions as "Languid", not "node" (Cameron: the prompts named node, which looked untrustworthy). macOS credits a process's file and network access to the app that started it, and the LaunchAgent started node straight from Homebrew. Now languid computer setup builds mac/Languid.swift with swiftc into ~/Applications/Languid.app (bundle id ai.languid.app, the snail from SNAIL as its icon) and one LaunchAgent (ai.languid.app) starts it; the app runs computer run as a child for every Languid home set up on the Mac (configs in ~/Library/Application Support/Languid/runners), so two accounts share one snail and one login item, with a section each in the menu for status, pause and the log, and the runner exits when the app does (its stdin closes). It's ad-hoc signed, so its grants last until the app's own source changes (it's rebuilt only then), not across every languid update. Without swiftc, setup falls back to node under launchd. LANGUID_SIGN_IDENTITY signs it with a Developer ID instead, which is what notarizing it for other people's Macs needs. Swift and AppKit rather than Electron or Tauri: one file, no bundled runtime, and a menu-bar item is all it needs.
  • On the hosted service, everyone but the installation owner runs only DeepSeek on Languid's keys, and can bring an OpenRouter key for the rest (Cameron, before the ATProto meetup: "ask people to add chatgpt or use only deepseek for now, or also add openrouter"). LANGUID_GUEST_MODELS limits the models guests may run on the service's keys (refused at call time and hidden from the model menus); LANGUID_GUEST_MODEL is their new agents' default. An OpenRouter key connects like the Claude key (src/model-keys.ts, sealed, owner scoped) and makes every openrouter model owner-funded. New invites made on /admin start with a $5 budget.
  • Claude connects with the owner's own Anthropic API key, not a Claude subscription sign-in (Cameron asked for a Claude connection beside ChatGPT, through a method Anthropic's terms allow). Anthropic doesn't permit third-party apps to offer claude.ai sign-in or route requests through Free, Pro or Max plan credentials, so the Model connections page takes a Claude Console API key instead. Languid checks it with Anthropic (list one model) before storing it, refuses to store it without LANGUID_SECRET_KEY, keeps it sealed with AES-256-GCM in model-auth/<owner hash>/anthropic.json, and opens it only into that owner's model runtime as an in-memory key. With a key, every anthropic model for that owner runs on it and isn't charged to their Languid budget (like ChatGPT); without one, they use the host's keys as before. See src/anthropic.ts.
  • The docs are a site of Markdown pages the service renders, not a separate docs generator (Cameron picked this from three options: all nine pages served by the app, a lean seven, or a Starlight site at docs.languid.ai). Each page has one reader and one job: Get started (Quick start, Computers, Models and budget) for someone with an invite, Using Languid (Agents and memory, Discord, Commands) for an owner who's set up, Self-host for an operator, and How it works (How it works, Records) for a curious developer. The pages are docs/site/*.md, listed in src/docs.ts. The Self-host page is docs/hosting.md itself, so it isn't kept twice. The service renders them into the existing /docs shell with marked, and fills in its own URL in the commands, so a self-hosted service's docs name that service. A generator would mean a second build and a second host for nine pages, and the docs couldn't use the service's own address. Every page is also served as Markdown (/docs/<page>.md), and /llms.txt lists them, so agents can read the docs too. Links between files are rewritten when the pages are served: other pages go to their /docs path, and repo files go to Tangled.

2026-11-15 #

  • "machine" is "computer" inside languid too, with the old names still read for a while (Cameron: rename the remaining internal uses so the code matches what users see; the CLI, --computer and the web chat already said "computer", which also keeps clear of the separate machine project). ai.languid.machine.node became ai.languid.computer.node, joining computer.permissions. Existing records are moved, not read from both collections: when the service opens an agent it copies each old record to the new collection under the same name, then deletes the old one, so a failure part way loses nothing and the next open finishes it. Reading both would mean every place that touches these records (load, register, attach, remove) checking two collections until someone ran a migration anyway; the records are small, one per computer, and only the service writes them. If the copy fails (a space declaration not yet republished with the new collection, say), the old record stands in until it works. Both collections stay in the space declaration while old records may remain, so languid admin publish-lexicon has to be run on deploy. The XRPC methods ai.languid.machine.{list,invite,attach,remove,register} are now ai.languid.computer.*; the service still answers the old names, and sends the old field names (machine, machines) next to the new ones in what installed pi and CLI copies read (run events, agent.describe, message.record, tool.execute, computer.list), until those have updated. The service has to deploy before new runners and CLIs, which only call the new names. The model's tool argument is computer now. Calls that pass machine still work, since old turns in a thread show it and a model may copy them, and an old pi still sends it. Stored field names changed for new records (tool.call assignedComputer and placement.computers, tool.result and tool.job computer): the lexicons aren't published yet, so this is the cheapest time to rename them. Old records aren't rewritten, which would change their CIDs for no gain; the store reads either name where they're loaded (upgradeToolCall and friends), so the rest of the code sees only the new ones. Old tool.definition records keep executor: "machine", since nothing reads it back. A state file's machine entry reads as computer, and the default system prompt's sentence about computer tools is migrated like the block sentences. Drop the aliases, the second collection in the declaration and the old field reads once nothing old is left: after the next republish, when no old runner or pi has called an old method name for a while.
  • Bare languid runs the whole first-time setup (Cameron). At a terminal it signs in when there's no sign-in or it has expired (the service answers 401), then goes on to the chat as before, which offers to make an agent when there's none. Signing in offers to set up the computer, so install, then languid, is everything. One gap had to close for that: a computer set up before any agent existed (the order this flow goes in) couldn't be used by the agent made next, because access is a machine.node record in each agent's space and new agents don't inherit computers (2026-11-12: "an explicit owner action, not automatic inheritance"). That stays: instead chat notices the agent can't use the computer it's on and asks whether to let it, which is the explicit action, taken where the owner is looking. Without a terminal it prints the languid computer attach command, as it used to print the setup command, which was the wrong advice for a computer already set up.
  • The CLI installs with one line, curl -fsSL https://languid.ai/install | sh (Cameron: "Can we skip the clone and pnpm install too?"). The service serves scripts/install.sh itself, with its own URL filled in, so a self-hosted service's line signs you in to that service. It fetches a tarball of main rather than cloning, so git isn't needed, and runs the pnpm version pinned in package.json through npx, so pnpm isn't either (Node 25 dropped corepack). Not an npm package, for now: the CLI runs its TypeScript directly, Node won't strip types from files under node_modules, and the CLI expects pi inside its own checkout, so a package would need a build step and a publish; the script needs neither. The code goes in ~/.languid/app and is swapped in before its dependencies are installed, because pnpm writes absolute paths into node_modules/.bin; if installing fails, the old copy goes back. A first install from a terminal runs languid login right away, reading from /dev/tty since the script's stdin is the pipe. Running it again updates, and restarts only runners whose command points into that install, so a runner from a developer's own checkout is left alone.

2026-11-14 #

  • languid login needs no arguments (Cameron: "maximal ease"). The service defaults to languid.ai (DEFAULT_SERVICE), so --url is only for other services, and the handle is optional: the browser that opens the link says who. One already signed in to the service (as you are right after signing up) confirms the code as that account without going to the PDS again, since its session cookie already proved who it is and the service still holds that account's OAuth session; the page offers another account too. Otherwise it asks for a handle, then goes to the PDS as before. The code check stays in every path: it's what stops a link someone else started from signing their terminal in as you, and skipping the PDS doesn't weaken it, because the PDS step never guarded against that. The handle form is bound to the browser that opened the link (the flow cookie) and must come from the service's own page, and counts as starting a sign-in for rate limits, since it makes the service resolve a handle.

  • Proposed, not yet decided: move hosted agents to a new beta PDS instead of upgrading the alpha one in place (drafted after Bluesky's Nov 13 post). The Spaces beta starts December 1. That day the reference PDS and Bluesky's own PDSes get Spaces, and a stock PDS's update adds a kem key to every active did:plc account. For alpha PDSes, the post says the migration won't be smooth and asks that the alpha hold no production data. pds.languid.ai is an alpha PDS holding testers' agents. So this revises "Follow the Spaces alpha release by release" (2026-11-12) for the move to beta: that plan assumed every upgrade could be rehearsed in dev and taken in place.

    • What has to move. Everything on pds.languid.ai: each agent's account, the installation owner's and invited owners' accounts, and each agent's space. The space sits under its owner's DID and holds the agent's records. DIDs are on the real plc.directory, so none of them can be made again. The service holds the agents' and the installation owner's passwords and the PDS's PLC rotation key. It doesn't hold invited owners' passwords, because they picked their own when they signed up. All of an agent's state is in the agent's repo in the space (user turns included), which the service can read as the agent.
    • Ask first. Bluesky asked alpha operators to get in touch about migrating. Before choosing, ask them three things. Will there be an alpha-to-beta path, either in place or by importing the alpha's archives? Will space refs change to at:space/…? How does the kem key reach accounts that miss the stock migration? If a supported path exists, rehearse it in dev on a copy of the hosted volume, and prefer it to the plan below.
    • Otherwise, a new PDS beside the old one. Start a new Fly app on the December 1 image with an empty volume. Configure it as pds.languid.ai, but reach it at its fly.dev name while records are copied. The alpha PDS stays up, untouched on its pinned digest, as both the source and the way back.
      • Agents and the installation owner move by the standard account migration. That means creating each account on the new PDS under its existing DID, importing its public repo and blobs, then a PLC operation for the new signing key and the kem key. It uses the passwords and the rotation key the service already holds.
      • Spaces are made again on the new PDS under the same owner DID, with the owner and agent as members. Their records are copied one at a time, keeping collection, rkey and value, with the same per-collection checks migrate-authority runs. If the ref syntax changes, values that mention the old ref are rewritten, as they are there. This turns src/migrate.ts from "new authority, same PDS" into "same authority, new PDS".
      • Invited owners have to take part. A space under their DID can only be made by them, through a sign-in that grants the space: scope. Their account has to exist on the new PDS first. The open question is how it gets there. One way: the owner moves it with a standard migration tool. Another: their accounts were made only for languid, so they could take a new account under the same handle, and their agents move under the new DID the way migrate-authority moves them now. Either way, the service copies their agents' records over from the old PDS on their first sign-in after the move. Their agents can't run until then.
      • Cutover. Stop runs and snapshot the volume. Copy the records and check them. Move the pds and * DNS records and certificates to the new app. Deploy the service's beta code (ref syntax, sign-in scope), then run one turn on each agent. Handles and DIDs don't change, and the DID documents keep https://pds.languid.ai as the PDS.
      • The old app is stopped, not deleted, and keeps its volume and snapshot until every owner has moved.
    • Owners on other PDSes. From December 1, an owner on bsky.social or another updated PDS should be able to sign in. Before inviting one, check the sign-in scope (space:ai.languid.space.agent?…) and lexicon resolution against the beta, and try one such owner. The dev stack moves to the beta image at the same time, so dev and hosted stay pinned to one digest.
    • Not yet known. Whether the beta accepts the alpha's archives. Whether account migration carries space data or membership. What the kem key is for.
  • A client keeps every account it signed in as, and switches between them (Cameron, after a remembered agent from an old sign-in failed with AgentNotFound: "it might be nice to have an account switcher"). state.accounts lists each sign-in (service, token, handle, and the agent it opens); server, login and defaultAgent stay the current account's, so nothing else that reads them changed. languid login adds or renews an account and makes it current, and no longer assumes the current handle, so adding a second account needs no flag. languid account use switches; --as <handle> runs one command as another account by setting LANGUID_SERVER and LANGUID_SERVER_TOKEN, which also reach pi. A remembered agent the service says doesn't exist is forgotten, and chat asks again. Runners are unchanged: one per home, belonging to the account that set it up.

  • Computer names are unique per owner, not per service; each languid home runs its own runner (Cameron, after a second account's languid login on his laptop was refused with MachineNameTaken for "clipper": "I don't think we need this restriction"). Agents already belong to one owner, so a name only has to mean one computer within an owner's agents. The service keys state.runners by an opaque key: the name for the first owner to use it (so existing entries keep theirs), the name plus a hash of the owner's DID for later ones, and each agent's store reaches runners through its owner's names only (RunnerHub.forOwner). On the computer, one home (LANGUID_HOME) holds one sign-in and one registration, so the LaunchAgent and systemd unit are named per home: the default home keeps ai.languid.runner and languid-runner.service, and others get a suffix from their path, so a second account's runner runs beside the first instead of replacing it. Signing in to another account in a home whose runner is someone else's doesn't offer setup, since that would take the runner over; it points to a home of its own. languid login itself now offers to set up the computer when it has no runner for the signed-in account.

  • Each thread has its own queue; an agent's threads run at the same time (Cameron: "agents are designed to be massively concurrent, and we have threads as a concurrency primitive"; after Identity, whose daemon has one execution path with a queue per conversation). This replaces one service-side run per agent (AgentBusy). Each thread's turn has its own pi-agent-core Agent and hooks, over the agent's shared store, whose record edits were already serialized there; the per-agent lock in the service now covers only short writes (thread creation, the wakeup scan), and wakeups hold their thread, not the agent, while the model answers. A message is a record before the call returns, and a turn runs while its thread ends in a user message. So a message sent into a running thread joins that run instead of being refused: the next model request includes it (steering, as Letta's App Server does), and if it arrived during the last one, the run goes round again. For that, each assistant message records contextEnd, the newest message record its context had, and the transcript puts it right after that message; otherwise a late message would sort before the reply that never saw it, and the thread would end in an assistant message with a question unanswered. A run gives up its thread in the same step as it finds nothing left to answer, so a message can't land in between and be stranded. Clients can send a clientMessageId (Identity's admission key; the Discord bot will use the Discord message id): the same key and text again returns the first message, a different text is refused. Each run holds one of the owner's concurrent model streams (modelStreams, 8 by default), refused before the message is written. Not done yet: the queue isn't rebuilt from records after a restart (a thread left pending stays so until its next message), threads waiting on an approval don't park, the web chat still can't send while a run goes, and pi still writes its own turns (ThreadBusy keeps it out of a thread with a run).

  • via is an open label, not a closed list (Cameron: "we should permit any kind of via that the client wants to send, but those are the recommended ones"). cli, pi, web and api stay as the recommended values, the way a lexicon's knownValues works, and any client can name itself (discord for the coming bot). Since the model sees it in the envelope as-is, it has to be a short lowercase token (letters, digits, ., _, -, at most 64 characters). Anything else is refused rather than quietly recorded as api, as an unknown value was before, so a client finds out it's mislabeled. A turn sent without a via is still api. It's still the client's own claim, not proof: who sent a turn is author.

  • Pinning a block is its own operation, block_pin { label, pinned }, and the field is pinned, not inContext (Cameron: "in context" means reading a block, a peek; pinning it into the fixed part of the context, core memory in Letta's terms, is a different, persistent operation). Tried first and withdrawn the same day: generic com.atproto.repo.putRecord on blocks, so an agent would flip the flag by reading the record and writing it back whole. In a live test scout did exactly that and rewrote its 4,698-character notes block to change one boolean. It worked, but every pin risked the value, and the prompt and field said "load into context" for what is really pinning. So reads stay general (getRecord) and writes say what they do: block_pin changes only the flag, and works on read-only blocks since it changes what the agent sees, not what the block says. One endpoint with a boolean rather than pin and unpin tools, to keep the tool list short. The floor on generic writes to ai.languid.* is back to having no exceptions. The context now says <pinned_blocks> and <unpinned_blocks>; old records' inContext and old system prompts' block sentences are rewritten on load.

  • pi can run an agent's turns on a local model; the service still owns context and records (Cameron: "I should be able to use local inference if I'm using pi on my machine"). This revises "Model calls go through the service" (2026-11-10) for one case. Picking a model from pi's own models.json (/model, Ctrl+P, or --languid-local provider/id) makes pi call it directly, for that session only. The context still comes from ai.languid.agent.getContext and every message is still recorded, so the agent's memory and threads are the same as for any other turn. The agent's model in its config record doesn't change, and nothing about the local model is saved, so service-side runs and the web chat keep using the service's model. The guard against silent fallback stays: pi restoring a non-languid model by itself (source: "restore") still switches back to the agent's model; only a choice counts. The status line shows <agent> on <provider/id> while it lasts. The service measures compaction and the memory-pressure warning against the client's window when that's smaller (a client can shrink the window, never grow it), but it still writes summaries with the agent's own model, so a local session needs the service's model available for compaction. Local turns cost the service nothing in inference, and the cost on their records is the provider's (zero for Ollama), so budgets aren't charged for them. The risk is a weak local model writing bad blocks into the agent's shared memory, which the owner accepted by picking it.

  • Auto: a classifier answers approvals the owner would obviously say yes to (Cameron, Nov 19). A third Permissions choice beside Ask first and Allow all (approval: "auto"). Hard rules in code come first (src/auto-approve.ts): money, posting, deleting, sending anything to anyone, pushes and deploys, secrets and credentials, script record writes, sharing, and tools Auto doesn't know always ask, and the model never sees them. The rest go to together/Tev1-4B-experimental, asked two Y/N questions (reversible? covered by the owner's latest message?) with only the tool name, its arguments cut to 2,000 characters and that message, never tool output or other turns; the agent's call_intention is stripped, since it's the agent's claim. Only two clear yeses approve; any other answer, an error or 5 s without one asks as usual. Picked because it is serverless, one letter out, ~0.2 s and $0.042/M input tokens (about $0.008 per 1,000 checks). Each check bills the owner's Languid credit at cost + 5% even for BYOK owners, since it runs on our key; an owner with no credit gets Ask first behaviour. Each verdict is an ops event (kind auto_approval: tool, answers, decision, reason, cost, latency), with no arguments or request text. The Together key is the one voice messages use.

  • The web chat can allow all changes, not only ask (Cameron). A "Permissions" pill in the composer picks the run's approval mode: "Ask first" (the default) or "Allow all", which is languid run --yes for the browser. It's sent with each message rather than saved on the agent, because it's how you're working right now, not a property of the agent: it's remembered per browser and agent, like "Works on", and can't change a run already going, so a waiting question still needs its click. The service accepts only ask or allow and anything else is refused, so a page bug can't silently widen it. There's no "deny" choice: in the chat you're there to deny each call as it's asked.

  • Permission rules: per tool and per bash command, set in the web portal (Cameron, Nov 16: Discord can't hold persistent rules, so configure them on the agent's settings page; default to ask). The computer permissions record grows deny, allowCommands and denyCommands beside alwaysAllow, so old records and pi's tool-level /approvals keep working. Each of bash, edit and write is "ask me first", "always allow" or "never allow" per computer; bash also has command rules matched by whole leading words. Never beats always; nothing matched asks. A command rule allows only when every part of a chain matches and the command has no substitution, redirection, subshell or second line, so an allowed ls can't smuggle $(rm …) or > ~/.bashrc; a deny rule looks through chains, substitutions, wrappers (sudo, env) and paths, but is described as a guard, not a sandbox. Deny rules apply even in "Allow all" runs, and allow rules even in runs with no one to ask. "Always allow" on a question (web and a new Discord button) saves the narrowest rule that covers the call: for bash, the program and subcommand (git status), and only for one plain command; for edit and write, the tool. It no longer offers "always allow all of bash" from a question, since one click on touch shouldn't open every command; that's a deliberate choice on the settings page. Per agent and per computer, no "any computer" rule: a rule for a name covers whatever computer later takes it, so they're deleted with the computer.

  • Always-allow rules are records in the agent's space, one per computer (Cameron: move them out of state files, into a permissions-specific record broken down by computer). ai.languid.computer.permissions, keyed by the computer's name like ai.languid.machine.node, holds alwaysAllow: [tools]. It replaces both pi's per-client rules and the service's own from earlier today: pi and the web chat read and save the same list, the rules move with the agent, and the owner can see them in their space. Why its own record, not a field on the agent's config: machine names get reused, so removing a computer deletes its permissions (a new computer later given the name starts by asking), which is one record delete rather than combing a list; the config is about the agent, not any one computer; and it leaves room for more per-computer settings (a directory a rule is limited to, allow-all on a throwaway VM). Why not on machine.node: that's what the runner reports about itself, refreshed by the service; a computer re-registering, or a compromised one, mustn't widen its own permissions. Only the service writes the record, through methods agent scripts can't reach (scripts only get src/methods.ts, and generic writes to ai.languid.* are refused), and only for tools that ask and computers the agent has. The service tells pi a covered call doesn't need approval when it records the message, and accepts it without pi's yes. Rules in old state files move into records once: pi's when it attaches, the service's when it opens the agent. Named computer, not machine, as the CLI and web are, to keep clear of the machine project; the older machine names inside languid haven't been renamed.

  • Superseded the same day by computer permissions records (above): the web chat saved "always allow" rules on the service, in the same shape as pi's (Cameron). An approval question about a call on a named machine offers "Always allow", which saves approvals[agent][machine] = [tools] in the service's state.json, the field pi uses on a client, through the same helpers (src/approvals.ts). The rule applies wherever the service decides: web runs and languid run without --yes, which matches pi, where a saved rule applies even in print mode with no one to ask. One click also answers the run's other calls waiting on the same tool and machine, since tool calls are checked in parallel and asking twice for what was just allowed would be noise. A call with no machine gets no "Always allow": there'd be nothing to key the rule on. The rules are listed in the Permissions menu with "Ask again". They don't move between the service and clients: pi's rules are per client, these are per service, so a rule saved in one only shows in the other when both share a state file (a local languid serve). Unifying them would mean pi reading rules from the service, which waits on pi asking the service about approvals at all.

2026-11-13 #

  • The chat looks like calm technology (Cameron: sleek and futuristic, but languid). Frosted glass over a warm dark or light page, one accent (green) meaning alive and amber meaning waiting on you, and motion only while the agent works: a slow band of light along the message box and a drifting glow, no spinners or timers. Tried and set aside: a generic Claude-style card, and a version in the site's older bordered, bevelled style.

  • Deploys ship exactly what's pushed to origin/main (Cameron, after a deploy ran local commits that were never pushed, and another, a second later, rolled back a fix that was). The just deploy recipes fetch, then refuse unless the checkout is clean and HEAD is origin/main, so unpushed and stale code can't go live. Each image is labelled with its commit, so fly releases --image shows what's running. The rule for agents is in AGENTS.md.

  • Every tool call states its intention (Cameron, after Identity). Tools take a required call_intention, listed first, and the web chat labels calls with it instead of the raw command. We kept Identity's name and rules: required, at least 3 characters, a missing one refuses the call before approval, and implementations never see it. It's the model's text, so the approval box shows it above the command, never instead of it. Calls recorded before this have no intention and keep the old label (tool and arguments).

  • Strict tool schemas (Cameron, Nov 18, after Inkling left out call_intention). A schema's required is only advice unless the provider constrains decoding to it, so tools go with pi-ai's strict mode wherever the model takes it, and the nulls strict mode writes for optional arguments are dropped before anything sees the call. No minLength on call_intention (OpenAI's strict schemas refuse it): a pattern asks for the same three characters.

  • The landing page leads with what works today; the slow lane is "next" (Cameron). The old page sold slow as the point, then said under Status that it isn't built. It now opens with agents as atproto accounts whose memory lives in the owner's space, shows languid agent create and languid chat, and gives slow its own section as the next thing being built, saying everything runs fast today. Invites are asked for from @cameron.stream on Bluesky, named on the landing page and on the page someone sees when they sign in without one (INVITES_FROM in src/web.ts; a service run by someone else changes it or leaves it unset).

  • The site's text is in sentence case (Cameron: the all-lowercase style was unprofessional). Headings drop their # and nothing is forced to upper or lower case; product names are written as they are (Languid, PDS, AGPL). Commands, handles and domains stay as typed. Error messages written for the CLI still start lowercase there and are capitalized where a page shows them.

  • The site's text is Inter, not monospace (Cameron). Code, DIDs and the ASCII 404 stay monospace. Inter is served from the service itself (src/fonts, its OFL license beside it), not a font CDN, so the pages still load nothing from elsewhere.

  • Owners chat with their agents in the browser, and approve tool calls there (Cameron). /agents/<name> starts service-side runs, which already did everything a chat needs except ask. A run now has three answers for machine calls that change things: deny (languid run without --yes), allow (--yes), or ask, where the run pushes an approval event and waits for the owner's click, denying after 10 minutes. This revises the landing-page entry below: a browser session can now drive agents, including shell on the owner's machines, so the chat has its own routes rather than opening XRPC to cookies. Its calls that change anything need the service's Origin and a JSON content type (a cross-site form can send neither), on top of the SameSite=Lax cookie. The page runs one script, served from the service with script-src 'self', which adds what it receives as text, never HTML. Replies stream by polling (the run keeps the turn's text so far) rather than a held-open connection: it matches languid run, and survives proxies and sleeping laptops.

  • Everything is open source, under the AGPL-3.0 (Cameron). That includes the service and the deployment configuration. What a hosted languid sells is running it (uptime, the PDS, managed inference, the slow lane's pooled compute), not code, so keeping code closed would protect nothing that matters and would undercut the pitch that an agent's state belongs to its owner. The AGPL means anyone who runs a modified languid as a service offers its source to their users. The client side should be permissive so it can be embedded anywhere, but the pi extension imports the CLI's client modules from src/, so a separate license on the extension alone would mean little; it moves to MIT with those modules once they're their own package. The repository lives on Tangled, a git host built on atproto, and development happens there; it starts from a single commit.

  • The design lives in the repo (design.md), replacing a private spec document, so the code and its reasoning are public together.

  • Invite-only sign-up on the service's PDS, and budgets on model calls (Cameron). An invite is a one-time link; the invitee picks a handle and password, and the service makes them an account on its own PDS. Invited owners are kept in the service's state, which replaces the LANGUID_ALLOWED_DIDS environment variable: an allow list in configuration doesn't scale and can't carry anything per owner. Since model calls use the service's credentials, an invite can carry a budget in US dollars, metered from each call's cost as the provider reports it. Models with no price can't be metered, so owners with a budget can't use them.

  • The site wears the first languid.ai's brand, with a new snail (Cameron). Monospace, lowercase, # headings (all three since replaced, see above), dashed rules, green on hover, the boxed sign-in and the ASCII 404 come from the 2024 languid.ai, and so does its informal voice. The snail is a new drawing (one line from tail to head, spiral shell). The pitch: languid does fast and slow, and slow is what makes scale work, since software factories, code and workflows rarely need to be immediate.

2026-11-12 #

  • Blocks can be tied to an account's DID; the harness renders its current handle (Cameron: the owner block had gone stale, still naming cameron.pds.languid.ai after handles moved, because it held a copy written at creation). Which blocks exist and whether one is about someone stays the agent's choice: subject is optional and set through block_create. Keeping handles current is the harness's job, since the agent only learns of a rename if told. Not done, deliberately: loading a person's blocks automatically when they speak, and hiding the owner's blocks from other senders. Only the owner can reach an agent today, so neither is needed yet; the second must be a harness rule, not the agent's, when it is.

  • Every user turn reaches the model in a <message> envelope naming its sender (Cameron: scout refused to show its prompt to "a developer building Languid" and was confused about who was who, because user turns were bare text and nothing tied the person in the thread to the owner). The record keeps facts: author is the authenticated caller (until now it was always the owner, hardwired), and via is the client's own label, which is not proof. The handle and relation (owner or other) are worked out each time the prompt is compiled, so a renamed handle or a moved agent never leaves stale envelopes. A handle is shown only if it resolves back to the DID: anyone can claim any handle in their DID document. The text is escaped so it can't close the envelope or open a forged one. Assistant turns get no envelope, so the model doesn't learn to write them. The explanation of the envelope, and a line saying the owner may see the agent's whole context, sit in a harness-rendered <messages> section rather than in the stored system prompt, because they describe the harness's own format; existing agents get them without a config migration.

  • The unit of agent work is the work item: a pending model turn or tool call, visible in the agent's records, which any worker claims and completes (Cameron: design for asynchronous pending records on the PDS, so work can be carried forward from anywhere, on any clock, by any provider; the hosted service is the convenient default, not the only option). Why: it lets an owner trade latency for cost per item (a node that wakes daily and drains the queue; providers' batch APIs; a compute collective's spare capacity), it makes every primitive a provider seam in the way Modal's are, and it gives the hosted service something to meter that isn't withheld code (docs/economics.md). Prior art: Cameron's Compute collectives post, which asks for this kind of harness, and AWS's Infinity, where an agent is its history and is suspended at every tool call. Not built: pending jobs are in-memory maps in src/hub.ts today. Proposed, not yet decided:

    • Leases are arbitrated by the service, through claim and complete methods that generalize runner.poll / .result, and held in the dispatcher, not the PDS. This keeps the decision that the service is the only writer and that locking belongs in its XRPC methods, and the Spaces alpha has no compare-and-swap for workers to race on anyway. A worker with a stale view can only attempt a claim the service refuses, so lag costs time, never a wrong action.
    • Expired or lost leases redeliver model turns but not tool calls. A turn's output is committed only when it completes, so running it twice is harmless. Tool calls keep the at-most-once rule (2026-11-11) unless a tool is declared replay-safe; to keep it across a service restart, the service writes one claim record, created once and never updated, before handing a tool call out.
    • Interactive chat uses the same records, claimed at once by the service, so there is one system with different schedulers.
  • A work item is not a record of its own: pending is derived from which records exist, and status is never updated (Cameron raised the synchronization problem with a separate work-item record: an item picked up and resolved, but not marked so in time for whatever carries the thread forward). A tool call is pending while no result names it, which is already how interrupted calls are found; a model turn is pending while its thread ends in a user message or a complete set of tool results. Writing the output is the completion, in one write, so the output and its "done" mark cannot disagree. The latency class is set on the call or message at creation. Rejected:

    • a separate work-item record with status and lease: two writes per completion. A crash between them either leaves a finished call looking pending (it is rerun when the lease expires, breaking at-most-once) or marks it done with no result (the thread never advances), and a reader can see one write without the other.
    • status and lease fields on the tool-call record: one record, but still an update that must stay in step with the result record. The cost: "everything pending" is not one collection query. The dispatcher keeps an index derived from records, rebuildable like the search index, and a worker with no service has to compare calls with results itself.
  • Agents look records up by writing scripts against XRPC methods, under a collection-based policy (Cameron: block loading should be a general tool where the agent looks up records; code mode, as Codex and pi do it). block_load became one case of com.atproto.repo.getRecord. Methods are named after lexicons so the model's knowledge of atproto carries over, and the sandbox is pi's own (pi-codemode, already a pi dependency) rather than our own, since its only capability is the injected functions. Alternatives considered:

    • one raw xrpc(method, params) tool: it would run under the agent's session, and com.atproto.server.getServiceAuth is a GET that mints a signed token, so even a read-only raw tool could leak a credential; raw space writes would bypass the store's block checks and the single-writer copy.
    • one tool per endpoint: tool lists grow without bound, and loading tools mid-thread breaks the prompt cache. Attie (attie.ai) uses tool groups plus code mode for the same reason. pi's codemode keeps its description fixed and discovers the rest from inside scripts; so does <xrpc>, which depends only on the policy. Collections are the axis the policy decides on, because one method (getRecord) means different things on ai.languid.memory.block and app.bsky.feed.post. Account, credential and raw space methods sit under a floor no policy lifts, and generic writes to the service's own collections are refused, so the policy record can't grant itself away. Network reads are unauthenticated and go through an address guard, because a service can sit on a private network beside its owner's machines and a DID document can name any URL. The block tools stay as direct tools ("on" mode in pi's terms) because they are the most frequent call and scout runs on DeepSeek Flash; moving them into scripts only waits on measuring how well it writes them.
  • The owner's own DID is the authority of their agents' spaces (Cameron asked for a better way than cameron-spaces-style accounts). It is what the atproto team recommends for personal spaces: the space authority is the user, not an application. createSpace anchors a space on the caller, and the alpha's OAuth space: scope defaults its authority to the granting user. So there are no authority accounts and no handles to name, the owner really owns the space (which retires the rotation-key plan), and what the service can do as the owner is limited to what they granted. Cost: the owner's PDS must run Spaces, the space type's lexicon must be published and resolvable, and the authority is part of a space's identity, so older agents need a copy to move.

  • Sign-in asks for space:ai.languid.space.agent?action=read_self&manage=create&manage=update besides atproto, replacing "scope atproto only" below. That is: create the owner's agent spaces and manage their members, and nothing else; no access to the owner's public repo, other spaces, or (beyond read_self, the narrowest action there is) space data, since the agent writes the records. The service keeps the OAuth session to do this when an agent is created and drops it when the owner's last session signs out. A signed-in owner's repo therefore gets no agent.link record.

  • Sign-in also asks for repo:ai.languid.owner.profile, one collection on the owner's public repo, so Home can ask what they use Languid for (personal, or work and what kind) and keep the answer where the owner holds it. New agents start their owner block from it, so an agent talking to a product manager doesn't explain a sandbox in software-engineering terms (Grace's case). It's public, like a profile; it says only what the owner chose. Agents can't write it: the policy floor refuses generic writes to ai.languid.* and to repos other than the agent's. Owners who signed in before the scope changed sign in again to save it.

  • Signed-in owners create agents through the service, five each by default. Each agent is an account on the PDS and a DID on plc.directory, which is permanent, so there is a cap (LANGUID_MAX_AGENTS_PER_OWNER); the installation owner has none.

  • Follow the Spaces alpha release by release, pinned by digest. The Nov 12 release renamed lexicons across the board and the team expects it to be the last breaking one before a beta targeted for Dec 1, apart from a likely change of space refs to at:space/…. Dev and hosted pin the same image digest and move together with the code that needs it; an upgrade is rehearsed in dev on existing data first, because the PDS's database migrations are one-way. Space refs are built and taken apart only in agentSpaceRef, spaceAuthorityDid and SpaceRepo, so a new ref syntax is a small change.

  • Handles are name.languid.ai (Cameron), not name.pds.languid.ai: they're what people see and share. The PDS stays at pds.languid.ai. A handle is now a hostname beside the PDS and the site, so createAccount refuses reserved names (pds, www, api, …), and *.languid.ai resolves to the PDS wherever no explicit record exists. languid admin rehandle moves existing accounts; DIDs don't change.

  • Owners sign in with their atproto account; scope atproto only (Cameron). The service is the OAuth client and learns only who the owner is. It doesn't act on their repo: agents live on the service's PDS and the service holds their credentials, as before. Bring-your-own PDS would need broader scopes and is left for later.

  • The CLI signs in through the browser, with a code to confirm. The terminal can be on a machine without a browser, so the service runs the OAuth flow and the terminal polls for the result. Without the confirmation code, someone could start a login, send the link to an owner, and receive the owner's session when they signed in. The approval must come from the browser that signed in (cookie) on the service's own origin.

  • A landing page at /, with sign-in from the browser (Cameron). A web login skips the code confirmation: the code guards against a link started in someone else's terminal, and a web login starts and finishes in one browser, bound by the flow cookie. The browser's session is a cookie that opens the service's pages only, never XRPC, so the XRPC methods need no CSRF protection and a page session can't drive agents. Forms check Origin. The sign-in form's CSP allows form-action to any HTTPS origin (and http on a loopback service), because Chrome checks a form's redirect against form-action and this one redirects to the owner's PDS.

  • On a public service, the installation token works only from the host and the tailnet (Cameron). The token acts as the installation owner and can approve tool calls, which means shell on their machines, so from the internet it would be one secret away from all of them. Signing in is the way in from outside. Keeping it on the tailnet means the daily driver, just remote and computer setup keep working unchanged. The check uses the connection's own address (loopback, 100.64.0.0/10, fd7a:115c:a1e0::/48), never a header; a request carrying the configured proxy header is treated as public even if the proxy is on the same host. Services without a public URL (loopback, or a plain-http tailnet or LAN address with no sign-in) keep accepting the token from anywhere, since there would be no other way in.

  • Rate limits are in-memory token buckets, with defaults well above languid's own clients. One service process, so no shared store. Unauthenticated requests are keyed by client address (IPv6 by /64), XRPC by owner DID, runner traffic by runner. Model calls and runs get a tighter bucket and a concurrency cap because they spend the service's model credentials. Wrong tokens count per address, and once that runs out the address is refused everything for a while; requests without a token don't count, so a browser asking for /favicon.ico can't lock someone out. The client address comes from a proxy header only when one is configured (LANGUID_CLIENT_IP_HEADER), since otherwise clients could pick their own.

  • Sign-in is invite-only for now: the installation owner, owners of existing agents, and listed DIDs. (Superseded 2026-11-13 by invite links.)

  • Writes stay behind the service's XRPC methods (Cameron). Conflict handling, locking and rejection belong there, not in Spaces, so the missing compare-and-swap doesn't matter. The locks are in-process today: correct for one service instance, and they need a shared lock before running several.

  • Tools run on the owner's machines by default; state lives in the PDS (Cameron). Runners stay: the first tester needs agents to move between machines. Token streaming isn't a design goal, so runners keep long polling.

  • Project renamed from nimbus to languid (Cameron). The record and XRPC namespace was already ai.languid.*. Env vars are now LANGUID_*, state is ~/.languid, and the CLI, pi package and flags, systemd unit and dev stack are renamed, with no fallbacks to the old names. Deployed resources keep the old name until they are recreated, which is why the hosted service's Fly app is languid-nimbus and its state lives under /data/nimbus.

  • The hosted agent is the daily driver, and it runs tools on the owner's own machines (Cameron: "something cloud-feeling"; agents that can't act on the owner's machine are a product gap). The service stays on Fly; the owner's desktop is a runner and a client, with the hosted service as its default home (~/.languid) and the dev stack in a separate home, so languid anywhere means the real agent.

  • One command to make a computer run tools. languid computer setup mints its own invite with the owner token, registers, and installs a systemd user unit on Linux or a LaunchAgent on macOS. Invite and join remain for computers that shouldn't hold the owner token. A runner whose token was revoked exits with status 3, which neither service manager restarts (the LaunchAgent wrapper maps it to a successful exit). languid computer attach <name> --agent a,b grants existing agents access to an already-registered computer without rotating its token or restarting the runner. This is an explicit owner action, not automatic inheritance by future agents.

  • languid chat works on this machine by default. It opens pi in the current directory with --computer set to this machine when it's registered for the agent, and remembers the last agent, so a bare languid is enough.

2026-11-11 #

  • Compaction in the service, as records. Summaries are ai.languid.conversation.summary records; messages are never deleted, so the full history stays in the space for search and export. The service compacts before a model call, so every client (pi, runs, future UIs) gets it. pi's own compaction is routed to the service rather than disabled, so /compact still works. Mechanics borrowed from pi (token-based cut, rolling summary) and Codex (handoff framing, user's words kept), plus first-person summaries with lookup hints, and a memory-pressure warning before eviction, which suits languid's blocks.

  • Runners dial out (Cameron approved). A runner long-polls the service over HTTPS with its own token instead of listening on the tailnet. Runners listen on nothing, so there's no port to attack on the owner's machines, and the transport works over a tailnet or plain HTTPS alike, which self-hosters will need. Long polling over WebSocket: no new dependency, it works through any HTTP proxy, and the hub stays a queue per machine. The service keeps only a SHA-256 of each runner token. Replaces the inbound runners of "Machines over Tailscale" below; the hosted setup still uses the tailnet as the network.

  • The hosted service stays tailnet-only (Cameron). It was briefly public (languid-nimbus.fly.dev, about 20 minutes) so runners could reach it without a tailnet, then reverted. Public, one bearer token would be the only thing between the internet and shell on every runner (the token can approve tool calls), and the hand-written HTTP server hasn't been hardened. On the tailnet, an attacker needs both tailnet access and the token. Runners still dial out, now over the tailnet. Going public again needs atproto OAuth and rate limits first; a middle step is public runner endpoints with the owner API accepted only from tailnet addresses.

  • Request bodies are size-limited (16 KB for unauthenticated registration, 1 MB for runners, 16 MB for owner calls), refused before buffering, since self-hosters may expose their service.

  • Tool calls run at most once. If a runner restarts or a poll response is lost, the call fails with a message saying it may or may not have run, instead of being resent. A shell command can't be safely replayed.

2026-11-10 #

  • Hosted on Fly, PDS public at pds.languid.ai (Cameron). Agents need to run while their owners' machines are off, and early testers need somewhere to run them with no data retained by a third party. Hosting the PDS ourselves means accepting the risk of exposing the Spaces-alpha PDS, so it's invite-only with crawlers off, and only the PDS is public. The service stays tailnet-only.
  • Real PLC, fresh accounts. Hosted agents use plc.directory with handles under *.pds.languid.ai. Dev-stack DIDs live in a private PLC and can't move, so hosted agents (including scout) are created fresh.
  • Two Fly apps, not one. The PDS runs Bluesky's image nearly unchanged (pds.Dockerfile only fixes volume ownership); the service is a separate app with its own volume. Simpler to update either one.
  • Radius for hosted models (Cameron: "I trust them as an org"). Radius is Earendil's gateway (Earendil makes pi), built into pi-ai as radius. Paid models have zero data retention, and the organization can be locked to such models. Subscription logins stay on the owner's own machines.
  • Model calls go through the service (Cameron: "how I expected it to work"). The agent's model is its config record, and only the service holds model keys. pi streams each call from ai.languid.model.stream instead of calling a provider itself; before this, pi silently fell back to its own model when it lacked the agent's provider key. Also the right shape for selling: customer keys live in their service, not on every laptop.
  • The hosted agent on radius/cheap (Cameron: Haiku is too expensive for a daily driver). cheap is Radius's alias, currently DeepSeek V4.1 Flash. Radius stays the provider while prototyping. Providers with background-only batch tiers are worth evaluating later for scheduled runs.
  • Radius's alpha terms suit the owner's own agents and testing. They aren't a data processing agreement and don't cover special-category personal data, so owners with sensitive documents need a provider key of their own with those terms. Credits are for the organization's own use, so a paid hosted languid needs customers' own keys or a provider whose terms allow resale. Radius blocks API calls (403 terms_acceptance_required) after a terms update until it's accepted.
  • Tailscale OAuth client instead of auth keys (Cameron wanted easy future deploys). One non-expiring secret for every app; nodes are tagged, so no key expiry. The host's node is persistent; runners are ephemeral.
  • Secrets generated locally, never printed. PDS secrets and the service token live in ~/.config/languid/hosted.env (mode 0600, outside the repo). Keys tied to the operator's own accounts (Tailscale, model providers) are added by the operator.
  • Handles come from the PDS (describeServer) rather than a hard-coded .test, so the same code runs on the dev stack and the hosted PDS.
  • Docs live in the repo (docs/), updated alongside the code they describe.

2026-11-09 #

  • pi is the client. The CLI chat was removed; bun run pi <agent> attaches pi through packages/pi-languid. The service is the only reader and writer of agent records.
  • Machines over Tailscale. Runners bind to their tailnet address and accept calls only from the service's node (pinned by StableID) with their token. Joining uses one-time invites, and the runner's address comes from tailscale whois.
  • Cheap default models (Cameron). Default is Claude Haiku 5.5; Cameron uses Grok 4.7 through his xAI subscription.
  • Own dev stack. languid runs its own Spaces-alpha PDS and private PLC (./dev/stack).