Get Moshi
voice

Siri and Shortcuts

Tell an agent what to do, hear its last reply, and check who needs you, by voice, from the Shortcuts app, or hands-free with the iPhone locked.

updated 4 days ago5 min readpage 27 / 59

Moshi adds Siri phrases and Shortcuts actions for the agents running on your hosts. You can send an agent a prompt from a Shortcut, or set up one agent as Siri's agent and talk to it hands-free, with your iPhone locked, over AirPods or in the car.

Everything goes to your host end to end encrypted, the same way replies from Moshi do. Siri and Moshi's servers never see the message or the agent's reply in readable form.

What you need

  • Moshi 4.5.0 or later on iPhone.
  • moshi-hook 0.4.56 or later on the host. Older versions can take Send to Agent but not the hands-free actions.
  • End-to-end encryption turned on for that host.
  • The host saved in Moshi from a pairing (so it has a host id), and Moshi opened once since the agent started, so the agent is in Moshi's list.

Two ways to use it

Send to AgentHands-free
Works with the iPhone lockedNo, asks you to unlockYes
Which agentsAny agent Moshi listsOnly agents you allowed
Reads it back before sendingNoAlways
Hear replies and statusNoYes

Send to Agent is for Shortcuts you run on purpose: a home-screen button, an automation, a Shortcut that builds a prompt from other actions.

Hands-free is for driving, walking, or any time your hands are busy. It only works with agents you turned on for it, because anyone holding your locked iPhone can use it.

Set up hands-free Siri

  1. Open Moshi and find the agent on Home.
  2. Long-press its row and tap Allow Siri while locked.
  3. Read the warning (anyone holding this device can send to and hear this agent through Siri) and tap Allow.

The first agent you allow becomes Siri's agent: the one "my agent" means. To make a different allowed agent Siri's agent, long-press it and tap Make Siri's agent. To turn it off, long-press and tap Stop allowing Siri while locked.

You don't need to rename the agent. Siri calls it by the name Moshi shows: the name you gave it, otherwise the session title or the project. If you do rename it (long-press, Rename…), pick a short, distinct name of two or more syllables, like "Chief" or "Juniper". Siri hears those reliably; one-syllable names like "Max" are easy to mishear.

The setting follows the agent, not the session. It keeps working after /clear, /new, or a restart of the agent in the same pane and folder.

Talk to Siri's agent

Say "Hey Siri", then:

  • "Tell my agent in Moshi". Siri asks "What should I tell your agent?" Say the message. Siri reads it back ("Send to Chief: run the tests and fix the flaky one?"). Say yes to send, no to cancel.
  • "Get my agent's result in Moshi". Siri reads the agent's last reply. Code blocks and tables are summarized ("Plus a code block").
  • "How's my agent in Moshi". Siri says whether it is working, waiting for your approval, has a question, finished, or isn't running.

Also understood: "Ask my agent in Moshi", "Send a message to my agent in Moshi", "What's my agent's result in Moshi", "Check my agent in Moshi".

The message can't be part of the first sentence. "Hey Siri, tell my agent to run the tests" doesn't work: iOS only lets apps take free dictation after Siri asks for it. Say the phrase first, then the message.

Talk to your other agents

You can allow as many agents as you like. To reach one that isn't Siri's agent:

  • "Tell agents in Moshi" (or "Message agents in Moshi"). Siri asks for the message, then which agent. Answer with "agent" and its name, for example "agent Juniper". A bare name is easy for Siri to mishear.
  • "How are my agents in Moshi". Siri tells you which of your allowed agents need you and how many are working.

For an agent you talk to often, make your own Shortcut:

  1. In the Shortcuts app, tap + and add the Moshi action Tell Agent.
  2. Tap Agent and pick the agent.
  3. Name the Shortcut what you want to say, for example "Tell Juniper".

Now "Hey Siri, tell Juniper" goes straight to that agent and only asks for the message. Get Agent's Last Reply and Check Agent work the same way.

Send to Agent in Shortcuts

Send to Agent takes an agent and a prompt, so it fits into any Shortcut: pass it text from another action, run it from a home-screen icon, or start it from an automation. Siri phrases: "Send a prompt with Moshi", "Message my coding agent with Moshi".

It asks for Face ID or your passcode when the iPhone is locked, and it can reach any agent Moshi lists, allowed or not.

What Siri says when something is off

Siri saysWhat to do
"No agent is set up for hands-free Siri."Long-press an agent in Moshi and tap Allow Siri while locked.
"… isn't allowed from Siri hands-free."That agent was turned off, or a Shortcut points at an agent you no longer allow. Allow it again in Moshi.
"… started a new session and hasn't replied yet."The agent was cleared or restarted; Siri followed it to the new session.
"… isn't running right now."The agent's pane is closed. Start it again; allow it again if needed.
"That took too long, so nothing was sent."Siri gives every request 30 seconds. Try again, and answer a little faster.
"Sent to …, but it didn't confirm."The host may have received it. Check the agent before sending again.
"Update moshi-hook on … to read agents from Siri."Update moshi-hook on that host.
"Couldn't reach …"The host is offline or moshi-hook isn't running.

Privacy

  • Hands-free Siri only reaches agents you allowed on this iPhone. A host can't turn it on for you.
  • Siri reads replies aloud, through the iPhone speaker if nothing else is connected. Allow only agents whose replies you're fine hearing in the car with others.
  • Turning off Allow Siri while locked takes effect at once, including for Shortcuts that point at that agent.