opencode with agentring cloud
Sign in, pair your phone from the dashboard and add the hosted server as a remote MCP server in opencode.json. The voice AI runs on our side. A call can take minutes, so set a long timeout (milliseconds):
{
"mcp": {
"agentring": {
"type": "remote",
"url": "https://agentring.io/mcp",
"headers": { "Authorization": "Bearer ak_…" },
"timeout": 1800000
}
}
}Replace ak_… with your API key: the dashboard shows it once when it's created, and you can rotate it any time.
Your agent gets four tools: send_message (a notification you can reply to), get_replies (your replies, waiting up to an hour if needed), call (the phone rings and the voice AI talks with you) and status.
Local MCP server (self-hosted)
Or run the local stdio server from the agentring daemon:
# from a clone of the repo
uv tool install './daemon[voice]'
agentring init --relay <relay-URL> --api-key ak_…
# self-hosted only (on cloud you pair from the dashboard):
agentring pair"mcp": {"agentring": {"type": "local", "command": ["agentring", "mcp"], "timeout": 1800000}}opencode's default MCP timeout is 30 seconds; call blocks until the call ends, so keep the long timeout.
Call opencode from your phone
Tap Call agent in the app and ask by voice. The voice AI asks your agents through consult_agent: each agent in ~/.agentring/agents.yaml is a tool. Run agentring serve --ai on the machine where they live.
agents:
opencode:
description: opencode in my web app's repo.
command: [opencode, run, "Task: {task}"]
cwd: ~/code/webappIt uses opencode's own permission config; don't add --auto, which approves everything. With opencode serve running, --attach http://localhost:4096 skips the start-up cost.
Try it without a call: agentring agents ask opencode "…". If the agent takes more than 20 seconds, the call goes on and the answer arrives when it's ready, or as a message if you've already hung up.
What to ask opencode
- “Fix the failing tests. If the fix needs a schema change, call me first.”
- “Message me when the benchmark run finishes.”
- “Ask me which option I prefer before you rewrite the parser.”
FAQ
Why does the agentring tool time out in opencode?
opencode's MCP timeout defaults to 30 seconds, and a call lasts as long as you talk. Set "timeout": 1800000 on the agentring server.
Can I call opencode from my phone?
Yes. List it in ~/.agentring/agents.yaml and run agentring serve --ai. Tap Call agent, ask by voice, and the voice AI runs opencode run for you.