# AI agents

> Let Claude, ChatGPT, Cursor and your own agents send you pushes, ask you questions, and check your monitors.

AI agents work while you're away from the screen. Opush gives them a way to reach you on your phone and watch, and to wait for your answer.

## What an agent can do [#what-an-agent-can-do]

- **Tell you when it's done.** "Tests passed, PR is ready" arrives as a push, so you don't have to keep checking the terminal.
- **Ask for approval and wait.** "Deploy v0.2 to production?" shows up with buttons like **Deploy** and **Wait**. The agent continues with your answer.
- **Check your monitors.** Ask "Is anything down?" and the agent reads your website monitors, heartbeats, and uptime history.
- **Handle alerts.** The agent can list escalating alerts and acknowledge one so it stops calling and texting.
- **Keep customers informed.** With your OK, it can post and update incidents on your public status page.
- **Schedule reminders.** It can send a push later or on a repeating schedule, and cancel it again.

## Two ways to connect [#two-ways-to-connect]

### MCP [#mcp]

Most AI apps support the [Model Context Protocol](https://modelcontextprotocol.io) (MCP). Add Opush once, and the agent gets tools like `notify`, `ask_user`, and `list_monitors`.

```bash
claude mcp add --transport http opush https://opu.sh/mcp
```

The first time, your AI app opens Opush in the browser. You sign in and click **Allow**. No token to copy.

### Plain HTTP [#plain-http]

Any script or agent that can make an HTTP request can use your push URL. There's nothing to install.

```bash
# Tell you something
curl "https://opu.sh/YOUR_KEY/Build%20finished/All%20142%20tests%20passed"

# Ask you something and get a question_id back
curl https://opu.sh/ask \
  -H "Content-Type: application/json" \
  -d '{"device_key":"YOUR_KEY","title":"Run the migration?","options":["Run","Skip"]}'
```

This works well in shell scripts, CI jobs, and agent hooks.

## Which one should I use? [#which-one-should-i-use]

| You want to… | Use |
|---|---|
| Let a chat or coding agent decide when to notify or ask you | MCP |
| Let an agent read monitors, alerts, or status pages | MCP with an account connection |
| Send a fixed push at the end of a script or CI job | Push URL |
| Block a script until you approve something | `POST /ask` |

You can use both at the same time.

<Callout type="warn" title="Keep your push URL private">
Your push URL is enough to send you pushes and questions. Don't paste it into public repos or shared prompts. If it leaks, change it in the app.
</Callout>

## Next steps [#next-steps]

<Cards>
  <Card title="Connect over MCP" href="/docs/agents/mcp" description="OAuth sign-in, tokens, the device URL, and every tool." />
  <Card title="Ask and wait for an answer" href="/docs/agents/ask" description="Questions with buttons or text, long polling, and signed callbacks." />
  <Card title="Send a push" href="/docs/push" description="All the ways to send a push and every parameter." />
  <Card title="API reference" href="/docs/api" description="Endpoints, responses, errors, and limits." />
</Cards>
