Sophon connector
Build a Sophon connector that exposes an existing agent runtime in the Sophon iOS app.From its SKILL.md
npx -y skills add serafim-labs/Sophon --skill sophon-connectorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.7 KB, 841 tokens by cl100k_base, as published. Nobody here has run it
Sophon Connector Skill
Use this skill when the user wants to connect an existing agent runtime to Sophon. Do not teach them how to build a general-purpose agent from scratch. Your job is to build the bridge layer between Sophon and the runtime they already have.
Goal
Create a long-running connector process that:
- Authenticates with a Sophon bridge token.
- Opens
wss://api.sophon.at/v1/bridge/ws. - Receives
session.messageupdates. - Sends the message into the user's existing agent runtime.
- Streams text back through
/v1/bridge/sendMessageDelta. - Finalizes through
/v1/bridge/sendMessageEnd. - Mirrors tool calls and approval requests when the runtime supports them.
First questions
Ask only for details that block implementation:
- What runtime are we wrapping? Examples: local HTTP server, stdio CLI, MCP server, Python function, hosted API.
- How do we send it a user message?
- How does it stream output, if at all?
- Does it expose tool calls, logs, or approval events?
- Where should the connector run?
If the repo already contains the runtime, inspect it before asking.
Implementation shape
Prefer TypeScript unless the repo is clearly Python or another language.
Recommended files:
connector/
package.json
src/index.ts
src/sophon.ts
src/runtime.ts
.env.example
Environment:
SOPHON_TOKEN=inst_...:s_live_...
SOPHON_BASE=https://api.sophon.at
Wire requirements
WebSocket
Connect:
wss://api.sophon.at/v1/bridge/ws
Authorization: Bearer $SOPHON_TOKEN
Handle frames:
ready: store installation id for logs.ping: reply withpongwithin 10 seconds.update: process and ack withackafter durable handling.
Only start an agent turn for:
{ "type": "session.message" }
Message lifecycle
For every inbound user message:
POST /v1/bridge/sendMessageto create the assistant bubble.- Stream chunks with
POST /v1/bridge/sendMessageDelta. - Finish with
POST /v1/bridge/sendMessageEnd.
Use stable idempotency keys. Do not use timestamps alone.
Tools
If the runtime emits tools, map them to:
/v1/bridge/createTask/v1/bridge/updateTask/v1/bridge/finishTask
Keep task_id stable for retries.
Approvals
If the runtime needs human approval:
- Create an approval request through the bridge API.
- Pause runtime execution.
- Wait for
approval.resolvedfrom the WebSocket. - Resume or deny the runtime action.
Never auto-approve destructive actions.
UX rules
- Name the connector after the runtime, not after Sophon.
- Store tokens in local config or env, never in source.
- Print a clear connected state.
- Print the Sophon installation id after pairing.
- Recover cleanly on WebSocket reconnect.
Testing checklist
Before calling the connector done:
- Start connector with an invalid token and confirm it fails clearly.
- Start connector with a valid token and confirm
readyarrives. - Send one iOS message and confirm a streamed response.
- Kill and restart connector and confirm it reconnects.
- If tools exist, confirm tool cards render.
- If approvals exist, confirm the runtime pauses until iOS answers.
References
- Connector walkthrough: https://docs.sophon.at/connectors/custom/
- Wire reference: https://docs.sophon.at/protocol/wire/
- Streaming model: https://docs.sophon.at/protocol/streaming/
- Tools and approvals: https://docs.sophon.at/protocol/tools-and-approvals/
- OpenClaw bridge reference: https://docs.sophon.at/connectors/openclaw/
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.