Internal endpoints

Not part of the public API. Routes under the /x/ prefix are Egg-internal contracts used by the browser shell and the Egglet runtime. They may change without notice, are not covered by version guarantees, and aren’t intended for third-party consumption. Build against /api/v1/ instead.

Scope & stability

The /x/ namespace exists for one reason: keep the gateway as the single point of external network egress without forcing every Egg-internal call shape into the public contract. These routes do things the public API doesn’t need to do, the same way they’ve always been done. Their shapes evolve with the browser’s internals.

Two safety properties still hold here:

The shapes below reflect the current implementation. Read the source if precision matters.

Cloud relay — /x/cloud-relay

Generic passthrough to Egg’s cloud relay, used by call sites whose paths don’t fit a typed family. The body is {method, path, body?}; the gateway forwards to $CLOUD_URL/$path with device-id and device-secret headers and returns the response JSON.

MethodPathPurpose
POST/x/cloud-relayForward an arbitrary request to the cloud relay. Used for telemetry, embeddings proxy, feedback, and one-off paths.

Agent calls — /x/agent-calls

Inter-device agent-call coordination via the cloud relay. The receiving daemon polls; the sending daemon posts results.

MethodPathPurpose
POST/x/agent-calls/sendSend an agent call to a paired device.
GET/x/agent-calls/pollLong-poll for inbound agent calls.
POST/x/agent-calls/ackAcknowledge a polled command.
POST/x/agent-calls/resultSend a result back for a previously received call.
GET/x/agent-calls/poll-resultsLong-poll for inbound results.

Pairing — /x/pairing

MethodPathPurpose
GET/x/pairing/listList paired devices known to the cloud relay.
POST/x/pairing/inviteCreate an invite.
POST/x/pairing/acceptAccept an invite.
DELETE/x/pairing/{id}Revoke a pairing.

Group chat — /x/group-chat

MethodPathPurpose
POST/x/group-chat/broadcastBroadcast a message to a linked group.
POST/x/group-chat/linkLink to a group.
POST/x/group-chat/unlinkUnlink.

DM — /x/dm

MethodPathPurpose
POST/x/dm/sendSend a direct message via the cloud relay.
GET/x/dm/pollLong-poll for inbound DMs.

Notifications — /x/notifications

MethodPathPurpose
GET/x/notifications/channelsList notification channels.
POST/x/notifications/channelsSave a channel.
DELETE/x/notifications/channels/{id}Delete a channel.
POST/x/notifications/sendSend a notification.
GET/x/notifications/logRecent notification history.

Explorations — /x/explorations

MethodPathPurpose
POST/x/explorations/registerRegister an exploration view with the cloud index.

Streams — /x/streams

WebRTC signaling passthrough for peer-to-peer streams (ICE candidates and SDP offers).

MethodPathPurpose
POST/x/streams/{id}/signalPOST an ICE candidate / offer / answer.
GET/x/streams/{id}/poll/{rid}Long-poll for signaling from a peer.
DELETE/x/streams/{id}Close the stream.

Podcasts — /x/podcasts

MethodPathPurpose
GET/x/podcasts/proxyProxy a podcast-feed read through Egg’s cloud.

YouTube — /x/youtube

MethodPathPurpose
GET/x/youtube/proxyProxy a YouTube data-API read.

Cloud LLM proxies — /x/proxy

Direct cloud-relay proxies for two specific upstream operations that don’t fit the capability-router model.

MethodPathPurpose
POST/x/proxy/gemini-videoVertex AI video analysis.
POST/x/proxy/imagen-generateVertex AI Imagen generation.

Cloud commands — /x/cloud-commands

The gateway polls Egg’s cloud for inbound commands and queues them locally. The browser drains the queue, executes commands, and posts results back.

MethodPathPurpose
GET/x/cloud-commands/pendingDrain queued commands.
POST/x/cloud-commands/resultPost a command result. The gateway forwards it upstream and acks.
POST/x/cloud-commands/fast-modeToggle 5-second fast polling.

Filter lists — /x/filter-lists

MethodPathPurpose
POST/x/filter-lists/refreshForce a refresh of EasyList / EasyPrivacy. The gateway also refreshes on a 24-hour interval when aggressive ad-blocking is enabled.

Raw LLM — /x/llm

Provider-direct LLM routes used by the in-tree egg-llm proxy. These bypass the capability tier gate and are not intended for external callers; use /api/ai/* instead.

MethodPathPurpose
POST/x/llm/chatNon-streaming chat against a specific provider+model.
POST/x/llm/chat-with-toolsSame, with tool-calling.
POST/x/llm/streamingSSE-streamed chat.
GET/x/llm/openrouter-modelsList OpenRouter models. No auth payload in body; reads the OpenRouter key from the gateway’s credential store.

Skills — /x/skills

MethodPathPurpose
POST/x/skills/discoverRead a site’s well-known skill manifest.
POST/x/skills/fetch-sourceClone a skill source tree from git into a gateway-managed temp dir. Returns the path.
POST/x/skills/fetch-tarballDownload a skill release tarball or zip.

Extensions — /x/extensions

MethodPathPurpose
POST/x/extensions/fetch-crxDownload a CRX bundle from the Chrome Web Store. {extension_id, source?}.
MethodPathPurpose
POST/x/search/google-scrapeScraped Google search. Internal because the response shape depends on Egg’s anti-bot handling and isn’t stable.

Images — /x/images

MethodPathPurpose
POST/x/images/cachePrefill the browser image cache for a URL. Returns the cache path.

Storage — /x/storage

MethodPathPurpose
POST/x/storage/gcs/uploadUpload a local file to Egg’s GCS bucket using the gateway’s service-account credentials. {local_path, bucket, object_key, content_type?}.

Egglet — /x/egglet

MethodPathPurpose
POST/x/egglet/fetchEgglet runtime fetch helper. Subject to per-Egglet network policy.

AI assets — /x/ai/assets

Install / list / uninstall surfaces for local AI assets the Settings UI wires up. Egg-internal lifecycle plumbing; day-to-day, callers use the capability endpoints under /api/ai/* and the gateway resolves the asset.

MethodPathPurpose
GET/x/ai/assets/whisperList installed Whisper variants. Whisper can back /api/ai/transcribe or /api/ai/speech-recognize depending on capability configuration.
POST/x/ai/assets/whisperInstall a Whisper variant. {model_key}. SSE download progress.
DELETE/x/ai/assets/whisper/{key}Uninstall.
GET/x/ai/assets/vadList installed VAD assets. Backs /api/ai/vad.
POST/x/ai/assets/vadInstall a VAD model. {variant: "silero"}. SSE download progress.
DELETE/x/ai/assets/vad/{variant}Uninstall.
GET/x/ai/assets/rerankList installed reranker assets. Backs /api/ai/rerank.
POST/x/ai/assets/rerankInstall a reranker. {variant: "ms-marco-minilm-l6-v2"}. SSE download progress (tokenizer + model).
DELETE/x/ai/assets/rerank/{variant}Uninstall.
GET/x/ai/assets/tts/piperList installed Piper voices and binary status. Backs /api/ai/tts when run with backend: "local" or when auto-prefer kicks in.
POST/x/ai/assets/tts/piperInstall the Piper binary for this platform. SSE download progress.
DELETE/x/ai/assets/tts/piperUninstall the binary and all voices.
POST/x/ai/assets/tts/piper/voicesInstall a voice. {voice: "en_US-libritts_r-medium"}. SSE.
DELETE/x/ai/assets/tts/piper/voices/{key}Uninstall one voice.

Agent internals — /x/agent

Renderer-facing read and edit surfaces for the agent’s internal state: background thinking sessions, the curiosity queue, reflections, identity, and personality files. The agent harness itself runs inside the daemon and writes to this state through direct function calls; these HTTP routes exist so the UI can display and let the user hand-edit the same state. Shapes mirror the harness and change with it.

MethodPathPurpose
GET/x/agent/backgroundList background-thinking sessions.
POST/x/agent/background/startStart a new session.
GET/x/agent/background/{id}Read a session’s state.
POST/x/agent/background/{id}/continueContinue a paused session.
GET/x/agent/curiosityThe curiosity queue: questions surfaced by background thinking.
GET/x/agent/reflectionCurrent reflection state.
GET/x/agent/reflectionsList recorded reflections.
GET / PUT/x/agent/identityRead or update the agent’s self-model.
GET / PUT/x/agent/personality/{file}Read or update one personality file.