# Connect your agent to Yui

Source: https://www.yuigui.com/start
The same page for agents, as markdown: https://www.yuigui.com/md/start

You are an AI agent, and your person wants you in Yui: an iPhone app where you answer with screens (buttons, forms, timers, cards) instead of paragraphs. Set yourself up with the steps for the kind of agent you are. Your person only does the phone part.

## Your person does this on the iPhone (iOS 26)
1. Install Yui from TestFlight: https://www.yuigui.com/start (listed as Yui Gui), then sign in with Apple.
2. Tap Add your first agent (or Add agent), name it, then Get a pairing code. The 6-digit code works once, for 10 minutes.
Ask them for the code when you reach the pair step. Every 123456 below is that code.

## Hermes (the main path)
On the machine that runs Hermes. On a named profile, put `-p <profile>` right after `hermes` in every command.
No Hermes yet: `curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash`
Run this one command. It installs the plugin, pairs with the code, and restarts the gateway:
`hermes plugins install postscarcityai/yui/hermes-plugin/yui --enable && hermes yui pair 123456 && hermes gateway restart`
No gateway service yet: `hermes gateway install` first, or `hermes gateway run` in the foreground.

Check with `hermes yui status`. The app flips to connected on its own; your person taps Say hi.
"invalid_or_expired_code" means the code ran out or was used: ask for a fresh one.

## Claude or ChatGPT in a chat app
You cannot add yourself. Tell your person to add a custom connector with this URL, then tap Allow in Yui when it asks:
https://txuibjxyfpalzvpneqgp.supabase.co/functions/v1/yui-mcp
Claude: Settings > Connectors. ChatGPT: developer mode at chatgpt.com/plugins. Details: https://www.yuigui.com/md/developers/mcp

## Every other way in
### OpenClaw
Install the Yui channel plugin, pair it with the code from the app (`openclaw yui pair`), turn the channel on and restart the gateway. Needs OpenClaw 2026.6.11 or later.
```
git clone https://github.com/postscarcityai/yui && openclaw plugins install ./yui/adapters/openclaw
```
Full steps: https://www.yuigui.com/md/developers/openclaw

### Any agent that answers an HTTP POST
The webhook bridge (Python or Node, no dependencies) runs on your machine. Pair it with the code, then point it at your agent's URL. From `adapters/webhook` in the app repo:
```
python3 python/yui_webhook.py pair 123456 --ref my-agent
```
Full steps: https://www.yuigui.com/md/developers/webhook

### Claude and ChatGPT
Add Yui as a custom connector with this URL (Claude: Settings > Connectors; ChatGPT: developer mode at chatgpt.com/plugins). It signs in through yuigui.com/connect and you tap Allow in the app. Your chat stays where it is; the screens land on your phone.
```
https://txuibjxyfpalzvpneqgp.supabase.co/functions/v1/yui-mcp
```
Full steps: https://www.yuigui.com/md/developers/mcp

### Claude Code or Cursor
Claude Code adds the server, then `claude mcp get yui` and `claude mcp login yui`, and you approve it in Yui. Cursor, or any client that takes a URL and a header, uses a token you get from a pairing code.
```
claude mcp add --transport http yui https://txuibjxyfpalzvpneqgp.supabase.co/functions/v1/yui-mcp
```
Full steps: https://www.yuigui.com/md/developers/mcp

### An A2A agent
Any agent with an Agent Card (ADK, LangGraph, CrewAI, Microsoft Agent Framework) pairs by its URL. The agent needs no Yui code. Node 22.18 or newer, from `adapters/a2a` in the app repo, then `node yui-a2a.ts run`:
```
node yui-a2a.ts pair 123456 --card https://your-agent.example.com
```
Full steps: https://www.yuigui.com/md/developers/a2a

### A model on your own machine
Ollama by default; LM Studio, vLLM and llama.cpp by name, or any OpenAI-style URL. Node 22.18 or newer, from `adapters/openai-compat` in the app repo, then `node yui-openai.ts run`:
```
node yui-openai.ts pair 123456 --model qwen2.5:7b
```
Full steps: https://www.yuigui.com/md/developers/models

## After pairing
Every turn on the Yui channel carries the channel guide, which tells you how to answer with screens: https://www.yuigui.com/md/channel
The screen language itself, Yui Lines: https://www.yuigui.com/md/yl
