# PlungeAI API Overview
Source: https://docs-preview.plungeai.com/getting-started/overview
## Set up PlungeAI via MCP
One server, 20 tools. Needs an ozk_ key from Dashboard → One API → Keys. Works in every major coding agent.
[See all install options →](/developer-tools/mcp/quickstart)
**Run in terminal.** Run this command in your terminal. Set PLUNGE_API_KEY first; the header is stored in your Claude Code config.
```bash
claude mcp add --transport http plungeai https://mcp.plungeai.com/v1 --header "Authorization: Bearer $PLUNGE_API_KEY"
```
**Verify installation:** Run /mcp to see plungeai, then ask: use plungeai_whoami to confirm my identity
[Learn more](/integrations/claude-code)
**Run in terminal.** Run this command in your terminal. Codex reads the key from PLUNGEAI_API_KEY at run time: export PLUNGEAI_API_KEY=$PLUNGE_API_KEY.
```bash
codex mcp add plungeai --url https://mcp.plungeai.com/v1 --bearer-token-env-var PLUNGEAI_API_KEY
```
**Verify installation:** /mcp lists plungeai
[Learn more](/integrations/codex)
**One-click install.** Add PlungeAI to Cursor: [Add to Cursor →](https://mcp.plungeai.com/install/cursor)
Then add the Authorization header in ~/.cursor/mcp.json (user-level file, never a repo file).
**Verify installation:** In agent chat: use plungeai_whoami to confirm my identity
[Learn more](/integrations/cursor)
**One-click install.** Add PlungeAI to VS Code: [Add to VS Code →](https://mcp.plungeai.com/install/vscode)
Or from a terminal:
```bash
code --add-mcp "{\"name\":\"plungeai\",\"type\":\"http\",\"url\":\"https://mcp.plungeai.com/v1\",\"headers\":{\"Authorization\":\"Bearer $PLUNGE_API_KEY\"}}"
```
**Verify installation:** In Copilot agent chat: plungeai_whoami
[Learn more](/integrations/vscode)
These docs use PLUNGE_API_KEY; the PlungeAI skills, the Claude Code plugin and the install page use PLUNGEAI_API_KEY; any name works if your config and shell agree.
## Onboard your agent
Connect PlungeAI by pasting this prompt to your agent.
```text
Use curl to read https://docs.plungeai.com/agents.md and perform the setup to connect PlungeAI
```
The file it reads, [/agents.md](/agents.md), asks you for a key, connects your client to the MCP server, verifies the connection with `plungeai_whoami` and lists the rules the agent follows.
## Build with PlungeAI APIs
Pick a product and open its quickstart. Not sure which API to use? Try the [API chooser](/getting-started/choose-an-api).
[Create an API key](https://dashboard.plungeai.com/one-api?tab=keys)
OpenAI-compatible chat with fallback and presets. Key: `sk-ocean-`.
A typed tool call behind a trust fence. Key: `ozk_`.
One prompt, sync, async or streamed. Key: `ozk_`.
Multi-agent CNL pipelines, inline or saved. Key: `ozk_`.
An agent loop inside allowed tools and iterations. Key: `ozk_`.
Cron agents, heartbeats and notifications. Key: `ozk_`.
Find agents, tools and models before you call. Key: `ozk_`.
# Choose an API
Source: https://docs-preview.plungeai.com/getting-started/choose-an-api
## What are you building?
Find your job in the first column, answer its question, and start with the API the answer names.
| Job | Question | Answer → start with |
|---|---|---|
| **Call a model from my code**: chat or embeddings in my app | Do you need one fixed model, or automatic fallback? | One model → [Chat completions](#start-with-chat-completions) · Fallback, cheapest or fastest → [Model routing](#start-with-model-routing) |
| **Run one capability**: search, scrape, send, look up | Do you already know which tool? | Yes → [Tools](#start-with-tools) · No → [Discovery](#start-with-discovery) |
| **Get an answer from an agent**: one prompt in, an answer out | Do you need the answer now, or can it arrive later? | Now (or streamed) → [Agents (sync)](#start-with-agents-sync) · Later → [Agents (async)](#start-with-agents-async) |
| **Chain several agents**: a pipeline with fixed steps, or an open goal | Should an agent choose the steps itself, within limits? | No, fixed steps → [Workflows](#start-with-workflows) · Yes → [Missions](#start-with-missions) |
| **Run something on a schedule**: every hour, every day, on a condition | none | [Scheduling](#start-with-scheduling) |
| **Work from my coding agent**: Claude Code, Cursor, Codex, VS Code | none | [the MCP server](#start-with-the-mcp-server) |
The interactive chooser is planned (TI-74); until then this table and the results below carry the same data.
### Start with Chat completions
You call one model you already chose through the OpenAI-compatible chat API, so any OpenAI SDK works once you change the base URL.
**How to start:** base URL `https://api.plungeai.com/v1`; key `$PLUNGE_MODEL_KEY` (an `sk-ocean-` key); `model` set to a slug from `GET /v1/models`; `stream: true` if you want SSE chunks. [Setup details →](/models/quickstart) · [Build with Chat completions →](/models/quickstart)
| | |
|---|---|
| What you send | `POST /v1/chat/completions` with `model`, `messages` and an `sk-ocean-` key |
| What you get back | `chat.completion` (or SSE chunks) with `usage` |
| What your app handles | Retries on 429 `rate_limit_exceeded` and 5xx; model choice |
| How long it takes | One model call; streaming starts at the first token |
| What you pay for | Tokens, billed at provider cost × your org markup ([Pricing](/getting-started/pricing)) |
| What to check | `x-request-id`, `usage`, served `model` ([Models quickstart](/models/quickstart)) |
**Before you build:** an `ozk_` key is rejected on the models plane with `invalid_api_key`; use an `sk-ocean-` key.
### Start with Model routing
The gateway tries your candidates in order, or sorts them by price, latency or throughput, so one failing provider does not fail the request.
**How to start:** the Chat completions setup plus `models: ["", ""]` and `sort` set to `price`, `latency` or `throughput`, or `model: "@preset/"` for a saved preset; the Python SDK passes these in `extra_body`. [Setup details →](/models/routing) · [Build with Model routing →](/models/routing)
| | |
|---|---|
| What you send | The same request, plus `models[]`, `sort` or `model: "@preset/"` |
| What you get back | The completion from the first candidate that succeeds; `model` names the one that served |
| What your app handles | Reading which model served |
| How long it takes | One call, plus failover attempts |
| What you pay for | Tokens of the model that served |
| What to check | The `model` field, and 502 "All routing candidates failed" |
**Before you build:** read the served `model` field before you log costs; it can differ from your first candidate.
### Start with Tools
You already know the capability, and one tool call gives typed params, one outcome object and the trust fence in a single request.
**How to start:** key `$PLUNGE_API_KEY` (an `ozk_` key); read `GET /v1/tools/{id}` for `operations[]` and `inputSchema`; send `{operation, params}` to `POST /v1/tools/{id}/execute`. [Setup details →](/tools/quickstart) · [Build with Tools →](/tools/quickstart)
| | |
|---|---|
| What you send | `POST /v1/tools/{id}/execute {operation, params}` with an `ozk_` key |
| What you get back | `{ok, content, outcome, execution_id, request_id}` |
| What your app handles | 422 `invalid_params`, 409 `approval_required`, 424 `connection_required` |
| How long it takes | One tool run; `mode: async` over MCP for long ones |
| What you pay for | Counts toward tier POST limits; per-call price TBD by owner (TI-31) |
| What to check | `outcome`, `execution_id`, the trace ([Outcomes](/tools/outcomes)) |
**Before you build:** search first; never hard-code a tool id. Handle 409 `approval_required` and 424 `connection_required` before you ship.
### Start with Discovery
You do not know the right tool or agent yet, and search returns ranked cards you can read before you spend a call.
**How to start:** `GET /v1/discovery/search` with `q` (your need in plain words), `kind` (for example `agents`), `mode` `hybrid` (or `keyword`, `vector`), `fields` `summary` and `limit`; page with `offset`. [Setup details →](/discovery/core-concepts/search-modes) · [Build with Discovery →](/discovery/quickstart)
| | |
|---|---|
| What you send | `GET /v1/discovery/search?q=&kind=` |
| What you get back | `{cards, count, searchMethod, query}` |
| What your app handles | Picking an id, then reading the contract |
| How long it takes | One synchronous GET |
| What you pay for | GETs are not rate-limited; price TBD by owner |
| What to check | `status:active` on the card ([Card status](/discovery/core-concepts/card-status)) |
**Before you build:** call only cards with `status: active`; search filters on `active` by default, so widen `status` only on purpose.
### Start with Agents (sync)
One prompt in and one answer out on the same connection is the shortest path to a registry agent, and `stream: true` shows tokens as they arrive.
**How to start:** key `$PLUNGE_API_KEY`; `POST /v1/agents/llm-agent/execute` with `prompt`, `sync: true` (the default) and `max_tokens`; add `stream: true` for OpenAI chunks. [Setup details →](/agents/quickstart) · [Build with Agents →](/agents/quickstart)
| | |
|---|---|
| What you send | `POST /v1/agents/{id}/execute {prompt, sync: true}` (or `stream: true`) |
| What you get back | `{content, workflow_id, task_id, request_id}` or OpenAI SSE chunks |
| What your app handles | Holding the connection; keepalives |
| How long it takes | One agent run on one connection |
| What you pay for | The model tokens the agent uses, within the tier limit; price TBD by owner (TI-31) |
| What to check | `X-Execution-Id`, `content` ([Agents quickstart](/agents/quickstart)) |
**Before you build:** search first; never hard-code agent ids. `harness-agent` is not callable; loop agents run as a `type: harness` task.
### Start with Agents (async)
The answer can arrive later, so the call returns at once with a 202 and you collect the result without holding a connection open.
**How to start:** the Agents (sync) request with `sync: false`; store `workflow_id` and `task_id` from the 202; poll `GET /v1/agents/results/{workflowId}/{taskId}` until it stops answering 404 `not_ready`. [Setup details →](/agents/features/async-results) · [Build with Agents →](/agents/features/async-results)
| | |
|---|---|
| What you send | The same, with `sync: false` |
| What you get back | 202 `{workflow_id, task_id}`, then the results route |
| What your app handles | Polling `GET /v1/agents/results/{workflowId}/{taskId}`; 404 `not_ready` means keep polling |
| How long it takes | Returns immediately; the result lands later |
| What you pay for | As Agents (sync) |
| What to check | 409 `execution_failed`, 422 `empty_completion` ([Async results](/agents/features/async-results)) |
**Before you build:** treat 409 `execution_failed` and 422 `empty_completion` as final answers, not as "not ready".
### Start with Workflows
A fixed multi-step pipeline across several agents belongs in one CNL workflow, where a parallel block costs only its slowest child.
**How to start:** `POST /v1/workflows/execute` with `workflow` (a CNL YAML string), `input` and `format` (`json`, `yaml`, `markdown` or `text`); `POST /v1/workflows/execute-stream` for SSE; `POST /v1/workflows/{id}/execute` for a saved workflow. [Setup details →](/workflows/quickstart) · [Build with Workflows →](/workflows/quickstart)
| | |
|---|---|
| What you send | `POST /v1/workflows/execute {workflow, input, format}` or `execute-stream` |
| What you get back | `{success, status: completed or incomplete, workflow_id, final_task_id, content}` or SSE engine events |
| What your app handles | Parsing SSE events; the `incomplete` status |
| How long it takes | The sum of its sequential tasks; a parallel block costs its slowest child |
| What you pay for | Every model call inside the run; price TBD by owner (TI-31) |
| What to check | `status`, `final_task_id`, the trace ([Results and traces](/workflows/core-concepts/results-and-traces)) |
**Before you build:** search first; never hard-code agent ids. Read `status: incomplete` as a result to inspect, not as a success.
### Start with Missions
An agent chooses its own steps, but only inside the tools you allow and the iteration cap you set.
**How to start:** over MCP, `plungeai_run_mission` with `goal`, `allowed_tools`, `max_iterations` (1 to 50, default 8), `success_criteria` and `mode` (default `async`); over REST, a `type: harness` task in `POST /v1/workflows/execute`. [Setup details →](/missions/bounds) · [Build with Missions →](/missions/quickstart)
| | |
|---|---|
| What you send | `plungeai_run_mission {goal, allowed_tools, max_iterations}` or a `type: harness` task |
| What you get back | An execution id (async by default), then the result |
| What your app handles | Polling status; relaying "AWAITING USER APPROVAL" and calling `plungeai_continue`; a trust-fence "NEEDS APPROVAL" runs only from Studio |
| How long it takes | Minutes; resumable legs of about ten minutes |
| What you pay for | The model calls in each iteration; price TBD by owner (TI-31) |
| What to check | `continuation` in the status output ([Bounds](/missions/bounds)) |
**Before you build:** the mission tool has no REST endpoint yet (TI-24). Relay "AWAITING USER APPROVAL" to the user before `plungeai_continue`.
### Start with Scheduling
Recurring agents, queries, workflows and heartbeats run on a cron schedule with notifications, with no server of your own.
**How to start:** `plungeai_schedule` with `action: create`, `name`, `job_type` (`agent`, `query`, `workflow` or `heartbeat`), `target`, `schedule` (cron), `timezone` and `notify_channel`; then `action: get` and `action: runs`. [Setup details →](/scheduling/quickstart) · [Build with Scheduling →](/scheduling/quickstart)
| | |
|---|---|
| What you send | `plungeai_schedule {action: create, job_type, target, schedule}` |
| What you get back | `job_id`; runs on the cron schedule |
| What your app handles | Verifying with `get` and `runs`; notification channel ids |
| How long it takes | Runs on the schedule |
| What you pay for | Each run, priced like the job type it runs (TI-31) |
| What to check | Run history ([Runs](/scheduling/runs)) |
**Before you build:** MCP only today (TI-24). Verify every job you create with `get` and `runs`.
### Start with the MCP server
Your coding agent gets all 20 `plungeai_*` tools from one server, so you write no client code.
**How to start:** URL `https://mcp.plungeai.com/v1`; header `Authorization: Bearer $PLUNGE_API_KEY` (an `ozk_` key); transport Streamable HTTP; one command or deeplink per client. [Setup details →](/developer-tools/mcp/quickstart#client-installation) · [Build with the MCP server →](/developer-tools/mcp/plungeai-mcp)
| | |
|---|---|
| What you send | One install command or deeplink ([Overview](/getting-started/overview)) |
| What you get back | 20 `plungeai_*` tools, 5 resources, 1 prompt in your client |
| What your app handles | Nothing: the client calls the tools |
| How long it takes | One install step, then the client is ready |
| What you pay for | Whatever the tools run |
| What to check | `plungeai_whoami` ([MCP quickstart](/developer-tools/mcp/quickstart)) |
**Before you build:** keep the key in your user-level client config or shell, never in a repo file; call `plungeai_whoami` to confirm the connection.
## Have your agent choose an API
The `choose-your-plungeai-door` skill teaches your agent the same choice.
Download [choose-your-plungeai-door.zip](https://skills.plungeai.com/choose-your-plungeai-door.zip) and add it as a skill.
Download [choose-your-plungeai-door.zip](https://skills.plungeai.com/choose-your-plungeai-door.zip) and add it with your Codex skill installer.
The skill as a docs page.
Source repository: TBD by owner (TI-12).
## Go straight to a quickstart
- [Call any model](/models/quickstart)
- [Run a tool](/tools/quickstart)
- [Run an agent](/agents/quickstart)
- [Run a workflow](/workflows/quickstart)
- [Run a bounded mission](/missions/quickstart)
- [Schedule a job](/scheduling/quickstart)
- [Discover capabilities](/discovery/quickstart)
Nothing you choose here is saved.
# PlungeAI API Pricing
Source: https://docs-preview.plungeai.com/getting-started/pricing
Planned: not available yet. Tracked as TI-74.
## What this will do
How PlungeAI meters and bills model calls and runs. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# API Rate Limits
Source: https://docs-preview.plungeai.com/getting-started/rate-limits
Every key has a tier, copied onto the key when it is created. The tier sets per-minute and per-day windows on the execution planes and the MCP server; the models plane has one per-key limit for every tier.
| Surface | Counted on | free | pro | enterprise |
|---|---|---|---|---|
| Execution planes on `https://api.plungeai.com` (tools, agents, workflows, discovery, traces) | `POST` requests only; catalog `GET`s are not counted; a per-key override is ignored | 30/min · 1,000/day | 100/min · 10,000/day | 300/min · 100,000/day |
| MCP server `https://mcp.plungeai.com/v1` | `tools/call` only; a per-key `rate_limit` override set by PlungeAI is honoured | 30/min · 1,000/day | 100/min · 10,000/day | 300/min · 100,000/day |
| Models plane (`/v1/chat/completions`, `/v1/embeddings`, `/v1/models`) | Every request, per key | 600 req/min | 600 req/min | 600 req/min |
| Failed authentication | Per client IP, any tier | 20/min · 500/day | n/a | n/a |
A key with no tier counts as free. When you hit a limit you get 429 with Retry-After (seconds): `rate_limited` on the execution planes, `rate_limit_exceeded` on the models plane, and JSON-RPC -32000 with `error.data.retryAfter` on MCP. There are no X-RateLimit-* headers; call `plungeai_whoami` to see your live window.
## Pricing
Rate limits are separate from billing: `insufficient_quota`, `spend_cap_exceeded` and `insufficient_balance` come from billing caps, not from these windows. See [Pricing](/getting-started/pricing).
## Need higher limits?
Contact PlungeAI support and quote your `x-request-id`. Support contact: TBD by owner (TI-62).
# Your first calls
Source: https://docs-preview.plungeai.com/getting-started/quickstart
Four steps from no account to a working agent call, model call and MCP connection. Every command reads its key from an environment variable; no example contains a key.
## 1. Get a key
Sign in at https://dashboard.plungeai.com and open **Dashboard → One API → Keys**. Name the key and pick an expiry: never, or 7, 30, 90, 180 or 365 days.
The key starts with `ozk_` and is shown exactly once. Create an `sk-ocean-` key on the same page for step 3.
```bash
export PLUNGE_API_KEY=ozk_... # execution planes and MCP
export PLUNGE_MODEL_KEY=sk-ocean-... # models plane
```
Which key opens which route is on [Authentication & keys](/getting-started/authentication#the-three-prefixes).
## 2. Call an agent
One prompt to the registry agent `llm-agent`, answered on the same connection:
```python Python
import os, requests
r = requests.post(
"https://api.plungeai.com/v1/agents/llm-agent/execute",
headers={"Authorization": f"Bearer {os.environ['PLUNGE_API_KEY']}"},
json={"prompt": "In one sentence: what is a content delivery network?", "sync": True, "max_tokens": 60},
)
print(r.json()["content"])
```
```typescript TypeScript
const r = await fetch('https://api.plungeai.com/v1/agents/llm-agent/execute', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.PLUNGE_API_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ prompt: 'In one sentence: what is a content delivery network?', sync: true, max_tokens: 60 }),
})
console.log((await r.json()).content)
```
```java Java
var client = java.net.http.HttpClient.newHttpClient();
var request = java.net.http.HttpRequest.newBuilder(java.net.URI.create("https://api.plungeai.com/v1/agents/llm-agent/execute"))
.header("Authorization", "Bearer " + System.getenv("PLUNGE_API_KEY"))
.header("Content-Type", "application/json")
.POST(java.net.http.HttpRequest.BodyPublishers.ofString("{\"prompt\":\"In one sentence: what is a content delivery network?\",\"sync\":true,\"max_tokens\":60}"))
.build();
System.out.println(client.send(request, java.net.http.HttpResponse.BodyHandlers.ofString()).body());
```
```bash cURL
curl -s -X POST https://api.plungeai.com/v1/agents/llm-agent/execute \
-H "Authorization: Bearer $PLUNGE_API_KEY" -H 'Content-Type: application/json' \
-d '{"prompt":"In one sentence: what is a content delivery network?","sync":true,"max_tokens":60}'
```
The answer is in `content`. Add `"stream": true` to get OpenAI-shaped chunks that end with `data: [DONE]`.
## 3. Call a model
The models plane is OpenAI-compatible: point the OpenAI SDK at `https://api.plungeai.com/v1` and pass a `provider/model` slug from `GET /v1/models`.
```python Python
import os
from openai import OpenAI
client = OpenAI(api_key=os.environ["PLUNGE_MODEL_KEY"], base_url="https://api.plungeai.com/v1")
resp = client.chat.completions.create(
model="anthropic/claude-sonnet-4-6",
messages=[{"role": "user", "content": "Reply with exactly the word: pong"}],
max_tokens=16,
)
print(resp.choices[0].message.content)
```
```typescript TypeScript
import OpenAI from 'openai'
const client = new OpenAI({ apiKey: process.env.PLUNGE_MODEL_KEY, baseURL: 'https://api.plungeai.com/v1' })
const resp = await client.chat.completions.create({
model: 'anthropic/claude-sonnet-4-6',
messages: [{ role: 'user', content: 'Reply with exactly the word: pong' }],
max_tokens: 16,
})
console.log(resp.choices[0].message.content)
```
```java Java
var client = java.net.http.HttpClient.newHttpClient();
var request = java.net.http.HttpRequest.newBuilder(java.net.URI.create("https://api.plungeai.com/v1/chat/completions"))
.header("Authorization", "Bearer " + System.getenv("PLUNGE_MODEL_KEY"))
.header("Content-Type", "application/json")
.POST(java.net.http.HttpRequest.BodyPublishers.ofString("{\"model\":\"anthropic/claude-sonnet-4-6\",\"messages\":[{\"role\":\"user\",\"content\":\"Reply with exactly the word: pong\"}],\"max_tokens\":16}"))
.build();
System.out.println(client.send(request, java.net.http.HttpResponse.BodyHandlers.ofString()).body());
```
```bash cURL
curl -s https://api.plungeai.com/v1/chat/completions \
-H "Authorization: Bearer $PLUNGE_MODEL_KEY" -H 'Content-Type: application/json' \
-d '{"model":"anthropic/claude-sonnet-4-6","messages":[{"role":"user","content":"Reply with exactly the word: pong"}],"max_tokens":16}'
```
The `model` field of the response names the model that served the request; after a failover it can differ from the one you asked for. These models-plane examples are verified against code, not live.
## 4. Connect your coding agent
One command connects Claude Code to the MCP server and its 20 `plungeai_*` tools:
```bash
claude mcp add --transport http plungeai https://mcp.plungeai.com/v1 \
--header "Authorization: Bearer $PLUNGE_API_KEY" --scope user
```
`--scope user` keeps the entry in `~/.claude.json`, outside your repository; never use `--scope project` with a literal key. Run `/mcp` in a session to see `plungeai`, then ask: use plungeai_whoami to confirm my identity. Every other client is on the [MCP quickstart](/developer-tools/mcp/quickstart#client-installation).
## Request ids and traces
Every response carries a server-minted `x-request-id`; quote it when you report a problem. To group several calls into one trace, send your own UUID in `x-trace-id` and read the trace with `GET /v1/traces/{id}`:
```bash
curl -s "https://api.plungeai.com/v1/traces/$(uuidgen)" -H "Authorization: Bearer $PLUNGE_API_KEY"
```
A trace id you already used on an execution returns `409 duplicate_execution_id`: send a fresh UUID each time.
## Next steps
The seven planes and how a request flows.
Match your job to a plane.
Every field of the agent call.
# Authentication & keys
Source: https://docs-preview.plungeai.com/getting-started/authentication
Every route except `GET /health` and `GET /v1/openapi.json` needs a key. Each of the three prefixes opens a different set of routes, and sending the wrong prefix is a `401`, never a silent fallback.
These docs use PLUNGE_API_KEY; the PlungeAI skills, the Claude Code plugin and the install page use PLUNGEAI_API_KEY; any name works if your config and shell agree.
## The three prefixes
| Prefix | Opens | Variable in these docs |
|---|---|---|
| `ozk_` | The six execution planes (tools, agents, workflows, MCP, discovery, traces) and the MCP server `https://mcp.plungeai.com/v1` | `$PLUNGE_API_KEY` |
| `sk-ocean-` | The models plane only: `/v1/chat/completions`, `/v1/embeddings`, `/v1/models` | `$PLUNGE_MODEL_KEY` |
| `sk-conn-` | The connector proxy on `gateway.plungeai.com` | `$PLUNGE_CONNECTOR_KEY` |
## Which routes accept which key
The execution planes (`/v1/discovery`, `/v1/tools`, `/v1/agents`, `/v1/workflows`, `/v1/mcp`, `/v1/traces`) accept only a bearer that starts with `ozk_`. The models plane accepts only `sk-ocean-`. Both mistakes answer `401`:
```bash
# ozk_ key on the models plane → 401
curl -s -o /dev/null -w '%{http_code}\n' -X POST https://api.plungeai.com/v1/chat/completions \
-H "Authorization: Bearer $PLUNGE_API_KEY" -H 'Content-Type: application/json' \
-d '{"model":"anthropic/claude-haiku-4-5","messages":[{"role":"user","content":"hi"}],"max_tokens":1}'
```
The `401` body is the standard error envelope, and `X-Error-Code: unauthorized` carries the same code as a header.
## Header forms
| Header | Accepted on |
|---|---|
| `Authorization: Bearer ` | Every plane and the MCP server |
| `X-API-Key: ` | The execution planes and the MCP server (`ozk_` keys) |
```bash Authorization
curl -s "https://api.plungeai.com/v1/tools?limit=1" -H "Authorization: Bearer $PLUNGE_API_KEY"
```
```bash X-API-Key
curl -s "https://api.plungeai.com/v1/tools?limit=1" -H "X-API-Key: $PLUNGE_API_KEY"
```
## How to obtain each key
All three are self-service at **Dashboard → One API → Keys** (https://dashboard.plungeai.com/one-api?tab=keys). Name the key, pick an expiry (never, or 7, 30, 90, 180 or 365 days) and copy it: it is shown exactly once and stored hashed. A new key takes your account's tier.
## Expiry, revocation and rotation
- **Expiry** is checked on every request; an expired key answers `401` from that moment.
- **Revoke** a key from the same Keys list. Keys are cached briefly, so a revoked key can keep working for about two minutes before it answers `401`. If a key leaked, revoke it first and allow for that window.
- **Rotate** without downtime: create the new key, update every client, confirm it with `plungeai_whoami`, then revoke the old key.
- A lost key cannot be recovered, because only its hash is stored: create a replacement and revoke the old one.
## Key fences
Key fences are set by PlungeAI on request. Keys you create in the Dashboard carry no fence: every tool, from any address. On `https://mcp.plungeai.com/v1`, a key fenced to some tools does not see the others in `tools/list`, and a call to one answers JSON-RPC `-32602`; a key fenced to some addresses answers `401` from anywhere else.
## Checking yourself: plungeai_whoami
Ask your MCP client to "use plungeai_whoami", or call it directly. It returns the user, the auth type and tier, the key label and the current rate-limit window:
```bash
curl -s https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"plungeai_whoami","arguments":{"user_request":"who am I?"}}}'
```
The fields are on [Who am I](/account-api/identity/whoami).
## CORS
The One API answers browser requests from any origin, and the models plane exposes `x-request-id`. Browser code works, but a key in client-side code is a key anyone can read: call PlungeAI from your server.
## Keeping the key safe
Treat the key like a password: whoever holds it acts as your account. If a key may have leaked, rotate it now.
- Keep the literal key in a user-level client config or an environment variable. A config file inside a repository only references a variable.
- Before the first commit in a repository you configured, both commands must print nothing:
```bash
git grep -n "ozk_"
grep -rn "ozk_" . --exclude-dir=.git --exclude-dir=node_modules
```
- Never put a key in browser code or a client bundle.
# How PlungeAI works
Source: https://docs-preview.plungeai.com/getting-started/concepts
The One API is one HTTPS front door, `https://api.plungeai.com`, with one router behind it. The MCP server, `https://mcp.plungeai.com/v1`, gives coding agents the same capabilities as tools.
## The seven planes
| Plane | What it does | Key routes | Key |
|---|---|---|---|
| Models | OpenAI-compatible chat, embeddings and model catalog, with ordered fallback, `sort`, `@preset/`, guardrails and an opt-in response cache | `POST /v1/chat/completions` · `POST /v1/embeddings` · `GET /v1/models` | `sk-ocean-` |
| Tools | List tool agents, read a tool's invocation contract, execute one operation behind a trust fence | `GET /v1/tools` · `GET /v1/tools/{id}` · `POST /v1/tools/{id}/execute` | `ozk_` |
| Agents | Execute a registry agent from a prompt: sync, async pointer, or OpenAI-shaped SSE | `GET /v1/agents` · `POST /v1/agents/{id}/execute` · `GET /v1/agents/results/{workflowId}/{taskId}` | `ozk_` |
| Workflows | Run a multi-agent CNL workflow, inline or saved, with optional SSE | `POST /v1/workflows/execute` · `POST /v1/workflows/execute-stream` · `POST /v1/workflows/{id}/execute` | `ozk_` |
| MCP | Outbound MCP runs against catalog servers; coding agents connect to the MCP server | `GET /v1/mcp/tools` · `POST /v1/mcp/runs` | `ozk_` |
| Discovery | Search and recommend across the capability registry | `GET /v1/discovery/search` · `POST /v1/discovery/recommend` · `GET /v1/discovery/cards/{type}/{id}` | `ozk_` |
| Traces | Read the persisted execution trace for one trace id | `GET /v1/traces/{id}` | `ozk_` |
The machine-readable route list is `GET /v1/openapi.json`; this site serves the same operations at [/openapi.json](/openapi.json).
## Positioning
Think of the One API as an OpenRouter-compatible models plane plus everything a model router cannot do. The models plane speaks the OpenAI wire format, so an OpenAI or OpenRouter integration moves over with a base-URL swap. The execution planes are the part a router has no answer for: real tools with contracts and a trust fence, registry agents, multi-agent workflows, discovery, MCP, and a persisted trace for every run.
## The MCP endpoint
The MCP server is `https://mcp.plungeai.com/v1`: Streamable HTTP, JSON-RPC over `POST`, 20 `plungeai_*` tools, one prompt and five resources plus three resource templates. The pre-2026-09-20 path `/mcp` on the same host still answers with the same handler as a legacy alias; configure `/v1`. Details: [MCP Reference](/mcp-reference/overview).
## How a request flows
An execution-plane call runs router → CNL engine → agent:
```mermaid
flowchart LR
client[Your code] -->|ozk_ key| router[One API router]
router -->|service binding| engine[CNL engine]
engine --> agent[Registry agent]
agent --> memory[(Result and trace)]
```
1. The router checks the `ozk_` key, mints the `x-request-id`, and adopts your UUID `x-trace-id` or generates a trace id.
2. The CNL engine loads the agent card from the registry and refuses any agent that is not `status:active` before it runs.
3. The agent's result is stored and returned, and the whole run is persisted as trace spans.
Every call gets the same outcome vocabulary (`ok`, `needs_input`, `needs_connection`, `needs_api_key`, `needs_approval`, `unavailable`, `error`) and the same trust fence, whether it comes from a workflow, Ocean Studio or your code.
## Tool families
| Family | MCP tools |
|---|---|
| Discover | `plungeai_list_agents`, `plungeai_get_tool_contract`, `plungeai_templates` (list, get) |
| Run a tool | `plungeai_execute_tool` |
| Run an agent | `plungeai_execute_agent`, `plungeai_run_mission` |
| Workflows | `plungeai_list_workflows`, `plungeai_execute_workflow`, `plungeai_workflow`, `plungeai_build_workflow`, `plungeai_templates` (use) |
| Runs and results | `plungeai_get_result`, `plungeai_get_workflow_status`, `plungeai_executions`, `plungeai_followup`, `plungeai_continue` |
| Chat, memory, skills | `plungeai_chat`, `plungeai_memory`, `plungeai_learn` |
| Scheduling | `plungeai_schedule` |
| Identity | `plungeai_whoami` |
A registry agent is a platform building block in the catalog; "your workflows" are the CNL workflows you saved.
## Live-verified examples
Execution-plane examples on this site come from the One API and MCP guides, whose read-only examples were run against the deployed API and are re-run by the guides' example verifier. Models-plane (`sk-ocean-`) examples are verified against code, not live. Examples that run a model or spend credits say so in the text.
## Where to get help
Service health.
Error codes and what to do.
llms.txt, markdown pages and /agents.md.
Every response carries an `x-request-id`: include it when you report a problem. Support contact: TBD by owner (TI-62).
# Models Plane Quickstart
Source: https://docs-preview.plungeai.com/models/quickstart
Planned: not available yet. Tracked as TI-74.
## What this will do
OpenAI-compatible chat completions with one `sk-ocean-` key and a base-URL swap. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Models Best Practices
Source: https://docs-preview.plungeai.com/models/best-practices
Planned: not available yet. Tracked as TI-74.
## What this will do
Request fields, tools and structured output, and what each provider supports. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Evaluating Models
Source: https://docs-preview.plungeai.com/models/evaluating-models
Planned: not available yet. Tracked as TI-77.
## What this will do
A guide to comparing models and agents on your own gold set: run the same prompts through several models, score the answers, and read cost and latency next to quality. No evaluation guide exists yet.
## Use this today
Send one request across an ordered list of models, sorted by price, latency or throughput.
Every model with its provider cost basis.
# Routing: models, sort, failover
Source: https://docs-preview.plungeai.com/models/routing
Planned: not available yet. Tracked as TI-74.
## What this will do
Ordered fallback with `models[]`, `sort` by price, latency or throughput, and presets. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Migrate to PlungeAI
Source: https://docs-preview.plungeai.com/models/migrate
Planned: not available yet. Tracked as TI-74.
## What this will do
Move from OpenRouter, the OpenAI SDK, LiteLLM or the Vercel AI SDK. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Advanced Models Settings
Source: https://docs-preview.plungeai.com/models/advanced-settings
Planned: not available yet. Tracked as TI-74.
## What this will do
Guardrails, the opt-in response cache and BYOK-or-billed routing. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Upgrade from guide 2.0 to 3.0
Source: https://docs-preview.plungeai.com/models/migration-guide
Planned: not available yet. Tracked as TI-74.
## What this will do
What changed between the 2.0 and 3.0 developer guides, for every plane. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Embeddings Quickstart
Source: https://docs-preview.plungeai.com/models/embeddings
Planned: not available yet. Tracked as TI-74.
## What this will do
OpenAI-compatible embeddings (`openai/*` models only). This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Models, providers and slugs
Source: https://docs-preview.plungeai.com/models/catalog
Planned: not available yet. Tracked as TI-74.
## What this will do
Read the live catalog with `GET /v1/models` and pick a model id. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Models Billing & Metering
Source: https://docs-preview.plungeai.com/models/billing
Planned: not available yet. Tracked as TI-74.
## What this will do
Account status, price = cost × org markup, reserve-then-settle, spend caps. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Migrate from the legacy SDKs
Source: https://docs-preview.plungeai.com/models/sdk-migration
Planned: not available yet. Tracked as TI-74.
## What this will do
Move from `@ocean-platform/external-sdk` and the Python, Go and Rust SDKs. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Models Streaming
Source: https://docs-preview.plungeai.com/models/streaming
Planned: not available yet. Tracked as TI-74.
## What this will do
SSE chat completions, translated for non-OpenAI providers. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Workflows Quickstart
Source: https://docs-preview.plungeai.com/workflows/quickstart
Planned: not available yet. Tracked as TI-74.
## What this will do
Run multi-agent CNL workflows inline or saved, sync or streamed. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Workflow Best Practices
Source: https://docs-preview.plungeai.com/workflows/best-practices
Planned: not available yet. Tracked as TI-74.
## What this will do
Write CNL that validates, runs, and fails loudly. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# The CNL workflow spec
Source: https://docs-preview.plungeai.com/workflows/core-concepts/cnl
Planned: not available yet. Tracked as TI-74.
## What this will do
Workflow structure, task types and validation rules. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Choosing agents and models
Source: https://docs-preview.plungeai.com/workflows/core-concepts/agents-and-models
Planned: not available yet. Tracked as TI-74.
## What this will do
Agent tiers, model pinning, and how much time parallel fan-out takes. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Workflow Runs Lifecycle
Source: https://docs-preview.plungeai.com/workflows/core-concepts/run-lifecycle
Planned: not available yet. Tracked as TI-74.
## What this will do
Create a run, read its status and result, cancel it. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Results and traces
Source: https://docs-preview.plungeai.com/workflows/core-concepts/results-and-traces
Planned: not available yet. Tracked as TI-74.
## What this will do
What a run returns and how to read its persisted trace. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Follow-ups and continuation
Source: https://docs-preview.plungeai.com/workflows/core-concepts/follow-ups
Planned: not available yet. Tracked as TI-74.
## What this will do
Chain a run with follow-ups and answer paused runs. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Interactive Chat
Source: https://docs-preview.plungeai.com/workflows/examples/chat
Planned: not available yet. Tracked as TI-74.
## What this will do
A multi-turn chat session over MCP. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Deep Research
Source: https://docs-preview.plungeai.com/workflows/examples/deep-research
Planned: not available yet. Tracked as TI-74.
## What this will do
A goal-driven research workflow that answers with sources. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Batch Enrichment
Source: https://docs-preview.plungeai.com/workflows/examples/enrichment
Planned: not available yet. Tracked as TI-74.
## What this will do
Enrich a list of items with a `type: batch` workflow, then run it to completion. This page is not written yet; the source below covers the same material today.
## Use this today
The agent skill that covers the same ground.
# Workflow Webhooks
Source: https://docs-preview.plungeai.com/workflows/webhooks
Planned: not available yet. Tracked as TI-25.
## What this will do
PlungeAI will call a URL you register when a workflow run finishes, so you do not have to hold a stream open or poll. Nothing sends outbound webhooks today.
## Use this today
Follow a run live over SSE.
Start a run without waiting and fetch the result later.
# Parallel and batch tasks
Source: https://docs-preview.plungeai.com/workflows/parallel-tasks
Planned: not available yet. Tracked as TI-74.
## What this will do
Fan out with `type: parallel` and run a per-item pipeline with `type: batch`. This page is not written yet; the source below covers the same material today.
## Use this today
The agent skill reference that covers the same ground.
# Generate a workflow from a goal
Source: https://docs-preview.plungeai.com/workflows/generate
Planned: not available yet. Tracked as TI-74.
## What this will do
`plungeai_build_workflow` turns a goal into CNL YAML. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Workflow streaming events
Source: https://docs-preview.plungeai.com/workflows/streaming-events
Planned: not available yet. Tracked as TI-74.
## What this will do
SSE engine frames from `execute-stream`. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# MCP servers inside workflows
Source: https://docs-preview.plungeai.com/workflows/mcp-tool-calling
Planned: not available yet. Tracked as TI-74.
## What this will do
Give a harness task MCP servers to call. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Saved workflows and versions
Source: https://docs-preview.plungeai.com/workflows/saved-workflows
Planned: not available yet. Tracked as TI-74.
## What this will do
Save, version and run workflows by id. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Agents Quickstart
Source: https://docs-preview.plungeai.com/agents/quickstart
Planned: not available yet. Tracked as TI-74.
## What this will do
Execute a registry agent from a prompt: sync, async or streamed. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Conversations and personas
Source: https://docs-preview.plungeai.com/agents/features/conversations
Planned: not available yet. Tracked as TI-74.
## What this will do
Carry context with `messages[]` (partial: `prompt` stays required and threading depends on the agent), `persona`, and MCP `session_id` for reliable threading. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Output formats
Source: https://docs-preview.plungeai.com/agents/features/output-formats
Planned: not available yet. Tracked as TI-74.
## What this will do
JSON, YAML, Markdown or text via `format` and `Accept`. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Agent streaming
Source: https://docs-preview.plungeai.com/agents/features/streaming
Planned: not available yet. Tracked as TI-74.
## What this will do
OpenAI-shaped chunks with keepalives and `X-Execution-Id`. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Citations
Source: https://docs-preview.plungeai.com/agents/features/citations
Planned: not available yet. Tracked as TI-76.
## What this will do
Agent answers will carry source annotations that tie each claim to the page or document it came from. Agent results have no citation field today.
## Use this today
A multi-step research workflow you can run today.
# Web search tool agents
Source: https://docs-preview.plungeai.com/agents/features/web-search
Planned: not available yet. Tracked as TI-74.
## What this will do
Search the web through registry tool agents. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Outbound MCP runs
Source: https://docs-preview.plungeai.com/agents/features/mcp-tools
Planned: not available yet. Tracked as TI-74.
## What this will do
Connect catalog MCP servers to a run and call their tools. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Async execution and results
Source: https://docs-preview.plungeai.com/agents/features/async-results
Planned: not available yet. Tracked as TI-74.
## What this will do
`sync:false` returns 202; redeem the result later. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Direct requests
Source: https://docs-preview.plungeai.com/agents/examples/direct-requests
Planned: not available yet. Tracked as TI-74.
## What this will do
Ask a question, ask for JSON, send YAML and get Markdown. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Use an agent as a subagent tool
Source: https://docs-preview.plungeai.com/agents/examples/subagent
Planned: not available yet. Tracked as TI-74.
## What this will do
Wrap an agent call as a tool in your own orchestrator. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# OpenAI compatibility (agents plane)
Source: https://docs-preview.plungeai.com/agents/openai-compatibility
Planned: not available yet. Tracked as TI-74.
## What this will do
Which OpenAI request and stream fields the agents plane accepts. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Discovery Quickstart
Source: https://docs-preview.plungeai.com/discovery/quickstart
Planned: not available yet. Tracked as TI-74.
## What this will do
Find agents, tools, models, skills and connectors before you call. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Recommend
Source: https://docs-preview.plungeai.com/discovery/recommend
Planned: not available yet. Tracked as TI-74.
## What this will do
Ask the registry which capability fits a task. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Search modes and fields
Source: https://docs-preview.plungeai.com/discovery/core-concepts/search-modes
Planned: not available yet. Tracked as TI-74.
## What this will do
`mode` hybrid, keyword or vector; `fields` list, summary or full. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# The card object
Source: https://docs-preview.plungeai.com/discovery/core-concepts/cards
Planned: not available yet. Tracked as TI-74.
## What this will do
What a registry card holds and how to read one. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Card status and kinds
Source: https://docs-preview.plungeai.com/discovery/core-concepts/card-status
Planned: not available yet. Tracked as TI-74.
## What this will do
Only `status:active` cards run; kinds you can filter on. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Inspect a tool contract
Source: https://docs-preview.plungeai.com/discovery/features/tool-contract
Planned: not available yet. Tracked as TI-74.
## What this will do
Read operations, required params and examples before executing. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Quality signals
Source: https://docs-preview.plungeai.com/discovery/features/quality
Planned: not available yet. Tracked as TI-74.
## What this will do
Add `include=quality` to search results. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Catalog resources over MCP
Source: https://docs-preview.plungeai.com/discovery/features/resources
Planned: not available yet. Tracked as TI-74.
## What this will do
Dropped: discovery search is synchronous and has no event stream. Replacement: read catalog lists as MCP resources. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Registry kinds
Source: https://docs-preview.plungeai.com/discovery/features/kinds
Planned: not available yet. Tracked as TI-74.
## What this will do
Dropped: there is no long-running discovery run to notify on. Replacement: the kinds you can search. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Pagination
Source: https://docs-preview.plungeai.com/discovery/features/pagination
Planned: not available yet. Tracked as TI-74.
## What this will do
Discovery search and `GET /v1/tools` page with `limit` and `offset` and return `count`; only `GET /v1/agents` returns `has_more` and `next_offset`. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Workflow templates
Source: https://docs-preview.plungeai.com/discovery/features/templates
Planned: not available yet. Tracked as TI-74.
## What this will do
Dropped: a search cannot be cancelled. Replacement: start from a template. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Discovery first
Source: https://docs-preview.plungeai.com/discovery/features/discovery-first
Planned: not available yet. Tracked as TI-74.
## What this will do
Dropped: there is no stateful FindAll-style run to refresh. Replacement: the discovery-first rule. This page is not written yet; the source below covers the same material today.
## Use this today
The agent skill that covers the same ground.
# Scheduling Quickstart
Source: https://docs-preview.plungeai.com/scheduling/quickstart
Planned: not available yet. Tracked as TI-74.
## What this will do
Cron jobs for agents, queries, workflows and heartbeats. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Run now and run history
Source: https://docs-preview.plungeai.com/scheduling/runs
Planned: not available yet. Tracked as TI-74.
## What this will do
Trigger a job now and read its run history. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Webhook triggers
Source: https://docs-preview.plungeai.com/scheduling/webhook-triggers
Planned: not available yet. Tracked as TI-25.
## What this will do
You will be able to start a scheduled job or a workflow by calling a webhook URL on a public PlungeAI host. Inbound triggers are not available on a public host today.
## Use this today
Run a workflow on a cron schedule with the plungeai_schedule MCP tool.
# Heartbeat check
Source: https://docs-preview.plungeai.com/scheduling/examples/heartbeat
Planned: not available yet. Tracked as TI-74.
## What this will do
A heartbeat job that checks a condition and acts on it. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Trigger a workflow or mission
Source: https://docs-preview.plungeai.com/scheduling/examples/trigger-workflow
Planned: not available yet. Tracked as TI-74.
## What this will do
Run a workflow or mission on a schedule and notify a channel. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Scheduling: MCP tool → REST API
Source: https://docs-preview.plungeai.com/scheduling/migration-guide
Planned: not available yet. Tracked as TI-24.
## What this will do
When a REST schedules API exists, this guide will map each `plungeai_schedule` action to its REST route so existing jobs keep running. Scheduling is available only through the MCP tool today.
## Use this today
Create and manage schedules with plungeai_schedule on https://mcp.plungeai.com/v1.
# Tools Quickstart
Source: https://docs-preview.plungeai.com/tools/quickstart
Planned: not available yet. Tracked as TI-74.
## What this will do
List tool agents, read a contract, execute one operation. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Outcomes and remediation
Source: https://docs-preview.plungeai.com/tools/outcomes
Planned: not available yet. Tracked as TI-74.
## What this will do
The seven outcomes, the remediation actions, and their HTTP statuses. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Tool catalog by category
Source: https://docs-preview.plungeai.com/tools/catalog
Planned: not available yet. Tracked as TI-74.
## What this will do
The tool agents available today, by category. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Long runs (async)
Source: https://docs-preview.plungeai.com/tools/async
Planned: not available yet. Tracked as TI-74.
## What this will do
`mode: "async"` for tool calls that take longer than one request. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Missions Quickstart
Source: https://docs-preview.plungeai.com/missions/quickstart
Planned: not available yet. Tracked as TI-74.
## What this will do
Run a bounded agent loop with a goal, allowed tools and an iteration cap. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Mission bounds and the tool fence
Source: https://docs-preview.plungeai.com/missions/bounds
Planned: not available yet. Tracked as TI-74.
## What this will do
What a mission may do and where it stops. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Skills, plugins and capability injection
Source: https://docs-preview.plungeai.com/missions/capability-injection
Planned: not available yet. Tracked as TI-74.
## What this will do
Inject skills, experts, persona, backgrounds, plugins and MCP. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Pre-built agent cards
Source: https://docs-preview.plungeai.com/missions/prebuilt-agents
Planned: not available yet. Tracked as TI-74.
## What this will do
Run a catalog agent card with `mission_ref` or `pack`. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Async missions: the Ten-Minute Relay
Source: https://docs-preview.plungeai.com/missions/async-relay
Planned: not available yet. Tracked as TI-74.
## What this will do
Long missions run in resumable legs; poll for the result. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Connectors and connected accounts
Source: https://docs-preview.plungeai.com/connectors/quickstart
Planned: not available yet. Tracked as TI-74.
## What this will do
OAuth and API-key connectors, and how a connected account reaches a call. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# The connector proxy
Source: https://docs-preview.plungeai.com/connectors/proxy
Planned: not available yet. Tracked as TI-74.
## What this will do
Call a provider's API raw through `gateway.plungeai.com` with an `sk-conn-` key (`$PLUNGE_CONNECTOR_KEY`). This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Traces Quickstart
Source: https://docs-preview.plungeai.com/traces/quickstart
Planned: not available yet. Tracked as TI-74.
## What this will do
Read the spans and gateway log of any run by trace id. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Execution history and cost
Source: https://docs-preview.plungeai.com/traces/history-and-cost
Planned: not available yet. Tracked as TI-74.
## What this will do
List past runs and what they cost. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# The activity log
Source: https://docs-preview.plungeai.com/traces/activity-log
Planned: not available yet. Tracked as TI-74.
## What this will do
Your key's call log on the MCP server. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Developer Tools Overview
Source: https://docs-preview.plungeai.com/developer-tools/quickstart
Planned: not available yet. Tracked as TI-74.
## What this will do
MCP vs One API vs CLI vs Studio: pick your door. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Account API
Source: https://docs-preview.plungeai.com/developer-tools/account-api
Planned: not available yet. Tracked as TI-06.
## What this will do
A key-authenticated Account API will let a script manage keys, the wallet and usage without the Dashboard. How that API authenticates is still open. Today every account action is a Dashboard view; the table below lists where each one lives.
## Available today in the Dashboard
| What it does | Dashboard location |
|---|---|
| Create, list and revoke `ozk_`, `sk-ocean-` and `sk-conn-` keys | **Dashboard → One API → Keys** |
| Wallet balance, top-up, auto-recharge, BYOK provider keys | **Dashboard → One API → Billing** |
| Ledger of top-ups and charges | **Dashboard → Billing → Ledger** |
| Usage by user, workflow, model or channel | **Dashboard → Billing → Usage** |
| Request log of One API calls | **Dashboard → One API → Requests** |
| Model and connector catalog (provider cost basis) | **Dashboard → One API → Catalog** |
| Connected accounts | **Dashboard → Secrets & Connections → Connections** |
| Teams, companies and roles | **Dashboard → Team** and **Dashboard → Workspace** |
| Who am I (identity, tier, rate window) | Key-authenticated today over MCP: [plungeai_whoami](/account-api/identity/whoami) |
## Use this today
Create and revoke keys in the Dashboard.
Where the wallet balance lives today.
# Install PlungeAI Agent Skills
Source: https://docs-preview.plungeai.com/developer-tools/agent-skills
Planned: not available yet. Tracked as TI-74.
## What this will do
31 skills that teach coding agents to use PlungeAI. This page is not written yet; the source below covers the same material today.
## Use this today
All 31 agent skills with their install options.
# Anthropic Tool Calling
Source: https://docs-preview.plungeai.com/developer-tools/anthropic-tool-calling
Planned: not available yet. Tracked as TI-74.
## What this will do
Turn PlungeAI tool contracts into Claude tool definitions. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Claude Code Plugin
Source: https://docs-preview.plungeai.com/developer-tools/claude-code-plugin
Planned: not available yet. Tracked as TI-74.
## What this will do
The `plungeai` plugin: 31 skills plus its own MCP server config. Install it instead of `claude mcp add`, not in addition. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Ocean CLI
Source: https://docs-preview.plungeai.com/developer-tools/cli
Planned: not available yet. Tracked as TI-74.
## What this will do
The `ocean` command: auth, runs, workflows, schedules, registry. This page is not written yet; the source below covers the same material today.
## Use this today
The agent skill that covers the same ground.
# Cursor Plugin
Source: https://docs-preview.plungeai.com/developer-tools/cursor-plugin
Planned: not available yet. Tracked as TI-13.
## What this will do
A Cursor plugin will install the PlungeAI MCP server and skills from the Cursor marketplace in one step. No Cursor plugin exists today; Cursor connects through its MCP config.
## Use this today
Connect Cursor to https://mcp.plungeai.com/v1 with the one-click install.
# LangChain
Source: https://docs-preview.plungeai.com/developer-tools/langchain
Planned: not available yet. Tracked as TI-74.
## What this will do
Use the models plane from LangChain's `ChatOpenAI`. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# PlungeAI MCP Server Quickstart
Source: https://docs-preview.plungeai.com/developer-tools/mcp/quickstart
The PlungeAI MCP server gives any MCP client the 20 `plungeai_*` tools: discover capabilities, run tools, agents, workflows and missions, schedule jobs and read results.
## When to use PlungeAI MCP?
All four surfaces use the same `ozk_` key, the same account and the same data.
| Surface | What it is | Use it when |
|---|---|---|
| MCP server, `https://mcp.plungeai.com/v1` | The 20 `plungeai_*` tools over MCP | An AI client operates PlungeAI live: discover, run, save, schedule, remember, with approvals and continuations |
| One API, `https://api.plungeai.com` | REST routes, OpenAPI at `GET /v1/openapi.json` | You write or generate code that calls PlungeAI |
| Skills, `https://skills.plungeai.com` | 31 instruction packs your AI client loads | Your client should already know PlungeAI's conventions; skills complement a connection |
| Ocean Studio, `https://studio.plungeai.com` | The browser app | A person builds visually, connects accounts and reviews runs |
A docs MCP server that searches and reads these pages from your agent is planned, tracked as TI-35: see [Docs MCP](/developer-tools/mcp/docs-mcp).
## Endpoint
| Item | Value |
|---|---|
| URL | `https://mcp.plungeai.com/v1` |
| Transport | Streamable HTTP, JSON-RPC 2.0 over `POST` |
| Authentication | `Authorization: Bearer $PLUNGE_API_KEY` or `X-API-Key: $PLUNGE_API_KEY` (an `ozk_` key); every request needs it, `tools/list` included |
| Responses | JSON; `tools/call` streams as server-sent events |
Create the key at **Dashboard → One API → Keys** (https://dashboard.plungeai.com/one-api?tab=keys) and export it as `PLUNGE_API_KEY` before you configure a client.
## Quick installation
### Let your agent install it
Paste this prompt into your coding agent; it reads the setup file and connects itself:
```text Onboard from /agents.md
Use curl to read https://docs.plungeai.com/agents.md and perform the setup to connect PlungeAI
```
Or name the server directly:
```text Add the PlungeAI MCP server
Add the MCP server https://mcp.plungeai.com/v1 named plungeai to my user-level client config, with the header Authorization: Bearer and the value of my PLUNGE_API_KEY environment variable, then call plungeai_whoami to confirm the connection.
```
### Client installation
Claude Code, one command:
```bash
claude mcp add --transport http plungeai https://mcp.plungeai.com/v1 \
--header "Authorization: Bearer $PLUNGE_API_KEY" --scope user
```
Codex, which reads the key from `PLUNGEAI_API_KEY`:
```bash
export PLUNGEAI_API_KEY="$PLUNGE_API_KEY"
codex mcp add plungeai --url https://mcp.plungeai.com/v1 --bearer-token-env-var PLUNGEAI_API_KEY
```
A project `.mcp.json` that reads the key from each developer's environment, safe to commit:
```json
{
"mcpServers": {
"plungeai": {
"type": "http",
"url": "https://mcp.plungeai.com/v1",
"headers": { "Authorization": "Bearer ${PLUNGE_API_KEY}" }
}
}
}
```
One-click installs open your client's install dialog with the URL filled in; add the key afterwards in the client's user-level config:
Opens Cursor's MCP install dialog.
Opens VS Code's MCP install dialog.
Adds the server to Replit Agent.
Step-by-step pages per client:
User-level `~/.cursor/mcp.json`.
Copilot agent mode.
Integrations → MCP Servers.
Verify in any client: ask it to use plungeai_whoami to confirm your identity.
These docs use PLUNGE_API_KEY; the PlungeAI skills, the Claude Code plugin and the install page use PLUNGEAI_API_KEY; any name works if your config and shell agree.
# Programmatic use
Source: https://docs-preview.plungeai.com/developer-tools/mcp/programmatic-use
Planned: not available yet. Tracked as TI-74.
## What this will do
Call the MCP server from your own code with raw JSON-RPC, and run outbound MCP servers with `/v1/mcp/runs`. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# PlungeAI MCP
Source: https://docs-preview.plungeai.com/developer-tools/mcp/plungeai-mcp
Planned: not available yet. Tracked as TI-74.
## What this will do
The one server: install per client, configure, troubleshoot. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Workflows and missions over MCP
Source: https://docs-preview.plungeai.com/developer-tools/mcp/workflows-mcp
Planned: not available yet. Tracked as TI-74.
## What this will do
Run workflows and missions from your coding agent, sync or async. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Protocol and transport
Source: https://docs-preview.plungeai.com/developer-tools/mcp/protocol
Planned: not available yet. Tracked as TI-74.
## What this will do
Streamable HTTP, JSON-RPC methods, sessions, SSE progress. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Prompts and resources
Source: https://docs-preview.plungeai.com/developer-tools/mcp/prompts-resources
Planned: not available yet. Tracked as TI-74.
## What this will do
The `/plungeai` prompt and every `plungeai://` resource. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Move MCP clients from /mcp to /v1
Source: https://docs-preview.plungeai.com/developer-tools/mcp/migrate-to-v1
Planned: not available yet. Tracked as TI-74.
## What this will do
`/mcp` is a legacy alias since 2026-09-20; configure `/v1`. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Docs MCP server
Source: https://docs-preview.plungeai.com/developer-tools/mcp/docs-mcp
Planned: not available yet. Tracked as TI-35.
## What this will do
docs.plungeai.com will run its own MCP server so an agent can search these pages and read any of them as markdown. It is a separate server from the PlungeAI MCP server, and it is not running yet.
## Use this today
Read these docs as markdown today: llms.txt, llms-full.txt and a .md twin of every page.
# OAuth Provider
Source: https://docs-preview.plungeai.com/developer-tools/oauth-provider
Planned: not available yet. Tracked as TI-05.
## What this will do
MCP clients that connect only through OAuth will be able to sign in with a PlungeAI account instead of sending a key. Today the MCP server accepts bearer `ozk_` keys only.
## Use this today
Connect any MCP client with an ozk_ key in the Authorization header.
# Ollama Tool Calling
Source: https://docs-preview.plungeai.com/developer-tools/ollama-tool-calling
Planned: not available yet. Tracked as TI-74.
## What this will do
Turn PlungeAI tool contracts into tool definitions for a local Ollama model through its OpenAI-compatible endpoint. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# OpenAI SDK
Source: https://docs-preview.plungeai.com/developer-tools/openai-sdk
Planned: not available yet. Tracked as TI-74.
## What this will do
Point the OpenAI Python or TypeScript SDK at PlungeAI. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# OpenAI Tool Calling
Source: https://docs-preview.plungeai.com/developer-tools/openai-tool-calling
Planned: not available yet. Tracked as TI-74.
## What this will do
Turn tool contracts into OpenAI function definitions and execute the calls. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Generate a client from OpenAPI
Source: https://docs-preview.plungeai.com/developer-tools/openapi-codegen
Planned: not available yet. Tracked as TI-74.
## What this will do
Typed clients from `/v1/openapi.json`. This page is not written yet; the source below covers the same material today.
## Use this today
The agent skill reference that covers the same ground.
# OpenCode Plugin
Source: https://docs-preview.plungeai.com/developer-tools/opencode-plugin
Planned: not available yet. Tracked as TI-74.
## What this will do
Connect OpenCode today with an MCP config; a plugin is planned. This page is not written yet; the source below covers the same material today.
## Use this today
The agent skill that covers the same ground.
# @plungeai/one-api
Source: https://docs-preview.plungeai.com/sdks/typescript
Planned: not available yet. Tracked as TI-08.
## What this will do
`@plungeai/one-api` will be a typed TypeScript client for the execution planes, published on npm. It is not on npm yet. Until then, generate a typed client from the OpenAPI spec.
```bash Today's path
npx openapi-typescript https://api.plungeai.com/v1/openapi.json -o src/plungeai-schema.d.ts
npm install openapi-fetch
```
## Use this today
Generate typed clients from https://api.plungeai.com/v1/openapi.json.
# PlungeAI in Claude Code
Source: https://docs-preview.plungeai.com/integrations/claude-code
Planned: not available yet. Tracked as TI-74.
## What this will do
One `claude mcp add` command, or a project `.mcp.json`. This page is not written yet; the source below covers the same material today.
## Use this today
The agent skill that covers the same ground.
# PlungeAI in Claude.ai and Claude Desktop
Source: https://docs-preview.plungeai.com/integrations/claude-ai
Planned: not available yet. Tracked as TI-74.
## What this will do
Skill upload on claude.ai; mcp-remote bridge on Desktop. This page is not written yet; the source below covers the same material today.
## Use this today
The agent skill that covers the same ground.
# PlungeAI in Codex
Source: https://docs-preview.plungeai.com/integrations/codex
Planned: not available yet. Tracked as TI-74.
## What this will do
`codex mcp add` with a bearer-token env var. This page is not written yet; the source below covers the same material today.
## Use this today
The agent skill that covers the same ground.
# PlungeAI in Cursor
Source: https://docs-preview.plungeai.com/integrations/cursor
Planned: not available yet. Tracked as TI-74.
## What this will do
One-click deeplink or `~/.cursor/mcp.json`. This page is not written yet; the source below covers the same material today.
## Use this today
The agent skill that covers the same ground.
# PlungeAI in VS Code
Source: https://docs-preview.plungeai.com/integrations/vscode
Planned: not available yet. Tracked as TI-74.
## What this will do
One-click install or `code --add-mcp`. This page is not written yet; the source below covers the same material today.
## Use this today
The agent skill that covers the same ground.
# PlungeAI in Gemini CLI
Source: https://docs-preview.plungeai.com/integrations/gemini-cli
Planned: not available yet. Tracked as TI-74.
## What this will do
`~/.gemini/settings.json` with `httpUrl`. This page is not written yet; the source below covers the same material today.
## Use this today
The agent skill that covers the same ground.
# PlungeAI in OpenCode
Source: https://docs-preview.plungeai.com/integrations/opencode
Planned: not available yet. Tracked as TI-74.
## What this will do
`opencode.json` remote MCP entry. This page is not written yet; the source below covers the same material today.
## Use this today
The agent skill that covers the same ground.
# PlungeAI in Windsurf
Source: https://docs-preview.plungeai.com/integrations/windsurf
Planned: not available yet. Tracked as TI-74.
## What this will do
`~/.codeium/windsurf/mcp_config.json` snippet. This page is not written yet; the source below covers the same material today.
## Use this today
The agent skill that covers the same ground.
# PlungeAI in Replit
Source: https://docs-preview.plungeai.com/integrations/replit
Planned: not available yet. Tracked as TI-74.
## What this will do
One-click install into Replit Agent. This page is not written yet; the source below covers the same material today.
## Use this today
The agent skill that covers the same ground.
# PlungeAI in Lovable
Source: https://docs-preview.plungeai.com/integrations/lovable
Planned: not available yet. Tracked as TI-74.
## What this will do
Chat connector or app connector. This page is not written yet; the source below covers the same material today.
## Use this today
The agent skill that covers the same ground.
# PlungeAI in Bolt.new
Source: https://docs-preview.plungeai.com/integrations/bolt
Planned: not available yet. Tracked as TI-74.
## What this will do
Custom MCP server in Connectors. This page is not written yet; the source below covers the same material today.
## Use this today
The agent skill that covers the same ground.
# PlungeAI in v0
Source: https://docs-preview.plungeai.com/integrations/v0
Planned: not available yet. Tracked as TI-74.
## What this will do
Add MCP in the prompt form; the generated app cannot call MCP. This page is not written yet; the source below covers the same material today.
## Use this today
The agent skill that covers the same ground.
# Any other MCP client
Source: https://docs-preview.plungeai.com/integrations/other-mcp-clients
Planned: not available yet. Tracked as TI-74.
## What this will do
URL, header and transport for clients not listed here. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Agentic payments (x402)
Source: https://docs-preview.plungeai.com/integrations/agentic-payments
Planned: not available yet. Tracked as TI-74.
## What this will do
Pay x402 services in USDC through the payment agents, with approval. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# AWS Marketplace
Source: https://docs-preview.plungeai.com/integrations/aws-marketplace
Planned: not available yet. Tracked as TI-45.
## What this will do
You will be able to subscribe to PlungeAI and pay through your AWS account. There is no AWS Marketplace listing today.
## Use this today
Top up the wallet and see spend in Dashboard → One API → Billing.
# Browser Use
Source: https://docs-preview.plungeai.com/integrations/browser-use
Planned: not available yet. Tracked as TI-46.
## What this will do
A browser-agent integration will let a workflow read pages that need a logged-in browser. No Browser Use integration exists today.
## Use this today
The tool agents you can call today.
# Google Cloud Marketplace
Source: https://docs-preview.plungeai.com/integrations/google-cloud-marketplace
Planned: not available yet. Tracked as TI-45.
## What this will do
You will be able to subscribe to PlungeAI and pay through your Google Cloud account. There is no Google Cloud Marketplace listing today.
## Use this today
Top up the wallet and see spend in Dashboard → One API → Billing.
# Google Gemini Enterprise
Source: https://docs-preview.plungeai.com/integrations/google-gemini-enterprise
Planned: not available yet. Tracked as TI-46.
## What this will do
Gemini Enterprise will be able to use PlungeAI agents and tools as a grounding source. No Gemini Enterprise integration exists today.
## Use this today
Use PlungeAI from Gemini CLI over MCP today.
# Google Sheets
Source: https://docs-preview.plungeai.com/integrations/google-sheets
Planned: not available yet. Tracked as TI-46.
## What this will do
A Google Sheets function will run a PlungeAI agent over a range of cells and write the answers back. No Sheets function exists today.
## Use this today
Run a registry agent over the One API.
# LiteLLM
Source: https://docs-preview.plungeai.com/integrations/litellm
Planned: not available yet. Tracked as TI-74.
## What this will do
Use the models plane as an OpenAI-wire LiteLLM provider. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# n8n
Source: https://docs-preview.plungeai.com/integrations/n8n
Planned: not available yet. Tracked as TI-44.
## What this will do
n8n nodes will run PlungeAI agents, tools and workflows inside an n8n flow. No n8n node exists today. An HTTP Request node that calls the One API is the nearest path; it is not tested end to end.
## Use this today
Run a workflow over the One API.
# OpenRouter compatibility
Source: https://docs-preview.plungeai.com/integrations/openrouter
Planned: not available yet. Tracked as TI-74.
## What this will do
Endpoint and field parity with OpenRouter, and what you gain. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Render
Source: https://docs-preview.plungeai.com/integrations/render
Planned: not available yet. Tracked as TI-46.
## What this will do
A Render template will deploy a sample app that calls PlungeAI in one click. No template exists today.
## Use this today
Generate a typed client for your own app from the OpenAPI spec.
# Superhuman
Source: https://docs-preview.plungeai.com/integrations/superhuman
Planned: not available yet. Tracked as TI-46.
## What this will do
Superhuman users will be able to call PlungeAI skills from their inbox. No Superhuman integration exists today.
## Use this today
Connect any MCP-capable client to https://mcp.plungeai.com/v1.
# Vercel
Source: https://docs-preview.plungeai.com/integrations/vercel
Planned: not available yet. Tracked as TI-74.
## What this will do
Vercel AI SDK against the models plane; v0 over MCP. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Zapier
Source: https://docs-preview.plungeai.com/integrations/zapier
Planned: not available yet. Tracked as TI-44.
## What this will do
A Zapier app will run PlungeAI agents and workflows as Zap actions. No Zapier app exists today.
## Use this today
Run a workflow over the One API.
# Data Integrations
Source: https://docs-preview.plungeai.com/data-integrations/overview
Planned: not available yet. Tracked as TI-43.
## What this will do
Data integrations will let Spark, DuckDB, BigQuery, Polars, Snowflake and Supabase run PlungeAI agents over the rows of a table or a dataframe. None exists today. The nearest path today is calling `POST /v1/agents/:id/execute` from a UDF or an edge function, or the models plane.
## Use this today
Planned.
Planned.
Planned.
Planned.
Planned.
Planned.
Enrich a list of rows with a workflow you can run today.
# Apache Spark
Source: https://docs-preview.plungeai.com/data-integrations/spark
Planned: not available yet. Tracked as TI-43.
## What this will do
The Apache Spark integration will provide SQL-native UDFs that call PlungeAI agents. It does not exist yet. The nearest path today is calling `POST /v1/agents/:id/execute` from a UDF or an edge function, or the models plane.
## Use this today
Enrich a list of rows with a workflow you can run today.
# DuckDB
Source: https://docs-preview.plungeai.com/data-integrations/duckdb
Planned: not available yet. Tracked as TI-43.
## What this will do
The DuckDB integration will provide batch enrichment from DuckDB queries. It does not exist yet. The nearest path today is calling `POST /v1/agents/:id/execute` from a UDF or an edge function, or the models plane.
## Use this today
Enrich a list of rows with a workflow you can run today.
# Google BigQuery
Source: https://docs-preview.plungeai.com/data-integrations/bigquery
Planned: not available yet. Tracked as TI-43.
## What this will do
The Google BigQuery integration will provide BigQuery remote functions that call PlungeAI agents. It does not exist yet. The nearest path today is calling `POST /v1/agents/:id/execute` from a UDF or an edge function, or the models plane.
## Use this today
Enrich a list of rows with a workflow you can run today.
# Polars
Source: https://docs-preview.plungeai.com/data-integrations/polars
Planned: not available yet. Tracked as TI-43.
## What this will do
The Polars integration will provide a Polars expression plugin that calls PlungeAI agents. It does not exist yet. The nearest path today is calling `POST /v1/agents/:id/execute` from a UDF or an edge function, or the models plane.
## Use this today
Enrich a list of rows with a workflow you can run today.
# Snowflake
Source: https://docs-preview.plungeai.com/data-integrations/snowflake
Planned: not available yet. Tracked as TI-43.
## What this will do
The Snowflake integration will provide a Snowflake UDTF that calls PlungeAI agents. It does not exist yet. The nearest path today is calling `POST /v1/agents/:id/execute` from a UDF or an edge function, or the models plane.
## Use this today
Enrich a list of rows with a workflow you can run today.
# Supabase
Source: https://docs-preview.plungeai.com/data-integrations/supabase
Planned: not available yet. Tracked as TI-43.
## What this will do
The Supabase integration will provide Supabase Edge Function helpers that call PlungeAI agents. It does not exist yet. The nearest path today is calling `POST /v1/agents/:id/execute` from a UDF or an edge function, or the models plane.
## Use this today
Enrich a list of rows with a workflow you can run today.
# PlungeAI API Glossary
Source: https://docs-preview.plungeai.com/resources/glossary
Planned: not available yet. Tracked as TI-74.
## What this will do
Every term used across the API, MCP and skills docs. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Connector catalog
Source: https://docs-preview.plungeai.com/resources/connector-catalog
Planned: not available yet. Tracked as TI-74.
## What this will do
OAuth and API-key connectors, BYOK, and how connected accounts reach calls. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Memory
Source: https://docs-preview.plungeai.com/resources/memory
Planned: not available yet. Tracked as TI-74.
## What this will do
Long-term memory, and distilling sessions into skills. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Roles and permissions
Source: https://docs-preview.plungeai.com/resources/roles-and-permissions
Planned: not available yet. Tracked as TI-74.
## What this will do
Company and team roles, scopes and levels in the Dashboard. This page is not written yet; the source below covers the same material today.
## Use this today
Teams, companies and roles live in Dashboard → Team and Dashboard → Workspace.
# Trust fence and approvals
Source: https://docs-preview.plungeai.com/resources/trust-fence
Planned: not available yet. Tracked as TI-74.
## What this will do
Key fences, the trust fence, the agent fence, mission bounds and model guardrails. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# API Error Codes and Warnings
Source: https://docs-preview.plungeai.com/resources/warnings-and-errors
Planned: not available yet. Tracked as TI-74.
## What this will do
Every error envelope and code, the outcomes, and what to retry. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Webhook setup
Source: https://docs-preview.plungeai.com/resources/webhook-setup
Planned: not available yet. Tracked as TI-25.
## What this will do
PlungeAI will call a URL you register when a workflow run finishes, signed so you can verify the sender, with retries on failure. Nothing sends outbound webhooks today.
## Use this today
Follow a run live over SSE, or start it with sync:false and poll the results route.
# Migrate from legacy execute aliases
Source: https://docs-preview.plungeai.com/workflows/migration-guide
Planned: not available yet. Tracked as TI-74.
## What this will do
Move `/v1/execute` and `/v1/cnl/*` calls to `/v1/workflows/*`. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the One API developer guide this page will restate.
# Docs for AI agents
Source: https://docs-preview.plungeai.com/resources/docs-for-agents
Partly available: the Docs MCP server, which will let your agent search and read these pages. Tracked as TI-35.
Every page on docs.plungeai.com has a markdown form, the whole site has an index, and one file tells an agent how to connect PlungeAI.
## /agents.md
[https://docs.plungeai.com/agents.md](/agents.md) is the setup file for coding agents: get an `ozk_` key from the user, connect the client to `https://mcp.plungeai.com/v1`, verify with `plungeai_whoami`, add the skills and follow the rules. Paste this prompt into any agent to run it:
```text
Use curl to read https://docs.plungeai.com/agents.md and perform the setup to connect PlungeAI
```
It is served as `text/markdown; charset=utf-8`, and it is not a sidebar page.
## llms.txt and llms-full.txt
| File | What it holds |
|---|---|
| [/llms.txt](/llms.txt) | `# PlungeAI`, a one-line description, then one bullet per page in sidebar order (`[Title](https://docs.plungeai.com/.md): description`), with ` (planned)` after pages that are not available yet; then `## OpenAPI Specs` and `## Optional` |
| [/llms-full.txt](/llms-full.txt) | Every page in full: `# `, a `Source:` line with the page URL, then the page body; API and MCP reference pages in a condensed form |
## Markdown twins
Append `.md` to any page URL, for example [/getting-started/quickstart.md](/getting-started/quickstart.md), or request the page with `Accept: text/markdown`:
```bash
curl -s -H 'Accept: text/markdown' https://docs.plungeai.com/getting-started/quickstart
```
A twin starts with a pointer to `/llms.txt`, then the page title and description, then the page source unchanged. Twins carry `X-Robots-Tag: noindex`, so search engines index the HTML page only.
## Docs MCP
A docs MCP server at `docs.plungeai.com/mcp` will let an agent search these docs and read a page by path. It is planned (TI-35) and answers with a JSON-RPC error until then. The product MCP server at `https://mcp.plungeai.com/v1` is a different server and is live.
What the docs MCP server will do.
## Other llms.txt files
| URL | Covers |
|---|---|
| https://api.plungeai.com/llms.txt | The One API guide |
| https://mcp.plungeai.com/llms.txt | Workflow authoring over MCP (the CNL skill) |
| https://skills.plungeai.com/llms.txt | The agent skills catalog |
# Status
Source: https://docs-preview.plungeai.com/resources/status
Planned: not available yet. Tracked as TI-29.
## What this will do
A status page will show the health and incident history of each PlungeAI service. There is no status page today; the health endpoints below answer directly.
## Health endpoints today
| Service | URL |
|---|---|
| One API | https://api.plungeai.com/health |
| MCP server | https://mcp.plungeai.com/health and https://mcp.plungeai.com/v1/info |
| Models gateway | https://gateway.plungeai.com/health |
| Skills site | https://skills.plungeai.com/health |
| Landing site | https://plungeai.com/health |
## Use this today
Answers to common questions.
# FAQs
Source: https://docs-preview.plungeai.com/resources/faqs
Planned: not available yet. Tracked as TI-74.
## What this will do
Answers to common platform, API, billing and security questions. This page is not written yet; the source below covers the same material today.
## Use this today
The section of the MCP developer guide this page will restate.
# Create chat completion
Source: https://docs-preview.plungeai.com/api-reference/models/create-chat-completion
openapi.json post /v1/chat/completions
Send messages to a model and get a completion, or stream it as SSE chunks. Ordered fallback with `models[]`, `sort`, presets and an opt-in response cache.
# Create embeddings
Source: https://docs-preview.plungeai.com/api-reference/models/create-embeddings
openapi.json post /v1/embeddings
Turn a string or a list of strings into embedding vectors (OpenAI-compatible).
# List models
Source: https://docs-preview.plungeai.com/api-reference/models/list-models
openapi.json get /v1/models
The priced model catalog routing candidates are drawn from. `pricing.in` and `pricing.out` are the provider cost basis in USD per 1M tokens, before your org markup.
# Search the registry
Source: https://docs-preview.plungeai.com/api-reference/discovery/search-registry
openapi.json get /v1/discovery/search
Hybrid semantic and keyword search over capability cards. Pages with `limit` and `offset`; a page shorter than `limit` is the last one.
# Recommend a card
Source: https://docs-preview.plungeai.com/api-reference/discovery/recommend-card
openapi.json post /v1/discovery/recommend
Get the one best capability card for a task, with a score.
# Get a card
Source: https://docs-preview.plungeai.com/api-reference/discovery/get-card
openapi.json get /v1/discovery/cards/{type}/{id}
Read one capability card as markdown (the LLM view): operations, examples and "Not for" redirects.
# List tools
Source: https://docs-preview.plungeai.com/api-reference/tools/list-tools
openapi.json get /v1/tools
List the active tool agents, 50 per page by default (at most 100).
# Get a tool contract
Source: https://docs-preview.plungeai.com/api-reference/tools/get-tool-contract
openapi.json get /v1/tools/{id}
The invocation contract of one tool agent: JSON Schema parameters, operations, approval gates and examples.
# Execute a tool
Source: https://docs-preview.plungeai.com/api-reference/tools/execute-tool
openapi.json post /v1/tools/{id}/execute
Run one operation of a tool agent with typed params. Gated and money verbs refuse unattended calls.
# List agents
Source: https://docs-preview.plungeai.com/api-reference/agents/list-agents
openapi.json get /v1/agents
List the active agents, 50 per page by default (at most 100).
# List agent categories
Source: https://docs-preview.plungeai.com/api-reference/agents/list-agent-categories
openapi.json get /v1/agents/categories
Agent categories with the number of active agents in each.
# Execute an agent
Source: https://docs-preview.plungeai.com/api-reference/agents/execute-agent
openapi.json post /v1/agents/{id}/execute
Run one agent with a prompt. Sync by default; `sync: false` returns a pointer to redeem later; `stream: true` streams OpenAI-shaped chunks.
# Get an agent result
Source: https://docs-preview.plungeai.com/api-reference/agents/get-agent-result
openapi.json get /v1/agents/results/{workflowId}/{taskId}
Redeem the result of an async agent run with the `workflow_id` and `task_id` it returned.
# Execute an inline workflow
Source: https://docs-preview.plungeai.com/api-reference/workflows/execute-inline-workflow
openapi.json post /v1/workflows/execute
Run a CNL workflow sent in the body, as JSON `{workflow, input}` or as a raw `text/yaml` document. Returns a pointer; read the content from the result route.
# Stream an inline workflow
Source: https://docs-preview.plungeai.com/api-reference/workflows/stream-inline-workflow
openapi.json post /v1/workflows/execute-stream
Run an inline workflow and stream every engine event as SSE until `workflow_completed` or `workflow_error`.
# Execute a saved workflow
Source: https://docs-preview.plungeai.com/api-reference/workflows/execute-saved-workflow
openapi.json post /v1/workflows/{id}/execute
Run one of your saved workflows by id with an optional `input` or `inputs`.
# Stream a saved workflow
Source: https://docs-preview.plungeai.com/api-reference/workflows/stream-saved-workflow
openapi.json post /v1/workflows/{id}/execute-stream
Run a saved workflow and stream its engine events as SSE.
# Get a workflow result
Source: https://docs-preview.plungeai.com/api-reference/workflows/get-workflow-result
openapi.json get /v1/workflows/results/{workflowId}/{taskId}
Read the stored output of one task of a run, usually the `final_task_id` the execute call returned.
# Cancel an execution
Source: https://docs-preview.plungeai.com/api-reference/workflows/cancel-execution
openapi.json post /v1/workflows/executions/{id}/cancel
Ask a running execution of yours to stop. Cancellation is cooperative.
# List MCP tools
Source: https://docs-preview.plungeai.com/api-reference/mcp/list-mcp-tools
openapi.json get /v1/mcp/tools
The MCP server tool list as a plain GET; the answer is the JSON-RPC `tools/list` envelope with the tools under `result.tools`.
# MCP endpoint (JSON-RPC)
Source: https://docs-preview.plungeai.com/api-reference/mcp/mcp-endpoint
openapi.json post /v1/mcp
The Streamable HTTP MCP endpoint: `initialize`, then `tools/list` and `tools/call`. The samples use the MCP host `https://mcp.plungeai.com/v1`, the same server.
# Open an MCP run
Source: https://docs-preview.plungeai.com/api-reference/mcp/create-mcp-run
openapi.json post /v1/mcp/runs
Connect catalog MCP servers for a run and get their namespaced tool table. Always close the run when done.
# List MCP run tools
Source: https://docs-preview.plungeai.com/api-reference/mcp/list-mcp-run-tools
openapi.json get /v1/mcp/runs/{id}/tools
List the namespaced tools (`mcp____`) of an open MCP run.
# Call an MCP run tool
Source: https://docs-preview.plungeai.com/api-reference/mcp/call-mcp-run-tool
openapi.json post /v1/mcp/runs/{id}/call
Call one namespaced tool of an open MCP run with its arguments.
# Close an MCP run
Source: https://docs-preview.plungeai.com/api-reference/mcp/close-mcp-run
openapi.json delete /v1/mcp/runs/{id}
Close an MCP run and drop its state. Idempotent.
# Get a trace
Source: https://docs-preview.plungeai.com/api-reference/traces/get-trace
openapi.json get /v1/traces/{id}
The persisted trace of one run: execution spans and the gateway request log for the trace id.
# Health
Source: https://docs-preview.plungeai.com/api-reference/meta/health
openapi.json get /health
Liveness probe of the One API router. No key needed.
# OpenAPI spec
Source: https://docs-preview.plungeai.com/api-reference/meta/get-openapi-spec
openapi.json get /v1/openapi.json
The OpenAPI 3.1 document of the One API. The docs copy with tags is at [/openapi.json](/openapi.json).
# llms.txt
Source: https://docs-preview.plungeai.com/api-reference/meta/llms-txt
Not in the OpenAPI spec; documented from the route code.
```text Endpoint
GET https://api.plungeai.com/llms.txt
```
`GET https://api.plungeai.com/llms.txt` returns the index of the One API Developer Guide in the [llmstxt.org](https://llmstxt.org) format, so an AI coding agent can onboard from the domain alone. No key is needed.
## Response
The guide index. Cached for 5 minutes (`Cache-Control: public, max-age=300`).
## Example
```python Python
import requests
print(requests.get('https://api.plungeai.com/llms.txt').text)
```
```typescript TypeScript
const res = await fetch('https://api.plungeai.com/llms.txt')
console.log(await res.text())
```
```java Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpRequest req = HttpRequest.newBuilder(URI.create("https://api.plungeai.com/llms.txt")).GET().build();
HttpResponse res = HttpClient.newHttpClient().send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(res.body());
}
}
```
```bash cURL
curl -s https://api.plungeai.com/llms.txt
```
The index of this documentation site is [/llms.txt](/llms.txt) on docs.plungeai.com.
# llms-full.txt
Source: https://docs-preview.plungeai.com/api-reference/meta/llms-full-txt
Not in the OpenAPI spec; documented from the route code.
```text Endpoint
GET https://api.plungeai.com/llms-full.txt
```
`GET https://api.plungeai.com/llms-full.txt` returns the full One API Developer Guide 3.0 as one markdown document, for agents that read everything at once. No key is needed.
## Response
The full guide. Cached for 5 minutes (`Cache-Control: public, max-age=300`).
## Example
```python Python
import requests
open('one-api-guide.md', 'w').write(requests.get('https://api.plungeai.com/llms-full.txt').text)
```
```typescript TypeScript
const res = await fetch('https://api.plungeai.com/llms-full.txt')
console.log((await res.text()).length)
```
```java Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
public class Main {
public static void main(String[] args) throws Exception {
HttpRequest req = HttpRequest.newBuilder(URI.create("https://api.plungeai.com/llms-full.txt")).GET().build();
HttpResponse res = HttpClient.newHttpClient().send(req, HttpResponse.BodyHandlers.ofFile(Path.of("one-api-guide.md")));
System.out.println(res.statusCode() + " " + res.body());
}
}
```
```bash cURL
curl -s https://api.plungeai.com/llms-full.txt -o one-api-guide.md
```
The full text of this documentation site is [/llms-full.txt](/llms-full.txt) on docs.plungeai.com.
# Guide (HTML)
Source: https://docs-preview.plungeai.com/api-reference/meta/docs
Not in the OpenAPI spec; documented from the route code.
```text Endpoint
GET https://api.plungeai.com/docs
```
`GET https://api.plungeai.com/docs` serves the One API Developer Guide 3.0 as a single HTML page. The same guide is copied to `plungeai.com/docs`. No key is needed.
## Response
The guide page. Cached for 5 minutes (`Cache-Control: public, max-age=300`).
## Example
```python Python
import requests
open('one-api-guide.html', 'w').write(requests.get('https://api.plungeai.com/docs').text)
```
```typescript TypeScript
const res = await fetch('https://api.plungeai.com/docs')
console.log(res.status, (await res.text()).length)
```
```java Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
public class Main {
public static void main(String[] args) throws Exception {
HttpRequest req = HttpRequest.newBuilder(URI.create("https://api.plungeai.com/docs")).GET().build();
HttpResponse res = HttpClient.newHttpClient().send(req, HttpResponse.BodyHandlers.ofFile(Path.of("one-api-guide.html")));
System.out.println(res.statusCode() + " " + res.body());
}
}
```
```bash cURL
curl -s -o one-api-guide.html https://api.plungeai.com/docs
```
This site replaces the single page with one page per topic; start at the [overview](/getting-started/overview).
# Resolve a task to one tool, its operation and an example call, with a…
Source: https://docs-preview.plungeai.com/api-reference/other/post-v1-discovery-resolve
openapi.json post /v1/discovery/resolve
Resolve a task to one tool, its operation and an example call, with a calibrated confidence
# MCP server overview
Source: https://docs-preview.plungeai.com/mcp-reference/overview
The PlungeAI MCP server exposes 20 `plungeai_*` tools, one prompt, five resources and three resource templates to any MCP client. This tab documents every tool, resource and protocol method: the tool, resource and prompt pages are generated from the server code; this overview and the protocol pages are written from the MCP guide.
## Endpoint
| Item | Value |
|---|---|
| URL | `https://mcp.plungeai.com/v1` (`/v1/` answers the same) |
| Legacy path | `/mcp` on the same host still answers with the same handler; configure `/v1` |
| Methods | `POST` with JSON-RPC 2.0. `GET` and `DELETE` without a session answer `405` |
| Request headers | `Authorization: Bearer $PLUNGE_API_KEY` or `X-API-Key: $PLUNGE_API_KEY`, `Content-Type: application/json`, `Accept: application/json, text/event-stream` |
| Responses | `application/json`; `tools/call` answers as `text/event-stream`; a notification alone answers `202` with no body |
The docs site's own MCP server (`docs.plungeai.com/mcp`, planned as TI-35) is a different server. Its resources use the `plungeai-docs://` scheme, so they never collide with this server's `plungeai://` URIs.
## Versions
The server version is `2.5.1` and it implements MCP revision `2025-11-25`. It negotiates down to `2024-11-05`: a client that sends `2025-06-18`, `2025-03-26`, `2024-11-05` or `2024-10-07` in `initialize` gets that version back, and any other value gets `2025-11-25`. After `initialize` you may send `MCP-Protocol-Version`; an unsupported value answers `400`, and leaving the header out is fine. See [initialize](/mcp-reference/protocol/initialize).
## Authentication and key fences
Every request needs an `ozk_` key, `tools/list` included; create one at **Dashboard → One API → Keys**. Key fences are set by PlungeAI on request. A key fenced to some tools does not see the others in `tools/list`, and a `tools/call` to one of them answers JSON-RPC `-32602` `Tool not permitted for this key: `. Check your identity and tier with [plungeai_whoami](/mcp-reference/tools/plungeai_whoami).
## Stateless requests and sessions
Each `POST` gets a fresh server instance and stands alone: no `Mcp-Session-Id` is issued and none is needed. Because nothing is kept between requests, `notifications/tools/list_changed` is never sent, `logging/setLevel` is not persisted and a dropped `tools/call` stream is not replayed (the run keeps going; read it with `plungeai_get_result`). Stateful sessions exist only on keys PlungeAI issues with sessions enabled: `initialize` then returns an `Mcp-Session-Id` header to send on every later request, and a session expires after 10 minutes without a request.
## Batches
A JSON array of messages is answered as an array, one answer per message:
```bash
curl -s https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '[{"jsonrpc":"2.0","id":1,"method":"ping"},{"jsonrpc":"2.0","id":2,"method":"prompts/list"}]'
```
A batch that contains `initialize` with other messages answers `400 -32600`, and a batch with a `tools/call` is answered as SSE.
## Ignored and rejected methods
| Method | What happens |
|---|---|
| `notifications/cancelled` | Ignored: `202`. To stop a run, call `plungeai_executions` with `{"action":"cancel"}` |
| `resources/subscribe`, `resources/unsubscribe`, `completion/complete` | Rejected: `-32601 Method not found` |
| Any other method | Rejected: `-32601 Method not found` |
The server never sends requests to your client: no sampling, elicitation or roots.
## Errors
Protocol errors mean the request never reached a tool. The body is always `{"jsonrpc":"2.0","error":{"code":…,"message":"…"},"id":…}`.
| HTTP | Code | When |
|---|---|---|
| 400 | `-32700` | The body is not valid JSON, or not a JSON-RPC message |
| 400 | `-32600` | A batch holding `initialize` plus other messages |
| 400 | `-32000` | An unsupported `MCP-Protocol-Version` header after `initialize` |
| 401 | `-32001` | No key, or a wrong, revoked or expired key, or a bearer that does not start with `ozk_` |
| 404 | `-32001` | An `Mcp-Session-Id` that is unknown or expired |
| 405 | `-32000` | `GET` or `DELETE` without a session |
| 413 | `-32600` | A body over 1 MiB |
| 415 | `-32000` | A complete `Accept` header with a non-JSON `Content-Type` |
| 429 | `-32000` | Rate limit reached; `Retry-After` and `error.data.retryAfter` give the seconds |
| 200 | `-32602` | Unknown tool, a tool your key is fenced from, malformed `initialize` params, or an unknown prompt |
| 200 | `-32002` | `resources/read` for an unknown resource, workflow or execution |
| 200 | `-32601` | A method the server does not implement |
| 500 | `-32603` | An unhandled server error |
Tool failures are not protocol errors: execution tools answer with an outcome (`ok`, `needs_input`, `needs_connection`, `needs_api_key`, `needs_approval`, `unavailable` or `error`) inside a normal result.
## Helper routes
| Route | Key | Returns |
|---|---|---|
| `GET https://mcp.plungeai.com/v1/info` | no | Server name `plungeai.com`, version, protocol version and capabilities |
| `GET https://mcp.plungeai.com/health` | no | Dependency probes; `200` when healthy, `503` when one fails |
## Recurring parameters
Two arguments appear on many tool pages and mean the same thing everywhere:
| Argument | On | Meaning |
|---|---|---|
| `user_request` | Every tool | The user's request in their own words, up to 4,000 characters, optional. Always send it: the platform uses it for context and routing |
| `format` | Nine tools | `markdown` (the default) or `json`; `json` returns the same answer as a JSON document and as `structuredContent` |
# plungeai_execute_workflow
Source: https://docs-preview.plungeai.com/mcp-reference/tools/plungeai_execute_workflow
Execute a CNL workflow (saved workflow_id or ad-hoc workflow_yaml). Streams progress. Use mode:"async" for long runs (>3 min) — it returns an execution_id to poll with plungeai_get_workflow_status. In ad-hoc YAML, write long strings as block scalars (`prompt: |`) — never hard-wrap a value; structured tool-agents take their card's parameters as task fields alongside `agent:`. Always answers with a structured outcome (never a raw error) — follow the remediation instead of retrying the identical call.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `user_request` | string | no | — | The user's original request, verbatim and in their own words, before you translated it into this call. Always include it — the platform uses it for request context, routing and support diagnostics. |
| `workflow_yaml` | string | no | — | Ad-hoc CNL workflow YAML. The `workflow:` wrapper is optional — bare top-level name/tasks is accepted and wrapped automatically. |
| `workflow_id` | string | no | — | |
| `input` | string | no | — | |
| `inputs` | object | no | — | |
| `mode` | enum | no | sync | |
| `format` | enum | no | markdown | markdown (default): rendered for an AI reader · json: the same outcome as a JSON document in `text` plus `structuredContent` |
# plungeai_execute_agent
Source: https://docs-preview.plungeai.com/mcp-reference/tools/plungeai_execute_agent
Execute a single PROMPT-DRIVEN agent (e.g. "llm-agent", or "skill-agent" with a persona). Pass session_id to start/continue a conversational agent. Structured tool-agents (cards with a Parameters table, e.g. markitdown, weather-agent) take typed fields, not prose — use plungeai_get_tool_contract + plungeai_execute_tool for those. Always answers with a structured outcome (never a raw error) — follow the remediation instead of retrying the identical call.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `user_request` | string | no | — | The user's original request, verbatim and in their own words, before you translated it into this call. Always include it — the platform uses it for request context, routing and support diagnostics. |
| `agent` | string | yes | — | |
| `prompt` | string | yes | — | |
| `persona` | string | no | — | |
| `model` | string | no | the agent's default | |
| `provider` | string | no | the model's catalog provider | |
| `maxTokens` | integer | no | — | |
| `max_tokens` | integer | no | — | |
| `temperature` | number | no | — | |
| `top_p` | number | no | — | |
| `reasoning_effort` | enum | no | — | |
| `thinking_level` | string | no | — | |
| `streaming` | boolean | no | true | |
| `session_id` | string | no | — | |
| `format` | enum | no | markdown | markdown (default): rendered for an AI reader · json: the same outcome as a JSON document in `text` plus `structuredContent` |
# plungeai_get_tool_contract
Source: https://docs-preview.plungeai.com/mcp-reference/tools/plungeai_get_tool_contract
The exact invocation contract for one registry agent: JSON Schema for its parameters, operations (with approval gates), worked YAML examples, output shape, and LIVE credential status for the acting user (platform-managed vs "connect Google first"). Fetch this before the first plungeai_execute_tool call to an unfamiliar agent — the contract IS the API docs.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `user_request` | string | no | — | The user's original request, verbatim and in their own words, before you translated it into this call. Always include it — the platform uses it for request context, routing and support diagnostics. |
| `agent_id` | string | yes | — | |
| `format` | enum | no | markdown | markdown (default): rendered for an AI reader · json: the same outcome as a JSON document in `text` plus `structuredContent` |
# plungeai_execute_tool
Source: https://docs-preview.plungeai.com/mcp-reference/tools/plungeai_execute_tool
Execute one structured tool-agent directly with typed params: {agent_id, operation?, params}. Runs through the engine with full observability; use mode:"async" for long runs. Always answers with a structured outcome (never a raw error): ok → result; needs_input → missing fields + the schema; needs_connection/needs_api_key → tell the user exactly what to connect in our apps, then retry; needs_approval → relay the ⏸ block and use plungeai_continue after the user decides; unavailable → real alternatives. Follow the remediation — do not retry the identical call blind.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `user_request` | string | no | — | The user's original request, verbatim and in their own words, before you translated it into this call. Always include it — the platform uses it for request context, routing and support diagnostics. |
| `agent_id` | string | yes | — | |
| `operation` | string | no | the card's default operation | |
| `params` | object | no | {} | |
| `prompt` | string | no | — | |
| `mode` | enum | no | sync | |
| `format` | enum | no | markdown | markdown (default): rendered for an AI reader · json: the same outcome as a JSON document in `text` plus `structuredContent` |
# plungeai_run_mission
Source: https://docs-preview.plungeai.com/mcp-reference/tools/plungeai_run_mission
Run a bounded autonomous agent mission (loop agent): give a goal, optional tool fence and iteration cap. Recalls and writes long-term memory automatically. Defaults to async — poll plungeai_get_workflow_status. Always answers with a structured outcome (never a raw error) — follow the remediation instead of retrying the identical call.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `user_request` | string | no | — | The user's original request, verbatim and in their own words, before you translated it into this call. Always include it — the platform uses it for request context, routing and support diagnostics. |
| `goal` | string | yes | — | |
| `mission` | string | no | You are a capable autonomous agent. Achieve the goal thoroughly and cite sources. | |
| `allowed_tools` | string[] | no | ["web_search", "web_fetch", "task_complete"] | |
| `max_iterations` | integer | no | 8 | |
| `success_criteria` | string[] | no | — | |
| `persona` | string | no | — | |
| `skills` | string[] | no | — | |
| `mode` | enum | no | async | |
# plungeai_learn
Source: https://docs-preview.plungeai.com/mcp-reference/tools/plungeai_learn
Manage your private skill library. `action: learn` (default) distills a URL, PDF text, or a past workflow into a reusable skill via the `learn` pre-built agent (needs `source`; defaults to async — poll plungeai_get_workflow_status). `action: list` returns your learned skills (id + summary). `action: forget` deletes one by `name` (the id from list). Always answers with a structured outcome (never a raw error) — follow the remediation instead of retrying the identical call.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `user_request` | string | no | — | The user's original request, verbatim and in their own words, before you translated it into this call. Always include it — the platform uses it for request context, routing and support diagnostics. |
| `action` | enum | no | learn | learn (default): distill source into a skill · list: your learned skills · forget: delete one (name required) |
| `source` | string | no | — | A URL, or text/markdown to distill, or a description of what you just did. |
| `name` | string | no | picked automatically on learn | Skill id (kebab-case): picked automatically on learn, required on forget. |
| `mode` | enum | no | async | |
# plungeai_list_agents
Source: https://docs-preview.plungeai.com/mcp-reference/tools/plungeai_list_agents
Discover platform building-block agents from the live registry (the capability catalog). NOT the user's own agents — for "show me my agents/workflows" use plungeai_list_workflows. `search` is a hybrid semantic+keyword query — describe the capability in natural language (e.g. "web search", "pdf to markdown"). Prefer search/category filters; an unfiltered list returns the whole catalog (~90 agents, large). The catalog is active-only, and execution refuses any id that is not active — so take ids from here, not from memory. Fetch one full card with agent_id. With `format: "json"` the result is `{content: }` — its source is rendered registry markdown; typed rows are a follow-up.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `user_request` | string | no | — | The user's original request, verbatim and in their own words, before you translated it into this call. Always include it — the platform uses it for request context, routing and support diagnostics. |
| `search` | string | no | — | |
| `category` | string | no | — | |
| `agent_id` | string | no | — | |
| `kind` | enum | no | agents | |
| `limit` | integer | no | 25 with search or category, 100 without | |
| `format` | enum | no | markdown | markdown (default): rendered for an AI reader · json: the same outcome as a JSON document in `text` plus `structuredContent` |
# plungeai_list_workflows
Source: https://docs-preview.plungeai.com/mcp-reference/tools/plungeai_list_workflows
List your saved workflows — what users usually mean by "my agents". No args shows your folders (rubrics) + recent; filter with folder and/or search.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `user_request` | string | no | — | The user's original request, verbatim and in their own words, before you translated it into this call. Always include it — the platform uses it for request context, routing and support diagnostics. |
| `search` | string | no | — | |
| `folder` | string | no | — | |
| `limit` | integer | no | 50 | |
| `format` | enum | no | markdown | markdown (default): rendered for an AI reader · json: the same outcome as a JSON document in `text` plus `structuredContent` |
# plungeai_get_result
Source: https://docs-preview.plungeai.com/mcp-reference/tools/plungeai_get_result
Retrieve the result of one of your executions (by `execution_id`) — for conversational runs this includes the FULL conversation thread (all follow-up turns), same as Studio shows. Pass task_id to read a single task's output (e.g. one branch of a workflow) instead of the final result. The output is final user-ready markdown: show it to the user verbatim and complete — never summarize or re-type it. With `format: "json"` the result is `{content: }` — an assembled multi-store document rendered as markdown; typed rows are a follow-up.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `user_request` | string | no | — | The user's original request, verbatim and in their own words, before you translated it into this call. Always include it — the platform uses it for request context, routing and support diagnostics. |
| `execution_id` | string | no | — | |
| `workflow_id` | string | no | — | |
| `task_id` | string | no | the final task | |
| `format` | enum | no | markdown | markdown (default): rendered for an AI reader · json: the same outcome as a JSON document in `text` plus `structuredContent` |
# plungeai_get_workflow_status
Source: https://docs-preview.plungeai.com/mcp-reference/tools/plungeai_get_workflow_status
Check the status of one of your executions (self-heals stuck runs). Returns structured content too, including `continuation` when the run is paused awaiting user approval or an answer — relay that to the user and use plungeai_continue.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `user_request` | string | no | — | The user's original request, verbatim and in their own words, before you translated it into this call. Always include it — the platform uses it for request context, routing and support diagnostics. |
| `execution_id` | string | yes | — | |
# plungeai_workflow
Source: https://docs-preview.plungeai.com/mcp-reference/tools/plungeai_workflow
Manage your workflows: action create|get|update|delete|save_version|list_versions|get_version|restore_version. Create/update/delete sync live to Studio, iMini, and peer apps.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `user_request` | string | no | — | The user's original request, verbatim and in their own words, before you translated it into this call. Always include it — the platform uses it for request context, routing and support diagnostics. |
| `action` | enum | yes | — | |
| `workflow_id` | string | no | — | |
| `name` | string | no | — | |
| `yaml` | string | no | — | |
| `description` | string | no | — | |
| `folder` | string | no | — | |
| `kind` | enum | no | workflow on create | |
| `version_id` | string | no | — | |
| `version_description` | string | no | — | |
# plungeai_executions
Source: https://docs-preview.plungeai.com/mcp-reference/tools/plungeai_executions
Browse your execution history: action list|get|output|conversation|delete|cancel. `cancel` stops a running execution (cooperative — it stops at its next turn or tool boundary). Outputs are final user-ready markdown (tables, threads): show them to the user verbatim and complete — never summarize or re-type them.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `user_request` | string | no | — | The user's original request, verbatim and in their own words, before you translated it into this call. Always include it — the platform uses it for request context, routing and support diagnostics. |
| `action` | enum | yes | — | |
| `execution_id` | string | no | — | |
| `workflow_id` | string | no | — | |
| `limit` | integer | no | 20 | |
| `offset` | integer | no | 0 | |
| `format` | enum | no | markdown | markdown (default): rendered for an AI reader · json: the same outcome as a JSON document in `text` plus `structuredContent` |
# plungeai_followup
Source: https://docs-preview.plungeai.com/mcp-reference/tools/plungeai_followup
Ask a follow-up about a completed execution (continues its agent session or researches with prior context). If the execution is still running, your message is queued and injected at its next turn (steer); if finished, it continues the conversation.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `user_request` | string | no | — | The user's original request, verbatim and in their own words, before you translated it into this call. Always include it — the platform uses it for request context, routing and support diagnostics. |
| `execution_id` | string | yes | — | |
| `prompt` | string | yes | — | |
# plungeai_continue
Source: https://docs-preview.plungeai.com/mcp-reference/tools/plungeai_continue
Continue a paused conversation: answer a question (message) or approve a pending action (approve:true). Only pass approve:true after the user explicitly confirmed — never approve on your own. To deny or change course, pass their words as message.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `user_request` | string | no | — | The user's original request, verbatim and in their own words, before you translated it into this call. Always include it — the platform uses it for request context, routing and support diagnostics. |
| `execution_id` | string | yes | — | |
| `message` | string | no | — | |
| `approve` | boolean | no | — | |
# plungeai_chat
Source: https://docs-preview.plungeai.com/mcp-reference/tools/plungeai_chat
Persistent chat with the PlungeAI assistant (platform tools + web search). action send|new|list_sessions|history. Conversations appear in Studio and the CLI.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `user_request` | string | no | — | The user's original request, verbatim and in their own words, before you translated it into this call. Always include it — the platform uses it for request context, routing and support diagnostics. |
| `action` | enum | yes | — | |
| `message` | string | no | — | |
| `conversation_id` | string | no | a new conversation (send) | |
# plungeai_build_workflow
Source: https://docs-preview.plungeai.com/mcp-reference/tools/plungeai_build_workflow
Generate a new workflow from a goal, or refine an existing one (workflow_id + instruction), via the platform builder. Saves it so it appears everywhere (live sync).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `user_request` | string | no | — | The user's original request, verbatim and in their own words, before you translated it into this call. Always include it — the platform uses it for request context, routing and support diagnostics. |
| `goal` | string | no | — | |
| `workflow_id` | string | no | — | |
| `instruction` | string | no | — | |
# plungeai_memory
Source: https://docs-preview.plungeai.com/mcp-reference/tools/plungeai_memory
Long-term memory scoped to you: action recall|remember|search_runs|get_run. remember writes the durable store that recall reads (target user|memory, operation add|replace|remove|read) — use it when the user asks to remember something. Past-run history is separate: search_runs/get_run read the run journal, which recall deliberately does not include.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `user_request` | string | no | — | The user's original request, verbatim and in their own words, before you translated it into this call. Always include it — the platform uses it for request context, routing and support diagnostics. |
| `action` | enum | yes | — | |
| `query` | string | no | — | |
| `run_id` | string | no | — | |
| `target` | enum | no | memory | |
| `operation` | enum | no | add | |
| `content` | string | no | — | |
| `old_text` | string | no | — | |
| `limit` | integer | no | 10 | |
# plungeai_templates
Source: https://docs-preview.plungeai.com/mcp-reference/tools/plungeai_templates
Workflow templates: action list|get|use. "use" creates a workflow from the template (optional name + folder).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `user_request` | string | no | — | The user's original request, verbatim and in their own words, before you translated it into this call. Always include it — the platform uses it for request context, routing and support diagnostics. |
| `action` | enum | yes | — | |
| `template_id` | string | no | — | |
| `category` | string | no | — | |
| `name` | string | no | (copy); a bot template keeps its own name | |
| `folder` | string | no | — | |
| `limit` | integer | no | 50 | |
# plungeai_schedule
Source: https://docs-preview.plungeai.com/mcp-reference/tools/plungeai_schedule
Scheduled (cron) jobs: action stats|list|get|create|update|pause|resume|delete|run_now|runs. create needs name, job_type (agent|query|workflow|heartbeat), target, schedule; create also takes mission_ref (schedule a pre-built agent card).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `user_request` | string | no | — | The user's original request, verbatim and in their own words, before you translated it into this call. Always include it — the platform uses it for request context, routing and support diagnostics. |
| `action` | enum | yes | — | |
| `job_id` | string | no | — | |
| `name` | string | no | — | |
| `description` | string | no | — | |
| `job_type` | enum | no | — | |
| `target` | string | no | — | |
| `schedule` | string | no | — | |
| `timezone` | string | no | UTC | |
| `parameters` | object | no | — | Job extras. deliver: DeliverTarget[] — objects {channel: "inapp"\|"email"\|"slack"\|"telegram"\|"whatsapp"\|"discord", chat_id?, to?}; bare {channel:"slack"} DMs the owner, bare {channel:"email"} mails the owner's registered address, other emails must be confirmed recipients. prompt: per-run goal. |
| `limit` | integer | no | 50 for list, 20 for runs | |
| `mission_ref` | string | no | — | |
| `check_agent` | string | no | — | |
| `condition_prompt` | string | no | — | |
| `trigger_workflow` | string | no | — | |
| `notify_channel` | enum | no | — | |
| `notify_chat_id` | string | no | — | |
# plungeai_whoami
Source: https://docs-preview.plungeai.com/mcp-reference/tools/plungeai_whoami
Show the authenticated identity: user id, tier, key label, rate-limit window.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `user_request` | string | no | — | The user's original request, verbatim and in their own words, before you translated it into this call. Always include it — the platform uses it for request context, routing and support diagnostics. |
| `format` | enum | no | markdown | markdown (default): rendered for an AI reader · json: the same outcome as a JSON document in `text` plus `structuredContent` |
# PlungeAI Agents
Source: https://docs-preview.plungeai.com/mcp-reference/resources/agents-list
`plungeai://agents/list` · `text/markdown` · `static`
The live registry of **active** agents: `kind=agents&status=active&format=md&limit=100`. The
Markdown starts `# Registry search`, then `* results*`. Each agent follows under a
`## Name (id)` heading with its kind, category and status line, its description and a **Good at**
list. On 2026-09-24 the
registry listed **92** active agents (live-verified). The listing is large, about 150 KB, so attach
it only when you really want the whole catalog. For a normal question, a filtered
`plungeai_list_agents` search is far smaller.
```bash
# verify
# expect: Registry search
# expect: status:active
curl -s https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":6,"method":"resources/read","params":{"uri":"plungeai://agents/list"}}' \
| cut -c1-1200
```
## Result shape
`resources/read` answers one entry:
```json
{
"contents": [
{
"uri": "plungeai://agents/list",
"mimeType": "text/markdown",
"text": "…"
}
]
}
```
## Errors
`resources/read` answers JSON-RPC errors, not outcomes; the SDK prefixes each message with `MCP error :` ([resources/read](/mcp-reference/protocol/resources-read)).
- `-32603` `Registry error `: the registry answered with a non-2xx status.
- `-32002` `Resource not found: `: the URI matches no resource or template.
# Agent Categories
Source: https://docs-preview.plungeai.com/mcp-reference/resources/agents-categories
`plungeai://agents/categories` · `text/markdown` · `static`
Active agents (up to 500) grouped by category into one table, largest first. An agent with no
category counts as `general`:
```
# Agent Categories ( agents, live registry)
| Category | Agents |
|:---|---:|
| google-workspace | … |
…
_Read `plungeai://agents/{category}` for the agents in one category._
```
This is the cheap way to answer "what kinds of agents are there". On 2026-09-24 the registry held
92 active agents in 14 categories (live-verified): `google-workspace`, `tools`, `search`,
`microsoft-365`, `ai`, `blockchain`, `communication`, `ecommerce-agents`, `payment`,
`entertainment`, `media`, `financials`, `shopping`, `coding-agents`. Note the finance category is
`financials`, not `finance`.
```bash
# verify
# expect: Agent Categories
# expect: | Category | Agents |
curl -s https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":7,"method":"resources/read","params":{"uri":"plungeai://agents/categories"}}'
```
## Result shape
`resources/read` answers one entry:
```json
{
"contents": [
{
"uri": "plungeai://agents/categories",
"mimeType": "text/markdown",
"text": "…"
}
]
}
```
## Errors
`resources/read` answers JSON-RPC errors, not outcomes; the SDK prefixes each message with `MCP error :` ([resources/read](/mcp-reference/protocol/resources-read)).
- `-32603` `Registry error `: the registry answered with a non-2xx status.
- `-32002` `Resource not found: `: the URI matches no resource or template.
# Personas
Source: https://docs-preview.plungeai.com/mcp-reference/resources/personas-list
`plungeai://personas/list` · `text/markdown` · `static`
The persona registry: `kind=personas&format=md&limit=100`, as registry Markdown (a `## Name (id)`
heading per persona, its kind and category, **Good at**). Unlike the agent resources, it has **no** `status:active` filter,
because no persona card carries that tag and the filter would empty the list (`resources.ts`). The
list stops at 100: on 2026-09-24 the registry answered `*100 results*`. For a specific persona,
search with `plungeai_list_agents` `{"kind":"personas","search":"…"}`. A persona id goes on
`plungeai_execute_agent` `persona` or a mission's `persona`
([Agents & missions](https://mcp.plungeai.com/docs#7-agents--missions)).
```bash
# verify
# expect: Registry search
curl -s https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":8,"method":"resources/read","params":{"uri":"plungeai://personas/list"}}' \
| cut -c1-800
```
## Result shape
`resources/read` answers one entry:
```json
{
"contents": [
{
"uri": "plungeai://personas/list",
"mimeType": "text/markdown",
"text": "…"
}
]
}
```
## Errors
`resources/read` answers JSON-RPC errors, not outcomes; the SDK prefixes each message with `MCP error :` ([resources/read](/mcp-reference/protocol/resources-read)).
- `-32603` `Registry error `: the registry answered with a non-2xx status.
- `-32002` `Resource not found: `: the URI matches no resource or template.
# Your Workflows
Source: https://docs-preview.plungeai.com/mcp-reference/resources/workflows-list
`plungeai://workflows/list` · `text/markdown` · `static`
**Your workflows**: the 50 most recently updated saved workflows on your account (what users call
"my agents"). One bullet each (bold name, the id as code, then the description) under
`# Your Workflows ()`. With no saved workflows, the text is `_No workflows yet._`. It carries
no folders and no search. For those, use `plungeai_list_workflows`.
```bash
# verify
# expect: "uri":"plungeai://workflows/list"
curl -s https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":9,"method":"resources/read","params":{"uri":"plungeai://workflows/list"}}'
```
## Result shape
`resources/read` answers one entry:
```json
{
"contents": [
{
"uri": "plungeai://workflows/list",
"mimeType": "text/markdown",
"text": "…"
}
]
}
```
## Errors
`resources/read` answers JSON-RPC errors, not outcomes; the SDK prefixes each message with `MCP error :` ([resources/read](/mcp-reference/protocol/resources-read)).
- `-32002` `Resource not found: `: the URI matches no resource or template.
# Workflow Authoring Guide
Source: https://docs-preview.plungeai.com/mcp-reference/resources/docs-workflow-authoring
`plungeai://docs/workflow-authoring` · `text/markdown` · `static`
The complete CNL workflow-authoring skill as one Markdown document: how to author, validate and
save CNL workflows, with examples. It is a static bundle built into the server and needs no data
access. The content is identical to `GET https://mcp.plungeai.com/llms-full.txt`, which needs no
key (61,309 bytes on 2026-09-24, live-verified). Attach it when you want your client to write CNL
YAML by hand ([Workflows](https://mcp.plungeai.com/docs#8-workflows)). The same skill is in the catalog at
`https://skills.plungeai.com`.
```bash
# verify
# expect: PlungeAI Workflow Authoring
curl -s https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":10,"method":"resources/read","params":{"uri":"plungeai://docs/workflow-authoring"}}' \
| cut -c1-600
```
## Result shape
`resources/read` answers one entry:
```json
{
"contents": [
{
"uri": "plungeai://docs/workflow-authoring",
"mimeType": "text/markdown",
"text": "…"
}
]
}
```
## Errors
`resources/read` answers JSON-RPC errors, not outcomes; the SDK prefixes each message with `MCP error :` ([resources/read](/mcp-reference/protocol/resources-read)).
- `-32002` `Resource not found: `: the URI matches no resource or template.
# Agents by category
Source: https://docs-preview.plungeai.com/mcp-reference/resources/agents-by-category
`plungeai://agents/{category}` · `text/markdown` · `template`
The active agents in one category, up to 100, as registry Markdown under
`# Registry search — category=`. The category is passed to the registry as-is, so an
unknown or misspelled category is **not** an error. It returns an empty listing (`*0 results*`).
Take category names from `plungeai://agents/categories`.
```bash
# verify
# expect: category=financials
# expect: sec-agent
curl -s https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":11,"method":"resources/read","params":{"uri":"plungeai://agents/financials"}}'
```
## Result shape
`resources/read` answers one entry:
```json
{
"contents": [
{
"uri": "plungeai://agents/{category}",
"mimeType": "text/markdown",
"text": "…"
}
]
}
```
## Errors
`resources/read` answers JSON-RPC errors, not outcomes; the SDK prefixes each message with `MCP error :` ([resources/read](/mcp-reference/protocol/resources-read)).
- `-32603` `Registry error `: the registry answered with a non-2xx status.
- `-32002` `Resource not found: `: the URI matches no resource or template.
# Workflow YAML by id
Source: https://docs-preview.plungeai.com/mcp-reference/resources/workflow-yaml
`plungeai://workflows/{id}` · `text/yaml` · `template`
The saved CNL YAML of one of **your** workflows, as `text/yaml`. The id is the workflow id from
`plungeai_list_workflows` or `plungeai://workflows/list`. The ownership check comes first: an id
that does not exist and an id owned by someone else get the same `-32002` answer, so you cannot
probe for other accounts' ids. A workflow whose YAML body is missing from storage returns the text
`No YAML content found`.
```bash
# needs one of your workflow ids — not auto-verified
curl -s https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":12,"method":"resources/read","params":{"uri":"plungeai://workflows/"}}'
```
## Result shape
`resources/read` answers one entry:
```json
{
"contents": [
{
"uri": "plungeai://workflows/{id}",
"mimeType": "text/yaml",
"text": "…"
}
]
}
```
## Errors
`resources/read` answers JSON-RPC errors, not outcomes; the SDK prefixes each message with `MCP error :` ([resources/read](/mcp-reference/protocol/resources-read)).
- `-32002` `Workflow not found: `: the workflow is unknown or not yours.
- `-32002` `Resource not found: `: the URI matches no resource or template.
# Execution result by id
Source: https://docs-preview.plungeai.com/mcp-reference/resources/execution-result
`plungeai://executions/{id}` · `text/markdown` · `template`
The stored result of one of **your** runs, by **execution id** (not the workflow id,
[Troubleshooting](https://mcp.plungeai.com/docs#15-troubleshooting--gotchas)). It reads the same stores as `plungeai_get_result`:
the stored result, then the final task's output. The document looks like this:
```
# Execution
- **Workflow:** ``
## Result
```
When there is no output, the Result section says why:
| Run state | `## Result` text |
|---|---|
| failed | `_This run failed: ._` (or `no error was recorded`) |
| no output yet | `_No result stored yet (may still be running)._` |
This resource gives the final result only. For one task's output, the full conversation thread, the
"Steps in this run" index or a paused run's ⏸ block, use `plungeai_get_result`
([Runs, results & follow-ups](https://mcp.plungeai.com/docs#9-runs-results--follow-ups)). An unknown id, or one that is not
yours, gets `-32002 Execution not found: `.
```bash
# needs one of your execution ids — not auto-verified
curl -s https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":13,"method":"resources/read","params":{"uri":"plungeai://executions/"}}'
```
## Result shape
`resources/read` answers one entry:
```json
{
"contents": [
{
"uri": "plungeai://executions/{id}",
"mimeType": "text/markdown",
"text": "…"
}
]
}
```
## Errors
`resources/read` answers JSON-RPC errors, not outcomes; the SDK prefixes each message with `MCP error :` ([resources/read](/mcp-reference/protocol/resources-read)).
- `-32002` `Execution not found: `: the execution is unknown or not yours.
- `-32002` `Resource not found: `: the URI matches no resource or template.
# plungeai
Source: https://docs-preview.plungeai.com/mcp-reference/prompts/plungeai
## Arguments
| Argument | Required | Description |
|---|---|---|
| `request` | no | What you want to accomplish (optional) |
There is exactly one prompt. It activates the whole platform in one step. Earlier recipe prompts
(research pipeline, market research, …) were removed on purpose: they showed up as separate slash
commands and locked the client into one behaviour, when the tools already cover everything
(`prompts.ts`).
| Field | Value |
|---|---|
| `name` | `plungeai` |
| `title` | `PlungeAI` |
| `description` | `PlungeAI MCP` |
| `arguments` | one: `request` (string, **optional**), "What you want to accomplish (optional)" |
**Using it in a client.** Clients list MCP prompts in their slash-command or prompt menu. In
Claude Code the prompt appears as `/plungeai:plungeai (MCP)`: type `/plungeai` to filter the menu
and pick it, or run `/mcp__plungeai__plungeai` directly (the middle part is the server name you
chose in `claude mcp add`). Claude Code splits any text after the command on whitespace, one word
per argument, so only the first word would reach `request`. Run the prompt bare, then type your
request as the next message. Other clients may offer a form field for `request` instead.
- run bare (no `request`): the model is told to ask you what you want to accomplish;
- with `request` set (for example `research Tesla's Q2`, from a client that offers the field): the
model is told to handle that request now.
The prompt is a convenience, not a requirement. You can always just talk to your client normally.
`prompts/list`:
```bash
# verify
# expect: "name":"plungeai"
# expect: "request"
curl -s https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"prompts/list"}'
```
`prompts/get` returns `description: "PlungeAI MCP"` and one `user` message (type `text`). It runs
nothing, so it is free:
```bash
# verify
# expect: Now handle this request: research Tesla's Q2
# expect: plungeai_list_workflows
curl -s https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":2,"method":"prompts/get","params":{"name":"plungeai","arguments":{"request":"research Tesla'"'"'s Q2"}}}'
```
What the message tells the model:
- It now has the full platform through the `plungeai_*` tools: about 90 active agents, CNL
workflows, missions, long-term memory and execution history.
- **Discover.** "Show me my agents/workflows" means saved workflows (`plungeai_list_workflows`).
The registry (`plungeai_list_agents` with a natural-language `search`) is for building blocks.
Fetch a full card with `agent_id` before first use.
- **Execute.** `plungeai_execute_agent` (one agent, optional `session_id`), `plungeai_execute_workflow`
(saved `workflow_id` or ad-hoc CNL YAML), `plungeai_run_mission` (bounded autonomous loop with
memory).
- **Results.** `plungeai_get_result`, `plungeai_get_workflow_status` (poll async runs),
`plungeai_executions`, and `plungeai_followup` / `plungeai_continue` for finished or paused runs.
- **Approvals.** Relay any "⏸ AWAITING USER APPROVAL" or "⏸ AWAITING USER" block verbatim, never
approve on its own, then call `plungeai_continue` with `approve: true` or the user's words.
- **Build.** `plungeai_build_workflow` generates and saves a workflow. `plungeai_workflow` is direct
CRUD. `plungeai_memory` is long-term memory.
- Always pass `user_request`, the user's words verbatim.
- The last line is either `Now handle this request: ` (the argument is trimmed) or
`Ask the user what they want to accomplish.` when `request` is empty or absent.
An unknown prompt name is **rejected** with `-32602`. The SDK prefixes the message with
`MCP error -32602:`:
```bash
# verify
# expect: "code":-32602
# expect: Prompt not found: research
curl -s https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":3,"method":"prompts/get","params":{"name":"research"}}'
```
## Returned message
`prompts/get` returns one `user` message with this text (`orchestration/mcp-gateway/prompts.ts`):
```text "Returned message" [expandable]
You now have the full PlungeAI platform available through the plungeai_* tools: ~90 active agents (search, financial, documents, social, payments, automation, …), CNL YAML workflows, autonomous missions, long-term memory, and execution history.
How to work with it:
- **Discover**: "show me my agents/workflows" means the user's SAVED WORKFLOWS → plungeai_list_workflows. The registry (plungeai_list_agents, search:"" — hybrid semantic search, trust the ranking; fetch a full card with agent_id before first use) is the capability catalog of building-block agents — use it when the user says registry/discovery, or when composing workflows.
- **Execute**: plungeai_execute_agent (one agent, optional session_id for conversations), plungeai_execute_workflow (saved workflow_id or ad-hoc CNL YAML — sequential, parallel, dynamic, batch), plungeai_run_mission (bounded autonomous loop with memory).
- **Results**: plungeai_get_result and plungeai_get_workflow_status (poll async runs); plungeai_executions for history; plungeai_followup / plungeai_continue to keep talking to a finished or paused run.
- **Approvals (HITL)**: if a result or status ends with "⏸ AWAITING USER APPROVAL" or "⏸ AWAITING USER", relay it to the user verbatim and ask them to decide (e.g. "Approve? yes/no") — never approve on your own — then plungeai_continue with the execution_id and approve: true or message: "".
- **Build**: plungeai_build_workflow generates and saves a workflow from a goal; plungeai_workflow is direct CRUD. plungeai_memory for long-term memory.
- Always pass user_request (the user's words, verbatim) on every call.
Ask the user what they want to accomplish.
```
With `request` set, the last line reads `Now handle this request: ` instead.
# initialize
Source: https://docs-preview.plungeai.com/mcp-reference/protocol/initialize
Opens a conversation: the server answers with the negotiated protocol version, its identity, its capabilities and the `instructions` text your client adds to the model's context. Support: **supported**. Each request stands alone, so `tools/list` and `tools/call` also work without a prior `initialize`.
## Params
| Param | Type | Required | Description |
|---|---|---|---|
| `protocolVersion` | string | yes | The revision your client speaks. `2025-11-25`, `2025-06-18`, `2025-03-26`, `2024-11-05` and `2024-10-07` are answered with that version; anything else gets `2025-11-25` |
| `capabilities` | object | yes | Your client capabilities; `{}` is fine |
| `clientInfo` | object | yes | `{ "name", "version" }` of your client |
## Result
| Field | Value |
|---|---|
| `protocolVersion` | The negotiated version |
| `serverInfo` | `{ "name": "plungeai.com", "version": "2.5.1" }`; the version moves with deploys |
| `capabilities` | `logging: {}`, `resources: {}`, `prompts: {}`, `tools: { listChanged: true }`; the stateless server never sends `list_changed` |
| `instructions` | The server-level usage guide for the model |
## Example
```bash Request
curl -s https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl","version":"1"}}}'
```
```json Response
{"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2025-11-25","capabilities":{"logging":{},"resources":{},"prompts":{},"tools":{"listChanged":true}},"serverInfo":{"name":"plungeai.com","version":"2.5.1"},"instructions":"…"}}
```
The response above is abridged: the long `instructions` string is shortened to `…`.
## Errors
Protocol errors mean the request never reached a tool; the body is `{"jsonrpc":"2.0","error":{"code":…,"message":"…"},"id":…}`.
| HTTP | Code | When |
|---|---|---|
| 200 | `-32602` | `Invalid params: ` for malformed params, for example a numeric `protocolVersion` and no `clientInfo` |
| 400 | `-32600` | A batch that holds `initialize` together with other messages |
| 401 | `-32001` | No key, or a wrong, revoked or expired key, or a bearer that does not start with `ozk_` |
The full table is on the [MCP Reference overview](/mcp-reference/overview#errors).
## notifications/initialized
After `initialize` your client sends `notifications/initialized`. It has no `id`, so the server answers `202 Accepted` with an empty body.
```bash
curl -s -o /dev/null -w '%{http_code}\n' https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","method":"notifications/initialized"}'
```
# tools/list
Source: https://docs-preview.plungeai.com/mcp-reference/protocol/tools-list
Returns the 20 `plungeai_*` tools in catalog order, or only the tools your key is fenced to. Support: **supported**; there is no pagination, so no `nextCursor` comes back and a `cursor` param is ignored.
## Params
| Param | Type | Required | Description |
|---|---|---|---|
| `cursor` | string | no | Ignored: the full list comes back every time |
## Result
| Field | Value |
|---|---|
| `tools[]` | One entry per tool: `name`, `description` and `inputSchema` (JSON Schema) |
| `tools[].annotations` | `{ "readOnlyHint": true }` on the six read-only tools; the other 14 carry no annotations |
| `tools[].outputSchema` | On seven tools: the outcome envelope on six, the status object on `plungeai_get_workflow_status` |
## Example
```bash Request
curl -s https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
```
```json Response
{"jsonrpc":"2.0","id":2,"result":{"tools":[{"name":"plungeai_whoami","description":"…","inputSchema":{"type":"object","properties":{"user_request":{"type":"string"},"format":{"type":"string","enum":["markdown","json"]}}},"annotations":{"readOnlyHint":true}}]}}
```
The response above is abridged to one of the 20 entries, and its `description` string is shortened to `…`. The exact schemas are in [/mcp-tools.json](/mcp-tools.json) and on each [tool page](/mcp-reference/tools/plungeai_whoami).
## Errors
Protocol errors mean the request never reached a tool; the body is `{"jsonrpc":"2.0","error":{"code":…,"message":"…"},"id":…}`.
| HTTP | Code | When |
|---|---|---|
| 401 | `-32001` | No key, or a wrong, revoked or expired key, or a bearer that does not start with `ozk_` |
The full table is on the [MCP Reference overview](/mcp-reference/overview#errors).
# tools/call
Source: https://docs-preview.plungeai.com/mcp-reference/protocol/tools-call
Runs one tool. Support: **supported**. The answer is a server-sent-event stream: each frame is `event: message` plus one `data:` line, progress notifications come first, and the last frame is the JSON-RPC response.
## Params
| Param | Type | Required | Description |
|---|---|---|---|
| `name` | string | yes | The tool name, for example `plungeai_whoami` |
| `arguments` | object | yes | The tool's arguments; always include `user_request`, the user's own words |
| `_meta.progressToken` | string or number | no | When set, progress arrives as `notifications/progress`; without it, as `notifications/message` at level `info` |
## Result
| Field | Value |
|---|---|
| `content[]` | `[{ "type": "text", "text": "…" }]`: Markdown by default, JSON text with `format: "json"` |
| `structuredContent` | The same answer as an object on tools with an output schema, or with `format: "json"` |
| `isError` | `true` only for an `error` outcome |
## Example
```bash Request
curl -s https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"plungeai_whoami","arguments":{"user_request":"who am I"}}}'
```
```text Response
event: message
data: {"result":{"content":[{"type":"text","text":"# Who am I\n…"}]},"jsonrpc":"2.0","id":3}
```
The response above is abridged: the tool's Markdown text is shortened to `…`.
Four tools accept `mode: "async"` and answer at once with an execution id; poll `plungeai_get_workflow_status`, then read the output with `plungeai_get_result`. A pre-screen answer (unknown or fenced tool, bad arguments) and every edge error come back as plain JSON, so check `Content-Type` before parsing.
## Errors
Protocol errors mean the request never reached a tool; the body is `{"jsonrpc":"2.0","error":{"code":…,"message":"…"},"id":…}`.
| HTTP | Code | When |
|---|---|---|
| 200 | `-32602` | `Tool not found: `, or `Tool not permitted for this key: ` for a fenced key |
| 401 | `-32001` | No key, or a wrong, revoked or expired key, or a bearer that does not start with `ozk_` |
| 429 | `-32000` | Rate limit reached (counted on `tools/call` only); `Retry-After` and `error.data.retryAfter` give the seconds |
The full table is on the [MCP Reference overview](/mcp-reference/overview#errors).
# resources/list
Source: https://docs-preview.plungeai.com/mcp-reference/protocol/resources-list
Returns the five fixed `plungeai://` resources. Support: **supported**.
## Params
None: send `"params": {}` or leave `params` out.
## Result
| Field | Value |
|---|---|
| `resources[].uri` | `plungeai://agents/list`, `plungeai://agents/categories`, `plungeai://personas/list`, `plungeai://workflows/list`, `plungeai://docs/workflow-authoring` |
| `resources[].name` | PlungeAI Agents, Agent Categories, Personas, Your Workflows, Workflow Authoring Guide |
| `resources[].mimeType` | `text/markdown` for all five |
## Example
```bash Request
curl -s https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":4,"method":"resources/list"}'
```
```json Response
{"jsonrpc":"2.0","id":4,"result":{"resources":[{"uri":"plungeai://agents/list","name":"PlungeAI Agents","description":"Live agent registry (markdown)","mimeType":"text/markdown"}]}}
```
The response above is abridged to one of the five entries; every resource has its own page under [Resources](/mcp-reference/resources/agents-list).
## Errors
Protocol errors mean the request never reached a tool; the body is `{"jsonrpc":"2.0","error":{"code":…,"message":"…"},"id":…}`.
| HTTP | Code | When |
|---|---|---|
| 401 | `-32001` | No key, or a wrong, revoked or expired key, or a bearer that does not start with `ozk_` |
The full table is on the [MCP Reference overview](/mcp-reference/overview#errors).
# resources/templates/list
Source: https://docs-preview.plungeai.com/mcp-reference/protocol/resources-templates-list
Returns the three URI templates for resources addressed by a parameter. Support: **supported**.
## Params
None: send `"params": {}` or leave `params` out.
## Result
| Field | Value |
|---|---|
| `resourceTemplates[].uriTemplate` | `plungeai://agents/{category}`, `plungeai://workflows/{id}`, `plungeai://executions/{id}` |
| `resourceTemplates[].name` | Agents by category, Workflow YAML by id, Execution result by id |
| `resourceTemplates[].mimeType` | `text/markdown`, `text/yaml`, `text/markdown` |
## Example
```bash Request
curl -s https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":5,"method":"resources/templates/list"}'
```
```json Response
{"jsonrpc":"2.0","id":5,"result":{"resourceTemplates":[{"uriTemplate":"plungeai://agents/{category}","name":"Agents by category","mimeType":"text/markdown"},{"uriTemplate":"plungeai://workflows/{id}","name":"Workflow YAML by id","mimeType":"text/yaml"},{"uriTemplate":"plungeai://executions/{id}","name":"Execution result by id","mimeType":"text/markdown"}]}}
```
## Errors
Protocol errors mean the request never reached a tool; the body is `{"jsonrpc":"2.0","error":{"code":…,"message":"…"},"id":…}`.
| HTTP | Code | When |
|---|---|---|
| 401 | `-32001` | No key, or a wrong, revoked or expired key, or a bearer that does not start with `ozk_` |
The full table is on the [MCP Reference overview](/mcp-reference/overview#errors).
# resources/read
Source: https://docs-preview.plungeai.com/mcp-reference/protocol/resources-read
Reads one resource or template instance. Support: **supported**.
## Params
| Param | Type | Required | Description |
|---|---|---|---|
| `uri` | string | yes | A static URI or a filled-in template, for example `plungeai://agents/categories` |
## Result
| Field | Value |
|---|---|
| `contents[]` | One entry: `{ "uri", "mimeType", "text" }` |
## Example
```bash Request
curl -s https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":6,"method":"resources/read","params":{"uri":"plungeai://agents/categories"}}'
```
```json Response
{"jsonrpc":"2.0","id":6,"result":{"contents":[{"uri":"plungeai://agents/categories","mimeType":"text/markdown","text":"…"}]}}
```
The response above is abridged: the resource's Markdown `text` is shortened to `…`.
## Errors
Protocol errors mean the request never reached a tool; the body is `{"jsonrpc":"2.0","error":{"code":…,"message":"…"},"id":…}`.
| HTTP | Code | When |
|---|---|---|
| 200 | `-32002` | `MCP error -32002: Resource not found: `; also `Workflow not found` and `Execution not found` for the two id templates |
| 200 | `-32603` | `Registry error ` when the registry behind an agent, category or persona resource fails, or a missing `uri` |
| 401 | `-32001` | No key, or a wrong, revoked or expired key, or a bearer that does not start with `ozk_` |
The full table is on the [MCP Reference overview](/mcp-reference/overview#errors).
# prompts/list
Source: https://docs-preview.plungeai.com/mcp-reference/protocol/prompts-list
Returns the one prompt, `plungeai`. Support: **supported**. In Claude Code it appears as `/plungeai:plungeai (MCP)`.
## Params
None: send `"params": {}` or leave `params` out.
## Result
| Field | Value |
|---|---|
| `prompts[].name` | `plungeai` |
| `prompts[].title` | `PlungeAI` |
| `prompts[].description` | `PlungeAI MCP` |
| `prompts[].arguments` | One: `request` (optional), "What you want to accomplish (optional)" |
## Example
```bash Request
curl -s https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":7,"method":"prompts/list"}'
```
```json Response
{"jsonrpc":"2.0","id":7,"result":{"prompts":[{"name":"plungeai","title":"PlungeAI","description":"PlungeAI MCP","arguments":[{"name":"request","description":"What you want to accomplish (optional)","required":false}]}]}}
```
## Errors
Protocol errors mean the request never reached a tool; the body is `{"jsonrpc":"2.0","error":{"code":…,"message":"…"},"id":…}`.
| HTTP | Code | When |
|---|---|---|
| 401 | `-32001` | No key, or a wrong, revoked or expired key, or a bearer that does not start with `ozk_` |
The full table is on the [MCP Reference overview](/mcp-reference/overview#errors).
# prompts/get
Source: https://docs-preview.plungeai.com/mcp-reference/protocol/prompts-get
Returns the prompt's message. Support: **supported**. It runs nothing, so it is free.
## Params
| Param | Type | Required | Description |
|---|---|---|---|
| `name` | string | yes | `plungeai` |
| `arguments.request` | string | no | What the user wants; without it the message tells the model to ask |
## Result
| Field | Value |
|---|---|
| `description` | `PlungeAI MCP` |
| `messages[]` | One `user` message of type `text`, ending with `Now handle this request: ` or `Ask the user what they want to accomplish.` |
## Example
```bash Request
curl -s https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":8,"method":"prompts/get","params":{"name":"plungeai","arguments":{"request":"summarise my last run"}}}'
```
```json Response
{"jsonrpc":"2.0","id":8,"result":{"description":"PlungeAI MCP","messages":[{"role":"user","content":{"type":"text","text":"…Now handle this request: summarise my last run"}}]}}
```
The response above is abridged: the start of the prompt text is shortened to `…`; only its last sentence is shown.
## Errors
Protocol errors mean the request never reached a tool; the body is `{"jsonrpc":"2.0","error":{"code":…,"message":"…"},"id":…}`.
| HTTP | Code | When |
|---|---|---|
| 200 | `-32602` | `MCP error -32602: Prompt not found: ` |
| 401 | `-32001` | No key, or a wrong, revoked or expired key, or a bearer that does not start with `ozk_` |
The full table is on the [MCP Reference overview](/mcp-reference/overview#errors).
# ping
Source: https://docs-preview.plungeai.com/mcp-reference/protocol/ping
A liveness check. Support: **supported**.
## Params
None: send `"params": {}` or leave `params` out.
## Result
| Field | Value |
|---|---|
| `result` | `{}` |
## Example
```bash Request
curl -s https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":9,"method":"ping"}'
```
```json Response
{"jsonrpc":"2.0","id":9,"result":{}}
```
## Errors
Protocol errors mean the request never reached a tool; the body is `{"jsonrpc":"2.0","error":{"code":…,"message":"…"},"id":…}`.
| HTTP | Code | When |
|---|---|---|
| 401 | `-32001` | No key, or a wrong, revoked or expired key, or a bearer that does not start with `ozk_` |
The full table is on the [MCP Reference overview](/mcp-reference/overview#errors).
# logging/setLevel
Source: https://docs-preview.plungeai.com/mcp-reference/protocol/logging-set-level
Support: **partial**. The server answers `{}`, but each request gets a fresh server instance, so the level is not applied to later calls. Progress fallback lines are always sent at level `info`.
## Params
| Param | Type | Required | Description |
|---|---|---|---|
| `level` | string | yes | An MCP logging level, for example `info` |
## Result
| Field | Value |
|---|---|
| `result` | `{}` |
## Example
```bash Request
curl -s https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":10,"method":"logging/setLevel","params":{"level":"info"}}'
```
```json Response
{"jsonrpc":"2.0","id":10,"result":{}}
```
## Errors
Protocol errors mean the request never reached a tool; the body is `{"jsonrpc":"2.0","error":{"code":…,"message":"…"},"id":…}`.
| HTTP | Code | When |
|---|---|---|
| 401 | `-32001` | No key, or a wrong, revoked or expired key, or a bearer that does not start with `ozk_` |
The full table is on the [MCP Reference overview](/mcp-reference/overview#errors).
# Get balance
Source: https://docs-preview.plungeai.com/account-api/balance/get-balance
Planned: not available yet. Tracked as TI-02.
Dashboard view, not an API.
## What this will do
A key-authenticated route will return the wallet balance. Today **Dashboard → One API → Billing** shows the wallet balance, lifetime top-ups and spend, the auto-recharge setting, the account status and trial allowance, and the saved card (brand and last four digits).
## Use this today
Top up the wallet and see spend in Dashboard → One API → Billing.
# Add to balance
Source: https://docs-preview.plungeai.com/account-api/balance/add-to-balance
Planned: not available yet. Tracked as TI-02.
Dashboard view, not an API.
## What this will do
A key-authenticated route will add funds to the wallet. Today a top-up in **Dashboard → One API → Billing** opens a Stripe Checkout page; amounts run from 5 to 10,000 USD.
## Use this today
Top up the wallet and see spend in Dashboard → One API → Billing.
# Create key
Source: https://docs-preview.plungeai.com/account-api/keys/create-key
Planned: not available yet. Tracked as TI-01.
Dashboard view, not an API.
## What this will do
In **Dashboard → One API → Keys** you name a key (1 to 64 characters), pick an expiry (never, 7, 30, 90, 180 or 365 days) and copy the secret, which is shown once. At most 25 keys can be active. A new key takes the account's tier. Model keys (`sk-ocean-`) and connector keys (`sk-conn-`) are created in the Dashboard too; Authentication says which key each plane takes.
## Use this today
Create and revoke keys in the Dashboard.
The three key prefixes and which routes accept which key.
# Delete key
Source: https://docs-preview.plungeai.com/account-api/keys/delete-key
Planned: not available yet. Tracked as TI-01.
Dashboard view, not an API.
## What this will do
A key-authenticated route will revoke a key. Today you revoke a key in **Dashboard → One API → Keys**; revocation takes effect within about a minute.
## Use this today
Create and revoke keys in the Dashboard.
# Get usage
Source: https://docs-preview.plungeai.com/account-api/usage/get-usage
Planned: not available yet. Tracked as TI-03.
Dashboard view, not an API.
## What this will do
A key-authenticated route will return usage and cost. Today **Dashboard → One API → Requests** and **Billing** show runs, tokens and cost, grouped by user, workflow, model or channel, over 7, 30 or 90 days, for you and your connected users. Per-run cost is in traces.
## Use this today
Top up the wallet and see spend in Dashboard → One API → Billing.
Read per-run cost from traces.
# Who am I
Source: https://docs-preview.plungeai.com/account-api/identity/whoami
Available now over MCP; a REST route is tracked as TI-79.
Read the identity behind your key: the user, the auth type and tier, the key label and id, and the current rate-limit window. It is the `plungeai_whoami` tool of the MCP server, so any MCP client can call it, and it is read-only.
## Endpoint
```text
POST https://mcp.plungeai.com/v1 · tools/call · name: plungeai_whoami
```
## Authorizations
`Authorization: Bearer $PLUNGE_API_KEY` or `X-API-Key: $PLUNGE_API_KEY`, an `ozk_` key from **Dashboard → One API → Keys**. The call counts toward your rate limit, so the window it reports includes it.
## Arguments
The user's words, up to 4,000 characters. Optional.
`markdown` or `json`. `json` returns the fields below as a JSON document and as `structuredContent`.
## Output
With `format: "markdown"` (the default) the text starts with `# Who am I` and lists User, Auth (type and tier), Key (label and key id), Rate window (`/min used · /day used`, left out when the counter cannot be read) and Server. With `format: "json"`:
Your user id.
How the request authenticated, `api-key` for an `ozk_` key.
The key's tier: `free`, `pro` or `enterprise`, or `null` when the key carries none.
The name you gave the key in the Dashboard, or `null` when it has none.
The key's id, or `null` when it is not known.
`{ "minute_used", "day_used" }` for the current windows, or `null` when the counter cannot be read.
The server name and host, `plungeai.com (mcp.plungeai.com)`.
## Example
```python Python
import json, os, requests
r = requests.post(
"https://mcp.plungeai.com/v1",
headers={
"Authorization": f"Bearer {os.environ['PLUNGE_API_KEY']}",
"Content-Type": "application/json",
"Accept": "application/json, text/event-stream",
},
json={"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "plungeai_whoami", "arguments": {"user_request": "who am I?", "format": "json"}}},
)
frames = [line[len("data: "):] for line in r.text.splitlines() if line.startswith("data: ")]
print(json.loads(frames[-1])["result"]["structuredContent"])
```
```typescript TypeScript
import { Client } from '@modelcontextprotocol/sdk/client/index.js'
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js'
const transport = new StreamableHTTPClientTransport(new URL('https://mcp.plungeai.com/v1'), {
requestInit: { headers: { Authorization: `Bearer ${process.env.PLUNGE_API_KEY}` } },
})
const client = new Client({ name: 'whoami-example', version: '1.0.0' })
await client.connect(transport)
const result = await client.callTool({ name: 'plungeai_whoami', arguments: { user_request: 'who am I?' } })
console.log(result.content)
```
```bash cURL
curl -s https://mcp.plungeai.com/v1 \
-H "Authorization: Bearer $PLUNGE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"plungeai_whoami","arguments":{"user_request":"who am I?"}}}'
```
Result shape, Markdown form (the field layout of the tool reference; every value is a placeholder):
```markdown
# Who am I
- **User:** `00000000-0000-4000-8000-000000000005`
- **Auth:** api-key · tier **free**
- **Key:** my-laptop (`00000000-0000-4000-8000-000000000008`)
- **Rate window:** 1/min used · 12/day used
- **Server:** plungeai.com (mcp.plungeai.com)
```
Result shape, JSON form (`format: "json"`, the `structuredContent`; every value is a placeholder):
```json
{
"user": "00000000-0000-4000-8000-000000000005",
"auth_type": "api-key",
"tier": "free",
"key_label": "my-laptop",
"key_id": "00000000-0000-4000-8000-000000000008",
"rate_window": { "minute_used": 1, "day_used": 12 },
"server": "plungeai.com (mcp.plungeai.com)"
}
```
The same tool is documented field by field on [plungeai_whoami](/mcp-reference/tools/plungeai_whoami).
# Agent Skills
Source: https://docs-preview.plungeai.com/skills
## Install
[Download all skills (zip)](https://skills.plungeai.com/plungeai-agent-skills.zip)
The public repository is publishing soon — until then, download a zip from any skill below.
## Browse
All (31) · [Start here (4)](#start-here) · [Capability (12)](#capability) · [In your tool (12)](#in-your-tool) · [Studio kinds (3)](#studio-kinds)
## Start here
Picks the right PlungeAI entry point before you write anything — the MCP server (https://mcp.plungeai.com/v1) for live agent operation, the One API (https://api.plungeai.com) for code you write or…
[View skill](/skills/choose-your-plungeai-door) · [Download zip](https://skills.plungeai.com/choose-your-plungeai-door.zip)
Setup for the PlungeAI One API (https://api.plungeai.com) — a self-service ozk_ key, the base URL, the Bearer/X-API-Key auth header, your first curl call, the live OpenAPI 3.1 contract at…
[View skill](/skills/plungeai-api-setup) · [Download zip](https://skills.plungeai.com/plungeai-api-setup.zip)
Operate the Ocean CLI (`ocean`; package @plungeai/ocean-cli — not yet on npm, run from the Ocean-Platform repo) to drive PlungeAI from a terminal: install/setup, auth (Studio session cookie vs…
[View skill](/skills/plungeai-cli-setup) · [Download zip](https://skills.plungeai.com/plungeai-cli-setup.zip)
Connect and operate the PlungeAI MCP server (https://mcp.plungeai.com/v1) — endpoint and Bearer ozk_/X-API-Key auth, a generic MCP client config (native remote/HTTP, or the mcp-remote stdio bridge)…
[View skill](/skills/plungeai-mcp-setup) · [Download zip](https://skills.plungeai.com/plungeai-mcp-setup.zip)
## Capability
Run a PlungeAI registry agent: recognize the two kinds (prompt-driven vs structured tool-agents), execute a prompt-driven one sync or async (`plungeai_execute_agent` MCP / `POST…
[View skill](/skills/plungeai-agents) · [Download zip](https://skills.plungeai.com/plungeai-agents.zip)
Run a list to completion on PlungeAI: the campaign ledger (claim/complete/fail/retry over data-table-agent), the campaign-config block (list source, cycle, cadence, retries, delivery), and how a…
[View skill](/skills/plungeai-campaigns) · [Download zip](https://skills.plungeai.com/plungeai-campaigns.zip)
Find the right thing on PlungeAI's live registry before building anything: agents, structured tools, models, skills, personas, connectors, and saved workflow templates, via hybrid semantic + keyword…
[View skill](/skills/plungeai-discovery) · [Download zip](https://skills.plungeai.com/plungeai-discovery.zip)
Read and write PlungeAI's per-user long-term memory (plungeai_memory: recall/remember/search_runs/get_run) and distill a session into a reusable skill with plungeai_learn — distinct from…
[View skill](/skills/plungeai-memory) · [Download zip](https://skills.plungeai.com/plungeai-memory.zip)
Run bounded autonomous PlungeAI agent missions (type: harness) — a goal, a tool fence, an iteration cap, and self-checked success criteria, via plungeai_run_mission or a harness workflow task.
[View skill](/skills/plungeai-missions) · [Download zip](https://skills.plungeai.com/plungeai-missions.zip)
Model routing on PlungeAI: how agents/workflows/missions resolve a model through the platform's provider factory (`model`/`provider` fields on a task or mission), and the separate OpenAI-compatible…
[View skill](/skills/plungeai-models) · [Download zip](https://skills.plungeai.com/plungeai-models.zip)
THE PlungeAI (Ocean) platform capability map: a growing live registry of agents and structured tools, CNL multi-agent workflows, bounded harness missions, injectable skills/plugins/experts/personas…
[View skill](/skills/plungeai-platform) · [Download zip](https://skills.plungeai.com/plungeai-platform.zip)
Debug and observe PlungeAI runs: live SSE events, plungeai_get_workflow_status / plungeai_executions history, persisted GET /v1/traces/{id} spans and gateway request cost, the HITL conversation loop…
[View skill](/skills/plungeai-results-traces) · [Download zip](https://skills.plungeai.com/plungeai-results-traces.zip)
Cron-schedule PlungeAI workflows, agent queries, pre-built agent cards, and condition-watching heartbeats via plungeai_schedule, with full run history and retries.
[View skill](/skills/plungeai-scheduling) · [Download zip](https://skills.plungeai.com/plungeai-scheduling.zip)
Declare and understand PlungeAI's capability-injection fields on a type: harness task or plungeai_run_mission — skills, experts, persona, backgrounds, plugins, and MCP servers — including…
[View skill](/skills/plungeai-skills-plugins) · [Download zip](https://skills.plungeai.com/plungeai-skills-plugins.zip)
Call PlungeAI structured tool-agents with typed parameters against a published invocation contract: fetch the contract (`plungeai_get_tool_contract` / `GET /v1/tools/{id}`), execute with typed…
[View skill](/skills/plungeai-tools-connectors) · [Download zip](https://skills.plungeai.com/plungeai-tools-connectors.zip)
Build, validate, test, and save PlungeAI (Ocean Studio) workflows in CNL YAML.
[View skill](/skills/plungeai-workflows) · [Download zip](https://skills.plungeai.com/plungeai-workflows.zip)
## In your tool
Connect Bolt.new to PlungeAI (Ocean Studio) over MCP — the Connectors → Custom MCP server form, the all-tools/all-projects toggle behavior, keeping the shipped app's key server-side, and a…
[View skill](/skills/plungeai-in-bolt) · [Download zip](https://skills.plungeai.com/plungeai-in-bolt.zip)
Connect claude.ai web or Claude Desktop to PlungeAI (Ocean Studio) — Desktop live tools via the mcp-remote bridge in claude_desktop_config.json (OAuth isn't available yet, hence the bridge)…
[View skill](/skills/plungeai-in-claude-ai) · [Download zip](https://skills.plungeai.com/plungeai-in-claude-ai.zip)
Connect the Claude Code CLI to PlungeAI (Ocean Studio) over MCP — 'claude mcp add' one-liner, project-scoped .mcp.json with an env-var key, the skills/plugin install path, and a plungeai_whoami +…
[View skill](/skills/plungeai-in-claude-code) · [Download zip](https://skills.plungeai.com/plungeai-in-claude-code.zip)
Connect OpenAI Codex CLI to PlungeAI (Ocean Studio) over MCP — native streamable-HTTP in ~/.codex/config.toml (env-var or static bearer token), the codex mcp add terminal command, the mcp-remote…
[View skill](/skills/plungeai-in-codex) · [Download zip](https://skills.plungeai.com/plungeai-in-codex.zip)
Connect Cursor to PlungeAI (Ocean Studio) over MCP — the one-click install-page deeplink or a ~/.cursor/mcp.json entry, Agent/Plan-mode tool behavior, the ~40-tool cap, and a plungeai_whoami +…
[View skill](/skills/plungeai-in-cursor) · [Download zip](https://skills.plungeai.com/plungeai-in-cursor.zip)
Connect Gemini CLI to PlungeAI (Ocean Studio) over MCP — a ~/.gemini/settings.json entry using httpUrl (not url, which is SSE-only and 405s), the mcp-remote bridge fallback, /mcp reload after edits…
[View skill](/skills/plungeai-in-gemini-cli) · [Download zip](https://skills.plungeai.com/plungeai-in-gemini-cli.zip)
Connect Lovable to PlungeAI (Ocean Studio) — a personal chat connector (any plan) so Lovable's chat can operate PlungeAI via MCP while building, and a workspace-admin app connector so shipped apps…
[View skill](/skills/plungeai-in-lovable) · [Download zip](https://skills.plungeai.com/plungeai-in-lovable.zip)
Connect OpenCode to PlungeAI (Ocean Studio) over MCP — an opencode.json mcp.plungeai entry with type: remote, {env:VAR} variable substitution for a committed project config, and a plungeai_whoami +…
[View skill](/skills/plungeai-in-opencode) · [Download zip](https://skills.plungeai.com/plungeai-in-opencode.zip)
Connect Replit Agent to PlungeAI (Ocean Studio) over MCP — the one-click install-page link, the Integrations → MCP Servers form, keeping the Agent's MCP key separate from a deployed app's Replit…
[View skill](/skills/plungeai-in-replit) · [Download zip](https://skills.plungeai.com/plungeai-in-replit.zip)
Connect v0 (Vercel) to PlungeAI (Ocean Studio) over MCP — the + menu → MCPs form, why the generated Next.js app must call PlungeAI through a server Route Handler (v0 apps can't call MCP directly)…
[View skill](/skills/plungeai-in-v0) · [Download zip](https://skills.plungeai.com/plungeai-in-v0.zip)
Connect VS Code (GitHub Copilot agent mode) to PlungeAI (Ocean Studio) over MCP — the code --add-mcp CLI command, a committed-safe .vscode/mcp.json with an input-prompted key, the…
[View skill](/skills/plungeai-in-vscode) · [Download zip](https://skills.plungeai.com/plungeai-in-vscode.zip)
Connect Windsurf (Cascade) to PlungeAI (Ocean Studio) over MCP — a ~/.codeium/windsurf/mcp_config.json entry using serverUrl, the mcp-remote bridge fallback for stdio-only builds, the 100-tool cap…
[View skill](/skills/plungeai-in-windsurf) · [Download zip](https://skills.plungeai.com/plungeai-in-windsurf.zip)
## Studio kinds
Design and emit ONE bounded agentic agent for PlungeAI (Ocean Studio) as a single `type: harness` mission — purpose, allowed_tools fence, permissions gates (deny/ask), skills/plugins/MCP/persona…
[View skill](/skills/plungeai-agentic-agent) · [Download zip](https://skills.plungeai.com/plungeai-agentic-agent.zip)
Design and emit ONE PlungeAI (Ocean Studio) bot agent — a scheduled, unattended `type: harness` mission that reports to the user's channels (in-app, email, Slack, Telegram, WhatsApp, Discord) — as…
[View skill](/skills/plungeai-bot-agent) · [Download zip](https://skills.plungeai.com/plungeai-bot-agent.zip)
Design and emit ONE PlungeAI (Ocean Studio) campaign agent — a long-running, list-driven, resumable agent that works an owned ledger of items in short scheduled runs until the current cycle is…
[View skill](/skills/plungeai-campaign-agent) · [Download zip](https://skills.plungeai.com/plungeai-campaign-agent.zip)
# choose-your-plungeai-door
Source: https://docs-preview.plungeai.com/skills/choose-your-plungeai-door
Picks the right PlungeAI entry point before you write anything — the MCP server (https://mcp.plungeai.com/v1) for live agent operation, the One API (https://api.plungeai.com) for code you write or generate, the Ocean CLI for a terminal or CI workflow, or Ocean Studio for a human building visually — and names the setup or capability skill to load next. Use when the user asks which PlungeAI door, API, or interface to use, says "how do I use PlungeAI", "what's the difference between the MCP server and the One API", asks "does PlungeAI have a CLI/SDK/UI", or is choosing between MCP, REST, CLI, and Studio before writing any code. For the mechanics once a door is picked, use `plungeai-mcp-setup` (MCP), `plungeai-api-setup` (REST/codegen), or `plungeai-cli-setup` (terminal); for wiring a specific coding tool's agent to PlungeAI use `plungeai-in-`; the full capability map lives in `plungeai-platform`.
[Download zip](https://skills.plungeai.com/choose-your-plungeai-door.zip) · [View raw SKILL.md](https://skills.plungeai.com/choose-your-plungeai-door/SKILL.md)
PlungeAI (internally "Ocean") is a Cloudflare-native agent runtime: every agent, tool, and
workflow runs as a deployed edge service. There is no local mode — everything you execute
runs on the deployed platform, and everything you read (catalogs, contracts, results) is
live. You reach it through one of four doors, all backed by the same identity and the same
data (a workflow saved through one door appears in every other door and in Studio).
## The four doors
| Door | What it is | Use it when |
|---|---|---|
| **MCP server** — `https://mcp.plungeai.com/v1` | The `plungeai_*` tool suite over MCP (Streamable HTTP) | You are an AI agent operating the platform live in a chat/agent context: discover, execute, save, schedule, remember. The richest surface — structured outcomes, approvals, continuations. |
| **One API** — `https://api.plungeai.com` | REST gateway, OpenAPI 3.1 at `GET /v1/openapi.json` | You are writing or GENERATING code that calls PlungeAI: apps, scripts, backends, CI jobs, SDK wrappers. |
| **Ocean CLI** — `ocean` | Terminal client (not yet on npm — install from the Ocean-Platform repo, or your administrator's build) | A human (or a script) works from a shell or CI pipeline: auth, doctor, running saved flows, scheduling. |
| **Ocean Studio** | Browser app at `https://studio.plungeai.com` | A human builds/edits workflows visually, reviews runs, connects OAuth credentials, configures schedules — anything a door refuses (credential connect, OAuth, visual editing). |
## Rules of thumb
- **Operating live from a chat/agent context → MCP.** One tool call per intent; the platform
renders final user-ready markdown — relay it verbatim. Setup: `plungeai-mcp-setup`.
Full guide: https://mcp.plungeai.com/docs#0-overview
- **Generating code for a user's project → One API.** Point codegen at
`GET /v1/openapi.json`; never invent routes. Setup: `plungeai-api-setup`.
- **A human or CI script driving a terminal → Ocean CLI.** Setup: `plungeai-cli-setup`.
- **Anything a door refuses (credential connect, OAuth, visual editing) → send the user to
Ocean Studio.** No skill needed — it's a browser app.
- **Connecting a *specific* coding tool's agent** (Cursor, VS Code, Claude Code, Codex,
Windsurf, Replit, Gemini CLI, OpenCode, Lovable, Bolt, v0, …) rather than deciding which
door in the abstract → jump straight to that tool's `plungeai-in-` skill; it tells
you which door that tool uses and gives the exact config.
- Same identity behind every door: an `ozk_` key on MCP and the One API, a Studio session
cookie (or the same `ozk_` key for key-side verbs) on the CLI.
## Get a key first
Self-service `ozk_` keys: **Dashboard → One API → Keys** (`https://dashboard.plungeai.com`) →
create → copy it once (shown only at creation). Ask the account owner only if you need a
shared team key minted under someone else's account. The same key works on MCP and the One
API; the Ocean CLI additionally takes a Studio session cookie for its browser-only surfaces
(saved flows, schedules, registry browse).
## Which capability for which job
Once you know your door, `plungeai-platform` is the full capability map. Quick router:
- **One-shot capability call** ("search the web", "convert this PDF") → `plungeai-agents`
(prompt-driven) or `plungeai-tools-connectors` (structured, typed params).
- **Multi-step pipeline** ("research A, B, C in parallel, then synthesize") → CNL workflow,
author it with `plungeai-workflows`.
- **Open-ended goal needing judgment** ("investigate X, use whatever tools you need") → one
bounded harness mission, `plungeai-missions`.
- **"Every morning / every hour" anything** → `plungeai-scheduling`.
- **Long-running lead-gen / outreach style batches** → `plungeai-campaigns`.
- **Instruction packs injected into a run** (skills, plugins, experts, personas) →
`plungeai-skills-plugins`.
- **"Remember this" / long-term memory** → `plungeai-memory`.
- **Raw LLM inference in your own code** (chat/embeddings, model fallback) → `plungeai-models`.
- **"What can PlungeAI do" / finding an id** → `plungeai-discovery`.
- **"Why did that run fail / how long / what did it cost"** → `plungeai-results-traces`.
## Discovery first (every door, non-negotiable)
Catalogs are live — the agent registry, tool contracts, model list, and workflow inventory
change without notice. Never assert what exists from memory:
- MCP: `plungeai_list_agents {search: ""}`
- One API: `GET /v1/discovery/search?q=`, `GET /v1/agents`, the live contract at
`GET /v1/openapi.json`
- CLI: `ocean registry lookup ` / `ocean agent contract `
## Verify you're in
- **MCP:** call `plungeai_whoami` — identity card (user id, tier, key label, rate window).
- **One API:** `curl -s https://api.plungeai.com/health` (no auth) proves the router is up;
`curl -s https://api.plungeai.com/v1/agents -H "Authorization: Bearer ozk_YOUR_KEY"` proves
the key.
- **CLI:** `ocean doctor` (exit 0 = ready).
## Related skills
- `plungeai-mcp-setup` — connect and operate the MCP server.
- `plungeai-api-setup` — auth, first call, OpenAPI, codegen for the One API.
- `plungeai-cli-setup` — install, auth, full command reference for `ocean`.
- `plungeai-in-` — per-editor connect steps (Cursor, VS Code, Claude Code, Codex, …).
- `plungeai-platform` — the full capability map (agents, tools, workflows, models, missions,
scheduling, memory, skills/plugins, observability) once you're connected.
# plungeai-api-setup
Source: https://docs-preview.plungeai.com/skills/plungeai-api-setup
Setup for the PlungeAI One API (https://api.plungeai.com) — a self-service ozk_ key, the base URL, the Bearer/X-API-Key auth header, your first curl call, the live OpenAPI 3.1 contract at /v1/openapi.json, typed-client codegen (openapi-typescript, openapi-python-client, the future @plungeai/one-api), and the shared error-code/rate-limit basics. Use whenever writing or GENERATING code that calls PlungeAI, or answering "how do I authenticate", "where's the OpenAPI spec", or "how do I generate a typed client". Triggers: "PlungeAI API", "api.plungeai.com", "One API", "call plungeai from code", "plungeai openapi", "plungeai curl", "plungeai SDK". Route-by-route capability detail lives in the matching capability skill (`plungeai-models`, `plungeai-agents`, `plungeai-tools-connectors`, `plungeai-workflows`, `plungeai-discovery`, `plungeai-results-traces`) — load one next. MCP calls → `plungeai-mcp-setup`; terminal → `plungeai-cli-setup`; unsure which door → `choose-your-plungeai-door`.
[Download zip](https://skills.plungeai.com/plungeai-api-setup.zip) · [View raw SKILL.md](https://skills.plungeai.com/plungeai-api-setup/SKILL.md)
One base URL for the whole platform: **`https://api.plungeai.com`**. Plain JSON over
HTTPS — no SDK required. The models ("money") plane is OpenAI-compatible. Machine-readable
contract: `GET /v1/openapi.json` (OpenAPI 3.1). This skill gets you authenticated and making
calls; the route-by-route manual for each capability (what params, what the response looks
like, error handling per route) lives in that capability's own skill — load it next.
## Prerequisites — get a key
Self-service `ozk_` key: **Dashboard → One API → Keys** (`https://dashboard.plungeai.com`) →
create → name it, pick an expiry (never, or 7–365 days) → copy it once, it is shown exactly
once and stored hashed thereafter. Ask the account owner only for a shared/team key minted
under someone else's account. Keys inherit your account's tier (free by default).
The models plane uses a **separate** key with a different prefix, minted at
**Dashboard → One API → Keys** (same page, "Model gateway keys" panel): `sk-ocean-YOUR_KEY` for `/v1/chat/completions`,
`/v1/embeddings`, `/v1/models` (see `plungeai-models`). Sending the wrong prefix to the wrong
plane is a `401`, not a silent fallback — never mix them.
## Discovery first — hard rule
The catalog is **live**. Never hardcode agent ids, tool lists, model slugs, or route shapes
from memory:
- `GET /v1/openapi.json` — the live route contract, no auth required. This is the one
authority for what routes exist; regenerate any typed client from it, never patch by hand.
- `GET /v1/agents` / `GET /v1/discovery/search?q=` — what's callable right now
(full capability detail: `plungeai-discovery`, `plungeai-agents`).
## Quick start — first call
```bash
curl -X POST https://api.plungeai.com/v1/agents/llm-agent/execute \
-H "Authorization: Bearer ozk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "Say exactly: hello ocean", "sync": true}'
```
```json
{
"content": "hello ocean",
"workflow_id": "00000000-0000-4000-8000-000000000001",
"task_id": "t1",
"request_id": "00000000-0000-4000-8000-000000000004"
}
```
That is the whole integration pattern: bearer key, JSON body, JSON result. Every other plane
(tools, workflows, models, MCP pass-through, discovery, traces) works the same shape — the
per-plane request/response detail is in that plane's capability skill.
## Authentication — header and error basics
| Key | Planes | How to send |
|---|---|---|
| `ozk_YOUR_KEY` | Execution planes: `/v1/discovery`, `/v1/tools`, `/v1/agents`, `/v1/workflows`, `/v1/mcp`, `/v1/traces` | `Authorization: Bearer ozk_YOUR_KEY` (or `X-API-Key: ozk_YOUR_KEY`) |
| `sk-ocean-YOUR_KEY` | Models plane: `/v1/chat/completions`, `/v1/embeddings`, `/v1/models` | `Authorization: Bearer sk-ocean-YOUR_KEY` |
- Never hardcode keys in generated code — read them from env vars (`PLUNGEAI_API_KEY` for
`ozk_`, `PLUNGEAI_INFERENCE_KEY` for `sk-ocean-`).
- Execution-plane errors use the envelope `{"error":{"code","message",…}}` — this includes
`/v1/discovery/recommend` and `/v1/discovery/cards/:type/:id`, which normalize the
registry's own flat `{"error":""}` rejections into the envelope before you see
them (`code` is `not_found` on a 404, `invalid_request` otherwise). The models plane
uses the OpenAI error shape (`{"error":{"message","type","code","request_id"}}`).
- Every response carries a **server-minted** `x-request-id` header. To correlate your own
calls, send **`x-trace-id`** and keep your own copy — it is not echoed back, but it is
threaded across every internal hop and queryable at `GET /v1/traces/`
(`plungeai-results-traces`).
## Error semantics — the ones every caller needs
| Status | Code | Meaning | What your code does |
|---|---|---|---|
| 401 | `unauthorized` | Missing/invalid key, or the wrong key prefix for this plane | Fix the key. Never retry in a loop |
| 403 | `refused` | **Trust fence.** The agent/tool refused the action outright — a gated/money verb, unattended surface. A policy verdict, not a lifecycle state | **FINAL. Surface verbatim. NEVER retry, rephrase, or route around** |
| 403 | `agent_not_active` | A named agent (in a workflow or a single-agent execute) is parked/inactive — a lifecycle state, distinct from `refused` above | Re-discover a fresh id (`GET /v1/discovery/search`); don't retry the same id |
| 404 | `unknown_agent` / `unknown_tool` / `workflow_not_found` | No such (or unknown) id | Re-discover; don't retry the same id |
| 404 | `not_ready` | Async result not landed yet | Poll again with backoff (2s+) |
| 409 | `approval_required` | **Trust fence.** A human must approve before the action runs — implemented and produced today, not a placeholder | Approve out-of-band (Studio, or MCP `plungeai_continue` — the One API itself has no REST `continue` route), then re-issue the identical request |
| 422 | `invalid_params` | Outcome `needs_input` — body fails the tool contract; response echoes `missing` and the full contract | Self-correct from the echoed contract, then retry once |
| 424 | `connection_required` / `credential_required` | Outcome `needs_connection` / `needs_api_key` — no connected account, or no API key for a connector | Connect the account or add the key (Ocean Studio → Connectors), then retry |
| 429 | `rate_limited` | **Execution planes** — per-tier RPM/RPD cap, or failed-auth metering | Honour the `Retry-After` header; back off |
| 429 | `rate_limit_exceeded` / `spend_cap_exceeded` / `insufficient_quota` | **Models plane only** — separate codes, separate plane; rate, spend-cap, or quota limit | Back off; caps/quotas are policy, not transients |
| 5xx | `engine_error` / `upstream_error` / `internal_error` | Upstream or router failure | One retry with backoff is reasonable |
Canonical code list (all planes, every status): `docs/guide-3.0/13-errors-limits.md` §13.2
(execution-plane codes), §13.3 (outcome→HTTP mapping), §13.5 (the two trust-fence statuses).
`403 refused` and `409 approval_required` are the fence; everything else is caller-fixable.
Sync vs async, per-route detail, and the full route list are in each capability's own skill —
this skill only carries the pattern, not the catalog.
## Rate limits
Execution-plane tiers: free 30/min · 1,000/day, pro 100/min · 10,000/day, enterprise
300/min · 100,000/day (an unset tier defaults to pro; a per-key override can replace the
per-minute cap). Enforced per-key on `POST` executions only (catalog `GET`s are free); a hit
answers `429 rate_limited` with a `Retry-After` header — honour it. The models plane has its
own, separate limiter, default 600 req/min per key, answering `429 rate_limit_exceeded` with
**no** `Retry-After` header — back off on a short fixed interval (~1s) instead. Don't hammer
result-polling endpoints; use 2s+ intervals.
## Self-documenting endpoints (no auth)
- `GET /v1/openapi.json` — OpenAPI 3.1 contract
- `GET /llms.txt` — index (llmstxt.org format) · `GET /llms-full.txt` — full guide + route
reference as one markdown payload
- `GET /docs` — human docs page
- `GET /health` — liveness
AI agents at runtime can skip HTTP entirely: connect an MCP client to
`https://mcp.plungeai.com/v1` with an `ozk_` key — see `plungeai-mcp-setup`.
## SDK and codegen
The supported path is generating a typed client from the live OpenAPI spec — there is no
hand-maintained SDK. Full snippets (TypeScript via `openapi-typescript` + `openapi-fetch`,
a minimal Python wrapper, the `@plungeai/one-api` shape for when it's published, the curl
cookbook, and a paste-ready `AGENTS.md` block for apps you generate):
[`references/sdk-and-codegen.md`](/skills/plungeai-api-setup/references/sdk-and-codegen).
## Verify
```bash
# 1. Liveness (no auth) — expect {"status":"ok","service":"one-api-router",...}
curl -s https://api.plungeai.com/health
# 2. Authenticated GET — expect {"tools":[...],"count":N}
curl -s "https://api.plungeai.com/v1/tools?limit=1" \
-H "Authorization: Bearer ozk_YOUR_KEY"
# 3. A 401 here means the key is wrong; a 200 with cards means you're in:
curl -s "https://api.plungeai.com/v1/discovery/search?q=web%20search&limit=1" \
-H "Authorization: Bearer ozk_YOUR_KEY"
```
For the models plane, verify separately with the `sk-ocean-` key:
`curl -s https://api.plungeai.com/v1/models -H "Authorization: Bearer sk-ocean-YOUR_KEY"`.
## References
- [`references/sdk-and-codegen.md`](/skills/plungeai-api-setup/references/sdk-and-codegen) — typed-client generation (TS/Python), the
`@plungeai/one-api` client shape, curl cookbook, self-documenting endpoints, the
paste-ready `AGENTS.md` block for generated apps.
## Related skills
- `plungeai-models` — the OpenAI-compatible plane in depth: routing, presets, guardrails,
caching, pricing.
- `plungeai-agents`, `plungeai-tools-connectors` — execute a registry agent or a structured
tool; contracts, sync/async, 422 handling.
- `plungeai-workflows` — CNL YAML authoring and the workflow execution routes (inline + saved,
SSE streaming).
- `plungeai-discovery` — catalog search, recommendations, cards.
- `plungeai-results-traces` — execution traces, MCP-as-server routes, results/conversation.
- `plungeai-mcp-setup` — the same platform over MCP instead of REST.
- `plungeai-cli-setup` — operate PlungeAI from a terminal.
## Reference pages
The supported integration stance, in order of preference:
# SDK & codegen — typed clients, snippets, and the AGENTS.md block
Source: https://docs-preview.plungeai.com/skills/plungeai-api-setup/references/sdk-and-codegen
The supported integration stance, in order of preference:
1. **Plain HTTPS** — every plane is JSON over HTTPS; any HTTP client works.
2. **The OpenAI SDK you already use** — for the models plane only
(`base_url = https://api.plungeai.com/v1`, `sk-ocean-` key). See the `plungeai-models`
skill.
3. **Generate your own client** from the live OpenAPI 3.1 spec — the primary typed path
today.
4. **`@plungeai/one-api`** — typed TypeScript client for the execution planes, **when
published**.
There is no hand-maintained SDK, deliberately: the OpenAPI document at
`GET /v1/openapi.json` is the contract, and everything typed is generated from it.
## Generate your own client (any language)
The spec is OpenAPI 3.1 at `https://api.plungeai.com/v1/openapi.json`. Any 3.1-capable
generator works.
**TypeScript**:
```bash
npx openapi-typescript https://api.plungeai.com/v1/openapi.json -o src/plungeai-schema.d.ts
npm install openapi-fetch
```
```ts
import createClient from 'openapi-fetch'
import type { paths } from './plungeai-schema'
export const plungeai = createClient({
baseUrl: 'https://api.plungeai.com',
headers: { Authorization: `Bearer ${process.env.PLUNGEAI_API_KEY}` },
})
```
Re-run the generator when the API changes shape — never patch generated types by hand. One
thing to know: `/v1/discovery/recommend` and `/v1/discovery/cards/{type}/{id}` normalize the
registry's own flat `{"error":""}` rejections into the standard envelope
(`{"error":{"code","message"}}`, `code` is `not_found` on a 404, `invalid_request` otherwise)
before you ever see them — a generated client's error type for these two routes is accurate
as-is, no special-casing needed.
**Python** — plain `requests` is usually enough; a minimal wrapper:
```python
import os, requests
class PlungeAI:
BASE = "https://api.plungeai.com"
def __init__(self, key: str | None = None):
self.s = requests.Session()
self.s.headers["Authorization"] = f"Bearer {key or os.environ['PLUNGEAI_API_KEY']}"
def _call(self, method: str, path: str, **kw):
r = self.s.request(method, f"{self.BASE}{path}", **kw)
if r.status_code in (403, 409):
err = r.json()["error"]
# Lifecycle refusals (parked agent / unknown card — the reason says)
# are fixable by re-discovering the id; fence refusals are FINAL.
if "registry search" in err.get("message", ""):
raise LookupError(err) # re-discover the id, then retry
raise PermissionError(err) # trust fence — final, never retry
r.raise_for_status()
return r.json()
def execute_agent(self, agent_id: str, prompt: str, sync: bool = True):
return self._call("POST", f"/v1/agents/{agent_id}/execute",
json={"prompt": prompt, "sync": sync})
def search(self, q: str, **params):
return self._call("GET", "/v1/discovery/search", params={"q": q, **params})
ai = PlungeAI()
print(ai.execute_agent("llm-agent", "Say exactly: py ok")["content"])
```
For a fully typed Python client: `openapi-python-client generate
--url https://api.plungeai.com/v1/openapi.json`.
## `@plungeai/one-api` — typed TypeScript client
**Not yet published to npm** — `npm install @plungeai/one-api` fails today; generate the
identical client yourself (previous section — it is the same two libraries). When
published, the package is generated from the live `GET /v1/openapi.json` via
[`openapi-typescript`](https://openapi-ts.dev); runtime is
[`openapi-fetch`](https://openapi-ts.dev/openapi-fetch) (~6KB). The only handwritten code is
a ~15-line `createOneApi()` factory.
```ts
import { createOneApi } from '@plungeai/one-api'
const client = createOneApi({ apiKey: process.env.PLUNGEAI_API_KEY! }) // ozk_YOUR_KEY
// GET /v1/tools — response fully typed
const { data, error } = await client.GET('/v1/tools', {
params: { query: { limit: 10 } },
})
if (data) console.log(data.count, data.tools.map(t => t.id))
// POST /v1/agents/{id}/execute — path params and body typed
const { data: exec } = await client.POST('/v1/agents/{id}/execute', {
params: { path: { id: 'llm-agent' } },
body: { prompt: 'Say exactly: sdk ok', sync: true },
})
console.log(exec?.content) // "sdk ok"
```
Schema types are exported for reuse:
```ts
import type { paths, components } from '@plungeai/one-api'
type Card = components['schemas']['Card']
```
Every `client.GET/POST/DELETE(...)` maps 1:1 to a route in the OpenAPI document. The models
plane is not this client's job — use the OpenAI SDK for that.
## curl cookbook
Agent/tool ids below (`brave-agent`, `llm-agent`) are illustrative — take real ids from the
discovery call two lines up, never from memory.
```bash
BASE=https://api.plungeai.com
AUTH='Authorization: Bearer ozk_YOUR_KEY'
curl -s $BASE/health # liveness, no auth
curl -s $BASE/v1/openapi.json | head -50 # live contract, no auth
curl -s "$BASE/v1/discovery/search?q=web%20search&limit=3" -H "$AUTH"
curl -s "$BASE/v1/tools?limit=5" -H "$AUTH"
curl -s $BASE/v1/tools/brave-agent -H "$AUTH" # contract (id from discovery)
curl -s -X POST $BASE/v1/agents/llm-agent/execute -H "$AUTH" \
-H 'Content-Type: application/json' -d '{"prompt":"Say: ok"}'
curl -s $BASE/v1/traces/REQUEST_ID_FROM_ABOVE -H "$AUTH"
```
## Self-documenting endpoints
The API teaches itself from the domain — useful for onboarding a coding agent with zero
prior context:
- `GET https://api.plungeai.com/llms.txt` — index (llmstxt.org format)
- `GET https://api.plungeai.com/llms-full.txt` — the full developer guide + route reference
as one markdown payload
- `GET https://api.plungeai.com/v1/openapi.json` — the machine contract
- `GET https://api.plungeai.com/docs` — human-readable docs page
AI agents at **runtime** can skip HTTP clients entirely: connect an MCP client to
`https://mcp.plungeai.com/v1` with an `ozk_` key (see the `plungeai-mcp-setup` skill).
## AGENTS.md block for generated apps
When you generate an app that calls PlungeAI, drop this block into the app's `AGENTS.md`
(or `CLAUDE.md`) so future coding agents in that repo handle the API correctly. Paste-ready:
```markdown
## PlungeAI One API
This app calls the PlungeAI One API at https://api.plungeai.com.
- Auth: `Authorization: Bearer $PLUNGEAI_API_KEY` (an `ozk_` platform key) for
/v1/discovery, /v1/tools, /v1/agents, /v1/workflows, /v1/mcp, /v1/traces.
The OpenAI-compatible models plane (/v1/chat/completions, /v1/embeddings,
/v1/models) uses `$PLUNGEAI_INFERENCE_KEY` (an `sk-ocean-` key) instead.
Keys live in env vars only — never commit or log them.
- Live contract: `GET /v1/openapi.json`. Live catalog: `GET /v1/agents`,
`GET /v1/discovery/search?q=...`. Never hardcode agent/tool/model ids or
counts — discover them, and re-discover on 404 `unknown_tool` /
`workflow_not_found`.
- Sync vs async: agent execute defaults to sync; `sync:false` returns 202 +
`{workflow_id, task_id}` — poll `GET /v1/agents/results/:wf/:task`
(404 `not_ready` is normal in-flight, back off 2s+).
- HARD RULE — trust fences: `403 refused` (a gated/money verb refused
outright) and `409 approval_required` (a human must approve before the
action runs — this is implemented and produced today, not a placeholder)
are both final for now — surface them to the user; never retry, rephrase,
or route around a `403 refused`. For `409`, approve out-of-band (Ocean
Studio, or MCP `plungeai_continue` — the One API alone has no REST
`continue` route) and then re-issue the identical request.
A separate, unrelated `403 agent_not_active` (a parked/inactive agent id)
is a lifecycle state, not a fence — re-discover a fresh id and retry with
that instead.
- `422 invalid_params` echoes the tool contract — self-correct once, then stop.
- Rate limits: execution-plane `429 rate_limited` carries `Retry-After` —
honour it. The models plane's separate `429 rate_limit_exceeded` has no
Retry-After — use a fixed ~1s backoff there instead.
- 502 `upstream_error` / 500 `internal_error` can come from any route —
retry once with backoff.
- Correlation: send `x-trace-id` on writes; debug via `GET /v1/traces/:id`.
- Full docs for agents: `GET https://api.plungeai.com/llms-full.txt`.
```
Keep the block verbatim except the env-var names, which should match the app's conventions.
# plungeai-cli-setup
Source: https://docs-preview.plungeai.com/skills/plungeai-cli-setup
Operate the Ocean CLI (`ocean`; package @plungeai/ocean-cli — not yet on npm, run from the Ocean-Platform repo) to drive PlungeAI from a terminal: install/setup, auth (Studio session cookie vs self-service ozk_ key and which commands need which), running saved workflows and ad-hoc CNL YAML, async runs and status polling, executions/results/exports, schedules, registry lookups, missions, memory, templates, the AI chat REPL and its slash commands, and troubleshooting with `ocean doctor`. Use when the user mentions the `ocean` command or wants PlungeAI operated from a shell or CI script. Triggers: "ocean cli", "ocean command", "plungeai cli", "@plungeai/ocean-cli", "ocean doctor", "ocean workflow run", "run plungeai from terminal", "ocean repl", "ocean shell". NOT for raw HTTP calls (`plungeai-api-setup`), plungeai_* MCP tool calls (`plungeai-mcp-setup`), authoring CNL YAML (`plungeai-workflows`), or wiring other AI tools (`plungeai-in-`).
[Download zip](https://skills.plungeai.com/plungeai-cli-setup.zip) · [View raw SKILL.md](https://skills.plungeai.com/plungeai-cli-setup/SKILL.md)
The `ocean` CLI is a **remote client** for the PlungeAI Ocean platform. All execution
happens on Cloudflare — the CLI talks HTTPS to three surfaces:
| Surface | Host | Credential |
|---|---|---|
| Studio API (flows, runs, results, schedules, registry, AI chat) | https://studio.plungeai.com | Studio session cookie |
| Gateway (ad-hoc YAML execution) | https://api.plungeai.com | API key `ozk_YOUR_KEY` |
| MCP platform verbs (whoami, memory, missions, agents, async runs) | https://mcp.plungeai.com/v1 | API key `ozk_YOUR_KEY` (Bearer) |
There is no local execution mode. Nothing to run locally except the CLI itself (the
optional local-node daemon is separate — `ocean local status`).
## Install
Current truth (per `cli/README.md`): the npm package is **not yet published** — the publish
is an owner action (tag `ocean-cli-v2.3.0`).
```bash
# Working today — from the Ocean-Platform repo root:
npm run ocean -- --help # run any command
npm link # or: put the `ocean` bin on your PATH
# Once published to npm:
npm install -g @plungeai/ocean-cli # or: npx @plungeai/ocean-cli
```
Requires Node >= 20. `ocean --version` prints the CLI version (plus platform version when
run inside the repo). Full install/config detail: [`references/auth-and-setup.md`](/skills/plungeai-cli-setup/references/auth-and-setup).
## Auth quick start
Two independent credentials — the CLI never mixes them (session cookie goes only to Studio;
API key only to Gateway/MCP):
```bash
ocean auth set-key # hidden prompt — API key (ozk_YOUR_KEY), scripting/agent verbs
ocean auth set-session # hidden prompt — Studio auth-session cookie, Studio features
ocean login # prints the full cloud auth guide (where to get both)
ocean auth status # what's configured
ocean doctor # verify every configured credential live (exit 1 on failure)
```
- **Studio session** unlocks: AI chat/REPL, saved flows, runs, results, schedules, registry.
Get it: sign in at https://studio.plungeai.com, copy the `auth-session` cookie value.
- **API key** (`ozk_YOUR_KEY`) unlocks: `workflow run-yaml`, `workflow run --async`,
`whoami`, `memory`, `templates`, `learn`, `mission`, `agent …`. Self-service: **Dashboard →
One API → Keys** (`https://dashboard.plungeai.com`) → create → copy it once.
- CI/scripts: `OCEAN_API_KEY` env var overrides the config key for the process — but any
command that saves CLI state (`workflow run`/`run --async`, `refine`, `chat`, `ocean run`,
`observatory run`) writes the merged config back and PERSISTS the env key into
`~/.ocean/config.json` (0600). On shared runners use a throwaway `HOME`
(`export HOME=$(mktemp -d)`) or finish with `ocean logout`; `whoami`, `doctor`, `run-yaml`,
`agent run`, `memory`, `mission` never save.
Full detail: [`references/auth-and-setup.md`](/skills/plungeai-cli-setup/references/auth-and-setup).
## Command overview
`ocean` with no arguments opens the AI chat REPL. Everything else is noun-grouped
subcommands (details + all flags: [`references/commands.md`](/skills/plungeai-cli-setup/references/commands)):
| Command | Purpose | Needs |
|---|---|---|
| `ocean` / `ocean chat` | AI terminal — plain-language flow builder + agentic chat | session |
| `ocean setup [--dry-run]` | Install skills for Claude Code/Cursor + custom-command dir | — |
| `ocean login` / `logout` / `auth …` | Credential management | — |
| `ocean doctor` | Live connectivity + auth checks | — |
| `ocean run ["prompt"]` | One-shot AI prompt (`--json`, `-c` continue) or interactive run | session |
| `ocean menu` | Pick-a-flow list UI (non-AI) | session |
| `ocean shell` | Command shell — subcommands at an `ocean›` prompt | session or key (TTY required) |
| `ocean workflow …` | list · show · build · create · update · edit · delete · refine · versions · restore · undo · followup · run · run-yaml | session (`run --async`: key · run-yaml: key preferred, session fallback) |
| `ocean execution …` | list · status · show · output · conversation · continue · export · versions · save-version · restore-version | session (status/output: key fallback) |
| `ocean observatory run ` | Run with live event timeline | session |
| `ocean schedule …` | overview · jobs · runs · create · get · update · delete | session |
| `ocean registry …` | Browse/search platform registry (agents, skills, mcp, models, …) | session |
| `ocean session …` | list · export — Think chat sessions | session |
| `ocean whoami` | Identity, tier, rate window | key |
| `ocean memory …` | recall · remember · search-runs (long-term memory) | key |
| `ocean templates …` | list · show · use workflow templates | key |
| `ocean learn ` | Distill URL/text into a private skill | key |
| `ocean mission ""` | Bounded autonomous agent run with memory | key |
| `ocean agent …` | run · contract · call — one registry agent as a tool | key |
| `ocean local status` | Local node daemon health | — |
## Common flows
**Run a saved flow and read the result:**
```bash
ocean workflow list --search "market" --json # find the id
ocean workflow run -i "AI startups" # live SSE stream + result
```
**Async run from a script (API key path):**
```bash
ocean workflow run --async -i "ping" # execution id immediately (only -i works with --async)
ocean execution status # poll — bounded CI skeleton: references/agent-flows.md
ocean execution output # result markdown
```
Key-only sessions get exactly `workflow run --async`, `run-yaml`, `execution status`,
`execution output` on the execution surface. `execution list/show/conversation/continue/
export` and `workflow followup` need the Studio cookie — there is no key-side continue or
export.
**Ad-hoc YAML without saving (API key):**
```bash
ocean workflow run-yaml flow.yaml -i "input text"
```
**Create → refine → run lifecycle:**
```bash
ocean workflow create "My Flow" flow.yaml --kind workflow # validated + policy-linted
ocean workflow refine "add a summary step" # AI one-shot edit
ocean workflow undo # restore pre-refine snapshot
```
**Schedule a daily agent job with Slack delivery:**
```bash
ocean schedule create "Daily brief" --type agent --target \
--prompt "summarize AI news" --cron "0 9 * * 1-5" --deliver slack:CHANNEL_ID
ocean schedule update --cron "0 8 * * 1-5" # delivery settings preserved
```
**Everything above also works conversationally:** run `ocean`, then ask in plain language or
use slash commands (`/run`, `/results`, `/schedule jobs`, …). REPL guide:
[`references/agent-flows.md`](/skills/plungeai-cli-setup/references/agent-flows).
## Discovery first — never hardcode catalogs
Agent ids, models, skills, and templates change. Always discover live:
- `ocean registry agents` (also: `twins experts skills plugins mcp models providers
connectors`) — browse categories
- `ocean registry lookup ` — one entry's card
- `ocean agent contract ` — live operations, params, credential status
- `ocean workflow list` / `--kind bot` / `--search ` — your saved flows
- `ocean templates list` — starter templates
- In the REPL: `/registry`, `/flows`, `/agent contract `
All `ocean registry …` commands need the Studio session, and category browse is TTY-only —
scripts use `ocean registry lookup ` (plain list, up to 20 matches). With only an API
key there is no CLI verb that lists agents: discover via the One API
(`curl -sH "X-API-Key: $OCEAN_API_KEY"
'https://api.plungeai.com/v1/discovery/search?q=&limit=5'` — see
`plungeai-api-setup`) or the MCP `plungeai_list_agents` tool (`plungeai-mcp-setup`), then
feed the id to `ocean agent contract` / `ocean agent run`.
## Hard rules
- **API keys never in files or argv.** Enter via the hidden prompt (`ocean auth set-key`) or
`OCEAN_API_KEY` env in CI. Never commit or echo a key. `auth set-key`/`set-session` take no
positional value (a pasted secret errors with "too many arguments") — but nothing else
scans argv, and argv IS sent to the platform as `user_request` on every key-side verb, so
never place a secret in any command argument. Keys live in `~/.ocean/config.json`
(mode 0600) only.
- **Session cookie is a secret too** — same handling.
- **Relay server output verbatim.** MCP-verb output (`whoami`, `memory`, `mission`,
`agent run`, …) is final platform-rendered markdown — print it as-is, don't re-summarize.
- **Schedule updates preserve delivery.** `ocean schedule update` does fresh-GET → merge →
PUT; passing `--deliver` REPLACES delivery targets. Never hand-PUT a schedule with partial
`parameters`.
- **Bot policy lint runs at save.** `memory_owner:` is refused; hardcoded emails/UUIDs warn;
`--kind bot` requires exactly one `type: harness` task whose mission ends with
`task_complete`.
- **Workflow YAML authoring** is its own skill — use `plungeai-workflows` for writing CNL
YAML; this skill covers running it from the terminal.
## Verify
After install or auth changes, always:
```bash
ocean doctor # exit code 0 = ready
```
Green checks (each only when the matching credential is set): Config · Auth · Studio
reachable · Workflows API (session) · Gateway api.plungeai.com reachable · Gateway API key
valid · MCP authenticated. Any ✗ names the fix (`ocean login`, `ocean auth set-key`). For a
scripted probe: `ocean whoami --json` (key) or `ocean workflow list --limit 1 --json`
(session).
## References
| File | Read when |
|---|---|
| [`references/commands.md`](/skills/plungeai-cli-setup/references/commands) | Full command reference — every command, subcommand, flag, example |
| [`references/auth-and-setup.md`](/skills/plungeai-cli-setup/references/auth-and-setup) | Install, config file, credentials, doctor, setup, troubleshooting |
| [`references/agent-flows.md`](/skills/plungeai-cli-setup/references/agent-flows) | Running agents/workflows, executions & results, REPL, scripting/CI patterns |
## Related skills
- `plungeai-api-setup` — raw HTTP calls to `api.plungeai.com` (what `run-yaml`/`--async` use
under the hood).
- `plungeai-mcp-setup` — the `plungeai_*` tools the key-side CLI verbs call.
- `plungeai-workflows` — CNL YAML authoring (write it here, run it with `run-yaml`).
- `choose-your-plungeai-door` — deciding whether the CLI is the right door at all.
## Reference pages
All execution happens on Cloudflare; the CLI streams or polls remotely.
The npm package @plungeai/ocean-cli (v2.3.0, bin name ocean, Node >= 20) is not yet published — publishing is an owner action (pushing the ocean-cli-v2.3.0…
Every command below exists in cli/src/index.ts (Commander registration) and is implemented under cli/src/commands/.
# Ocean CLI — agent flows, REPL, and scripting
Source: https://docs-preview.plungeai.com/skills/plungeai-cli-setup/references/agent-flows
## Running agents and workflows from the terminal
All execution happens on Cloudflare; the CLI streams or polls remotely.
### Saved flow, live stream (Studio session)
```bash
ocean workflow run -i "AI startups in fintech"
ocean workflow run --inputs inputs.json # named inputs (flat string map)
ocean observatory run -i "query" # event-timeline view instead
```
The stream ends with the formatted result. If the flow is a conversational
agent that pauses (a question or a payment approval), the CLI prints it and
prompts you inline — the run continues in place until final. Non-interactive
shells get a resume hint (`ocean execution continue `) instead.
### Async dispatch + poll (API key)
```bash
ocean workflow run --async -i "ping" # prints execution id immediately
ocean execution status # queued/running/completed (+ ⏸ block if paused)
ocean execution output # result markdown when completed
```
`--async` supports only `-i` (single input) — `--inputs` and `--json` are
silently ignored on the async path; named inputs need a sync `workflow run` or
Studio. The execution id is also remembered as `last_execution_id` for
follow-ups (a config save — see the key-persistence note under Scripting).
### Ad-hoc YAML, nothing saved (API key preferred)
```bash
ocean workflow run-yaml flow.yaml -i "input text"
```
With a key: executes through https://api.plungeai.com (One API + result
redemption). With only a session it falls back to Studio's execute proxy and
prints the raw engine envelope JSON instead of redeemed markdown. `{input}` in
the YAML receives `-i`. Author the YAML with the `plungeai-workflows` skill;
test with `run-yaml` before `ocean workflow create`.
### One registry agent as a tool (API key)
```bash
ocean agent contract exa-agent # discover operations + params
ocean agent run exa-agent "latest Cloudflare Workers news"
ocean agent call exa-agent search --params '{"query":"cloudflare workers"}'
```
### Bounded autonomous mission (API key)
```bash
ocean mission "find the three strongest competitors to X and compare pricing" \
--max-iter 5 --criteria "table with sources" --sync
```
Without `--sync` the mission dispatches async and the CLI polls every 5s (600s
cap, then exit 1). The waiter declares the run terminal when
completed/failed/cancelled/error appears ANYWHERE in the status text — not just
the `**Status:**` field — so a workflow name containing "failed" or "error"
ends the wait on the first poll and the result is fetched prematurely. Prefer
`--sync` for short missions; keep those words out of goals; for long missions
poll `ocean execution status ` yourself and match the `**Status:**` line.
## Results, threads, follow-ups
```bash
ocean execution list -l 10 # recent runs
ocean execution conversation # full thread: input → result → follow-ups
ocean workflow followup "and by region?" # ask about the last run (-e picks another)
ocean execution continue # answer a pending question
ocean execution continue --approve # approve a pending action
ocean execution export -f docx -o report.docx
ocean execution save-version "pre-edit" # snapshot; restore-version to roll back
```
Everything in this block except `execution status`/`output` needs the Studio
session — a key-only script cannot list, continue a paused run, follow up, or
export.
## The AI terminal (REPL)
`ocean` (no args) opens the chat REPL — the same harness agent Studio uses.
Plain language works for both **building** ("build a workflow that watches the
market") and **acting on your account** ("show my ten last runs", "export the
last result as docx", "what's on my schedule this week?"). Mutating actions ask
for confirmation; when a decision is yours, the agent asks a structured
question you answer inline.
Type `/help` for the grouped palette. Slash commands mirror the CLI noun
groups:
| Group | Commands |
|---|---|
| Workflow agents | `/flows` `/folders` `/bots` `/show` `/run` `/create` `/save` `/run-yaml` `/refine` `/edit` `/versions` `/restore` `/undo` `/delete` |
| Runs & results | `/runs` `/results` (`/results inline [N]`) `/results agent` `/results folder` `/followup` `/thread` |
| Schedules | `/schedule` `/schedule jobs` `/schedule runs` |
| Platform | `/registry` `/agent` `/mission` `/memory` `/templates` `/learn` `/whoami` `/local` |
| Session & settings | `/help` `/sessions` `/continue` `/export` `/new` `/mode` `/depth` `/details` `/voice` `/doctor` `/exit` |
Legacy names stay as aliases (`/plans` and `/plan-generate` are retired stubs that only print a hint to use `/create` or `/new`): `/agentflows`→`/flows`, `/workflow(s)`→`/flows`,
`/agentfolder`→`/folders`, `/executions`→`/runs`, `/resultbyagent`→`/results agent`,
`/resultbyfolder`→`/results folder`, `/schedulejobs`→`/schedule jobs`,
`/scheduleruns`→`/schedule runs`, `/build`→`/create`, `/tweak`→`/edit`.
REPL behaviors worth knowing:
- `/create [name]` runs Agentic Build on the current Think conversation —
chat the design first, then `/create Market Monitor`.
- `/save ` saves the YAML block from the last AI reply; `/run-yaml`
executes it ad hoc.
- `/results` opens a fast metadata-only picker (paginated, Esc exits). Plain
requests like "show me my last five results" open the same local picker with
no AI round-trip.
- `/mode research|plan|build` and `/depth quick|standard|deep|ultra` persist
to config; `/details` toggles the SSE tool trace.
- Voice: **Ctrl+T** push-to-talk in the prompt; `/voice` modal mic (Enter to
stop); `/voice on|off` speaks replies aloud. Recording needs `sox`.
- `/edit` uses an inline terminal YAML editor; Ctrl+E opens `$OCEAN_EDITOR`
(set it to a terminal editor if `$EDITOR` is a GUI app).
- `/exit` (or Ctrl+C) quits.
### Custom slash commands
Markdown files in `~/.ocean/commands/` become REPL commands (built-in names
can't be shadowed):
```markdown
---
description: Review workflow for missing agents
target: refine # chat | refine
depth: standard # quick | standard | deep | ultra
---
Review this workflow for missing error handling and suggest improvements.
Focus on: $ARGUMENTS
```
`$ARGUMENTS` receives everything typed after the command; `$1`, `$2`, …
receive positional words. `target: refine` applies the prompt as a workflow
refine; `target: chat` (default) sends it as a chat turn.
### Command shell (non-AI)
`ocean shell` gives an `ocean›` prompt that runs plain subcommands
(`workflow list`, `execution output `, …) without re-invoking the binary —
handy for exploratory sessions without the AI.
## Scripting and CI patterns
- **Inject the key via env, never argv** — but know that `OCEAN_API_KEY` only
overrides the config key for the process: any command that saves CLI state
(`workflow run`/`run --async`, `refine`, `chat`, `ocean run`,
`observatory run`) writes the merged config back and PERSISTS the env key
into `~/.ocean/config.json` (0600). On shared or persistent runners use a
throwaway `HOME` (`export HOME=$(mktemp -d)`) or finish with `ocean logout`;
`whoami`, `doctor`, `run-yaml`, `agent run`, `memory`, `mission` never save.
- **Kill ANSI color in CI:** with `$CI` set the CLI force-enables color even
when piped — escape codes break word-boundary greps like `\bcompleted\b`.
Export `NO_COLOR=1` for anything you parse, or use `--json` (never colored).
- **Force non-interactive output:** pass any flag to `workflow list`
(`--json`, `--limit`, `--kind`, `--search`); give explicit ids instead of
relying on pickers; prefer `--json` where offered (`whoami`, `workflow list`,
`execution status`, `schedule get/create/update`, `workflow run --json`,
`ocean run "" --json`). Caveat: `whoami --json` and key-path
`execution status --json` wrap platform markdown in a single JSON string
field — you still parse the markdown inside.
- **Gate on exit codes — with one asymmetry:** exit codes are 0/1 only. Sync
`workflow run` exits 1 when the run itself errors, but `execution status`/
`output` of a FAILED run exit 0 (they successfully report the failure) — an
async CI gate must parse the status value (skeleton below). `ocean doctor`
is the canonical preflight gate.
- **Destructive confirms:** `workflow delete`/`restore`/`undo` prompt `[y/N]`
with no `--yes` flag — in scripts pipe `echo y | ocean workflow delete `;
an EOF answer cancels with exit 0, so the script "succeeds" without deleting.
- **One-shot AI in a script:** `ocean run "summarize this week's runs" --json`
→ `{content, conversationId}`; `-c` continues the same conversation next call.
Async run-and-wait skeleton (bounded, failure-gated, status-FIELD match):
```bash
set -euo pipefail
export NO_COLOR=1
out=$(ocean workflow run "$WORKFLOW_ID" --async -i "$INPUT")
exec_id=$(printf '%s' "$out" | grep -oE '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|exec-[[:alnum:]-]+' | head -1)
[ -n "$exec_id" ] || { echo "no execution id"; exit 1; }
status=""
for i in $(seq 1 120); do # 10 min cap
st=$(ocean execution status "$exec_id" 2>&1 || true)
status=$(printf '%s' "$st" | grep -oiE 'Status:\*{0,2} *(completed|failed|cancelled|error)|^(completed|failed|cancelled|error)\b' | grep -oiE 'completed|failed|cancelled|error' | head -1 || true)
[ -n "$status" ] && break
sleep 5
done
[ "$status" = "completed" ] || { echo "run ended: ${status:-timeout}"; exit 1; }
ocean execution output "$exec_id"
```
Match the status FIELD, never the whole line — the status line embeds the
workflow NAME (Studio path: ``; MCP path:
`**Workflow:** `), so a flow named "Failed Payments Monitor" would
terminate a whole-line grep on the first poll.
CI preflight:
```bash
ocean doctor || exit 1
ocean whoami --json # {"whoami":""} — one string field; grep it for the expected user/tier
```
## Rules when driving the CLI as an agent
- Discover ids live (`ocean registry …`, `ocean workflow list`,
`ocean agent contract `) — never invent agent or workflow ids.
- Relay platform-rendered output verbatim; don't re-summarize `whoami`,
`memory`, `mission`, or `agent run` results.
- Test YAML with `run-yaml` before saving; expect the save lint to refuse
`memory_owner:` and to require bots (`--kind bot`) to be exactly one
`type: harness` task whose mission ends with `task_complete`.
- Update schedules only through `ocean schedule update` (fresh-GET → merge →
PUT keeps delivery targets intact); `--deliver` on update REPLACES targets.
# Ocean CLI — install, auth, and setup
Source: https://docs-preview.plungeai.com/skills/plungeai-cli-setup/references/auth-and-setup
## Install
The npm package `@plungeai/ocean-cli` (v2.3.0, bin name `ocean`, Node >= 20)
is **not yet published** — publishing is an owner action (pushing the
`ocean-cli-v2.3.0` tag triggers the publish workflow). Current truth from
`cli/README.md`:
```bash
# Working today — from the Ocean-Platform repo root:
npm run ocean -- --help # run any command through the repo
npm run build:cli # optional: build dist for ~40ms startup
npm link # or: put the `ocean` bin on your PATH
# Once published to npm:
npm install -g @plungeai/ocean-cli
# or without installing:
npx @plungeai/ocean-cli --help
```
Verify: `ocean --version` (inside the repo it appends the platform version).
The linked `ocean` bin prefers `cli/dist/index.js` whenever it exists — after
updating the repo, rerun `npm run build:cli` (or delete `cli/dist`) or the bin
silently executes the stale build. `npm run ocean --` always runs current
source.
## The two credentials
The CLI keeps credentials strictly separated — the Studio cookie is only ever
sent to Studio; the API key only to the Gateway and MCP server.
| Credential | Format | Unlocks | Set with |
|---|---|---|---|
| Studio session | `auth-session` cookie value | AI chat/REPL, saved flows, runs, results, exports, schedules, registry, sessions | `ocean auth set-session` |
| API key | `ozk_YOUR_KEY` | `workflow run-yaml`, `workflow run --async`, `whoami`, `memory`, `templates`, `learn`, `mission`, `agent …` | `ocean auth set-key` |
### Get a Studio session
1. Sign in at https://studio.plungeai.com
2. Copy the `auth-session` cookie value from your browser (devtools →
Application/Storage → Cookies).
3. `ocean auth set-session` — hidden prompt. Pasting the whole
`auth-session=…` fragment also works; the CLI extracts the value.
### Get an API key
1. Self-service: **Ocean Dashboard → One API → Keys** (`https://dashboard.plungeai.com`) →
create a key → name it, pick an expiry (never, or 7–365 days) → copy it once
(`ozk_YOUR_KEY` — it is shown exactly once and stored hashed). Ask the account
owner only for a shared/team key minted under someone else's account.
2. `ocean auth set-key` — hidden prompt. The CLI refuses values that don't
start with `ozk_`.
`ocean login` prints this whole guide in the terminal. `ocean auth status`
shows what's configured plus a live Studio health probe. `ocean logout` clears
both credentials and cached conversation/refine/execution state.
## Key handling rules (hard)
- Keys and cookies are entered ONLY via hidden prompts or the `OCEAN_API_KEY`
env var. Never on argv: `auth set-key`/`set-session` take no positional value
(a pasted secret errors with Commander's "too many arguments"), but nothing
else scans argv — and argv IS sent to the platform as `user_request` on every
key-side verb — so keep secrets out of all command arguments, shell history,
repos, and committed `.env` files.
- Storage: `~/.ocean/config.json`, written with mode `0600`.
- CI / ephemeral use: `export OCEAN_API_KEY=ozk_YOUR_KEY` — the env override
wins over the config file for the process, **but it is persisted on the next
state save**: any command that saves CLI state (`workflow run`/`run --async`,
`refine`, `chat`, `ocean run`, `observatory run`) writes the merged config —
env key included — back to `~/.ocean/config.json` (0600). On shared or
persistent runners use a throwaway `HOME` (`export HOME=$(mktemp -d)`) or
finish with `ocean logout`. Verbs that never save: `whoami`, `doctor`,
`run-yaml`, `agent run`, `memory`, `mission`.
## Config file — `~/.ocean/config.json`
Created on first save; JSON, mode 0600. Fields you may care about:
| Field | Meaning | Default |
|---|---|---|
| `studio_url` | Studio origin | `https://studio.plungeai.com` |
| `api_gateway_url` | Gateway origin | `https://api.plungeai.com` |
| `mcp_url` | MCP server for key-side verbs | `https://mcp.plungeai.com` |
| `shared_memory_url` | SharedMemory host for stream pointer polling (rarely overridden) | platform default |
| `access_token` | Studio session cookie value | — |
| `api_key` | `ozk_YOUR_KEY` | — |
| `chat_mode` / `chat_depth` | REPL defaults (`research|plan|build`, `quick|standard|deep|ultra`) | build / deep |
| `conversation_id`, `last_execution_id`, `refine_workflow_id`, `refine_undo` | Session state the CLI maintains | — |
| `voice_replies` | `/voice on|off` persisted | off |
| `node_id`, `admin_port` | Local node daemon (for `ocean local status`) | — |
Requests to a stale decommissioned gateway host are transparently redirected to
`https://api.plungeai.com` at request time only — the file itself (and the
`ocean auth status` display) keeps the old value until the next save. Don't
hand-edit around it.
## `ocean setup`
One command prepares coding-agent integration:
```bash
ocean setup # install; then runs doctor
ocean setup --dry-run # list what would be installed, write nothing
```
What it does:
1. Installs the canonical **plungeai-workflows** skill live from
https://mcp.plungeai.com (fetches the file list from `/llms.txt`) into
`~/.claude/skills/` — and `~/.cursor/skills/` when a `~/.cursor` dir exists.
2. Creates `~/.ocean/commands/` for custom REPL slash commands.
3. Links bundled CLI skills into `~/.cursor/skills/`.
4. Prints the one-click install pointers from the platform install page.
5. Runs `ocean doctor`.
Note: the bundled trio is `ocean-cli-lifecycle`, `ocean-cli-workflow`,
`ocean-observatory` (from `cli/skills/`) — `ocean setup` does NOT install or
update this `plungeai-cli-setup` skill.
## `ocean doctor` — the verification command
Run after every install or credential change; it exercises each configured
credential against the live platform and sets exit code 1 on any failure:
| Check | Probe | Runs when |
|---|---|---|
| Config | `~/.ocean/config.json` + Studio URL | always |
| Auth | session or key present | always |
| Studio | health endpoint reachable | any credential set |
| Workflows API | authenticated list call | session set |
| Gateway | https://api.plungeai.com health | key set |
| Gateway API key | key accepted | key set |
| MCP | `plungeai_whoami` over https://mcp.plungeai.com/v1 (Bearer key) | key set |
All-green ends with "Ready to run workflows". Each ✗ names its fix.
Caveat: the session probe runs first in the same chain — if it throws (expired
cookie), doctor records "Studio API ✗" and SKIPS the Gateway/MCP checks even
when a valid key is set.
Doctor also tips: if `$EDITOR` is a GUI app, `/edit` uses the inline terminal
editor; set `OCEAN_EDITOR=nano` (or another terminal editor) for Ctrl+E
external editing.
## Troubleshooting
| Symptom | Fix |
|---|---|
| `Not authenticated` | `ocean login`, then set a credential |
| `A Studio session is required for this command` | `ocean auth set-session` — API keys only cover the key-side verbs |
| 401 / "key rejected" on Gateway or MCP | Key revoked or mistyped — mint a new one at Dashboard → One API → Keys, `ocean auth set-key` |
| Studio calls fail after working earlier | Session cookie expired — sign in again, `ocean auth set-session` |
| `API key must start with ozk_` | You pasted something else (cookie? bearer header?) — copy the raw key |
| Doctor Gateway ✗ but Studio ✓ | Key-side config issue; re-run `ocean auth set-key`, check `api_gateway_url` is `https://api.plungeai.com` |
| Voice recording does nothing | Recording needs `sox` (`brew install sox`); spoken replies work without it |
| Doctor shows only "Studio API ✗" and no Gateway/MCP rows | The expired session aborted the check chain — re-set the session (or `ocean logout` + set only the key) and rerun |
| Scripts hang at a prompt | You hit an interactive picker — pass flags (`--json`, `--limit`, ids) to force non-interactive output. Exception: `ocean registry` browse has no flags and is a no-op when piped — use `ocean registry lookup ` |
| CI output full of escape codes / greps miss | `$CI` force-enables ANSI color even without a TTY — export `NO_COLOR=1` or use `--json` |
Escalation path: `ocean doctor` → `ocean auth status` → re-set the failing
credential → `ocean doctor` again (exit 0 = done).
# Ocean CLI — full command reference
Source: https://docs-preview.plungeai.com/skills/plungeai-cli-setup/references/commands
Every command below exists in `cli/src/index.ts` (Commander registration) and
is implemented under `cli/src/commands/`. Global flags: `-h/--help` on any
command, `-V/--version` on the root. Running `ocean` with **no arguments**
opens the AI chat REPL.
Credential legend: **[session]** = Studio session cookie required ·
**[key]** = API key (`ozk_YOUR_KEY`) required · **[—]** = works unauthenticated.
## Top-level
### `ocean setup [--dry-run]` [—]
Installs the canonical `plungeai-workflows` skill live from
https://mcp.plungeai.com into `~/.claude/skills/` (and `~/.cursor/skills/` when
Cursor is present), creates `~/.ocean/commands/` for custom slash commands,
links bundled CLI skills into Cursor, prints the platform install-page
pointers, then runs `ocean doctor`.
- `--dry-run` — print what would be installed without writing.
### `ocean chat` [session]
AI chat REPL (identical to bare `ocean`). See [`references/agent-flows.md`](/skills/plungeai-cli-setup/references/agent-flows).
### `ocean login` [—]
Prints the cloud auth guide: how to get a Studio session cookie and an API key,
and which command saves each. Does not open a browser — everything runs on
Cloudflare; the CLI is a remote client only.
### `ocean logout` [—]
Clears saved session, API key, and conversation/refine/execution state from
`~/.ocean/config.json`.
### `ocean doctor` [—]
Live health checks; sets exit code 1 when any check fails. Checks (each auth
probe only when that credential is configured): Config · Auth · Studio
reachable · Workflows API (session) · Gateway (https://api.plungeai.com)
reachable · Gateway API key valid · MCP (https://mcp.plungeai.com) authenticated.
### `ocean whoami [--json]` [key]
Server-side identity over the MCP path: user id, tier (e.g. pro), rate window,
key name. `--json` prints `{"whoami":""}` — one string
field, not structured data; parse the markdown inside for user/tier.
### `ocean memory [arg]` [key]
Long-term platform memory.
- `ocean memory recall [query]` — read memory (optionally filtered).
- `ocean memory remember` — bare = read; with one of:
- `--add ""` — append a memory line
- `--replace "" ""` — exactly two values
- `--remove ""` — remove a line
- `--target user|memory` — which store (default `user`)
- `ocean memory search-runs "" [--limit N]` — search past run results.
### `ocean templates [action] [id]` [key]
Workflow templates.
- `ocean templates list [--category ] [--limit N]`
- `ocean templates show `
- `ocean templates use [--name ] [--folder ]` — instantiate as
a saved workflow.
### `ocean learn [--name ]` [key]
Distill a URL or literal text into a private platform skill. `--name` sets the
kebab-case skill id.
### `ocean mission ""` [key]
Bounded autonomous agent run with memory (async + poll by default).
- `--mission ` — mission purpose statement
- `--tools ` — allowed tools, comma-separated
- `--max-iter ` — iteration cap
- `--criteria ""` — success criteria, repeatable
- `--persona ` — persona card id
- `--skills ` — skill card ids, comma-separated
- `--sync` — wait inline instead of async+poll
Without `--sync`: polls every 5s up to 600s (then exit 1); the waiter treats
completed/failed/cancelled/error ANYWHERE in the status text as terminal — not
just the `**Status:**` field — so those words in a workflow name end the wait
early. Prefer `--sync` for short missions.
### `ocean agent …` [key]
Registry agents as tools.
- `ocean agent run "" [--model ] [--session ]` — one
agent, one prompt (optionally in a conversation session).
- `ocean agent contract ` — invocation contract: operations, params,
live credential status.
- `ocean agent call [operation] [--params '{"k":"v"}'] [--prompt ""]`
— typed tool execution against a contract operation.
### `ocean local status [--json]` [—]
Local node daemon health on this machine (uses config `node_id`/`admin_port`).
### `ocean menu` [session]
Interactive pick-a-flow menu (non-AI).
### `ocean run [message...]` [session]
- No message: interactive flow run (picker).
- With message: one-shot AI prompt, streamed. Flags:
- `-c, --continue` — continue the last AI conversation
- `-m, --mode research|plan|build`
- `-d, --depth quick|standard|deep|ultra`
- `--json` — print `{content, conversationId}` JSON (for scripts)
### `ocean shell` [session or key]
Command shell: type any `ocean` subcommand at an `ocean›` prompt (parse errors
recover instead of exiting). Requires a TTY and at least one credential.
## `ocean auth`
- `ocean auth status` [—] — Studio/Gateway URLs, whether session and key are
set, live Studio health.
- `ocean auth set-key` [—] — hidden prompt; value must start with `ozk_`;
saved to `~/.ocean/config.json` (0600).
- `ocean auth set-session` [—] — hidden prompt; accepts the raw cookie value or
a pasted `auth-session=…` fragment.
## `ocean workflow` — agent flows [session unless noted]
- `ocean workflow list` — interactive picker by default; **any flag switches to
non-interactive output**:
`--kind workflow|agent|bot` · `--limit N` · `--search ` (server-side name
search) · `--folder ` · `--json`. Rows include a kind column.
- `ocean workflow show [query] [--yaml]` — look up by id, name, or picker;
`--yaml` prints the flow YAML.
- `ocean workflow build [thinkId] [-n ]` — Agentic Build from a Think
chat session (Studio parity).
- `ocean workflow create [-d ] [--kind workflow|agent|bot] [--json]`
— save from a YAML file. CNL-validated + policy-linted: `memory_owner:`
refused, hardcoded emails/UUIDs warn, `--kind bot` requires exactly one
`type: harness` task whose mission ends with `task_complete`.
- `ocean workflow update [-f|--file ] [-n ] [--description ]`
- `ocean workflow edit ` — edit session: YAML editor, refine, run, until
Esc. (`ocean workflow tweak ` is a kept alias.)
- `ocean workflow delete `
- `ocean workflow refine "" [-d ] [--json]` — AI
one-shot edit in plain English.
- `ocean workflow versions ` — version history.
- `ocean workflow restore ` — version number or id prefix.
- `ocean workflow undo [id]` — restore the pre-refine snapshot.
`delete`/`restore`/`undo` prompt `[y/N]` with no `--yes` flag — in scripts
pipe `echo y | ocean workflow delete `; an EOF answer cancels with
exit 0 (the script "succeeds" without deleting).
- `ocean workflow followup "" [-e|--execution ]` — follow-up
question on a completed execution (default: last run).
- `ocean workflow run ` — run with live SSE output, then result + any
pending question/approval continuation. Flags:
- `-i, --input ""` — single input value
- `--inputs ` — named inputs (flat JSON object, string values);
mutually exclusive with `--input`
- `--json` — raw SSE events as JSON lines
- `--async` **[key]** — dispatch via the MCP surface and return the
execution id immediately; prints a `poll: ocean execution status ` hint.
Only `-i` is honored with `--async` — `--inputs` and `--json` are silently
ignored on the async path (named inputs need a sync run or Studio).
- `ocean workflow run-yaml [-i ""]` **[key preferred; session
fallback]** — execute ad-hoc YAML (nothing saved). With a key: via
https://api.plungeai.com (`POST /v1/workflows/execute` + result redemption).
With only a session: falls back to Studio's execute proxy and prints the raw
engine envelope JSON, no redeemed markdown. `{input}` placeholder receives
`-i`.
## `ocean session` — Think chat sessions [session]
- `ocean session list` — list conversations.
- `ocean session export [file]` — export the current conversation to markdown
(requires an active conversation from `ocean chat`).
## `ocean registry` — platform discovery [session]
Registry data loads live from the platform discovery service — never a static
catalog.
- `ocean registry` — browse everything.
- `ocean registry [subtype]` — categories: `agents` `twins`
`experts` `skills` `plugins` `mcp` `models` `providers` `connectors`.
- `ocean registry lookup ` / `ocean registry show ` — one
entry's card.
- `ocean registry ` — direct lookup shorthand.
Non-TTY: category browse (`ocean registry`, `ocean registry agents`) prints
only "Registry browse requires an interactive terminal" and exits 0 — a no-op
for scripts. `ocean registry lookup ` DOES work non-interactively (exact
card, or a plain list of up to 20 matches); key-only discovery goes through the
One API discovery search instead (`plungeai-api-setup` skill).
## `ocean schedule` — scheduled jobs [session]
- `ocean schedule` / `ocean schedule overview` — jobs + today stats.
- `ocean schedule jobs` — browse jobs (picker in a TTY, plain list when piped).
- `ocean schedule runs` — run history.
- `ocean schedule create --type agent|query|workflow|heartbeat --cron ""`
— agent/query jobs are wrapped as one-task workflows. Options:
- `--target ` — agent id (agent/query) or workflow id (workflow)
- `--prompt ""` — what the agent does each run (`--query` is an alias
for `--type query`)
- `--mission-ref ` — pre-built agent card id (schedules a harness wrapper)
- heartbeat only: `--check-agent ` · `--condition ""` ·
`--trigger ` · `--notify telegram|whatsapp|discord|slack|email`
· `--notify-to `
- `--deliver ` — repeatable delivery targets. Channels:
`telegram:` · `whatsapp:` · `discord:` ·
`slack:` · `email:a@b.c` · `inapp` (no target). Slack values
starting with `C` are treated as channel ids; anything else as a member
id/handle.
- `--local` — mark for local-node execution
- `--description ""` · `--json`
- `ocean schedule get [--json]` — one job including delivery targets.
- `ocean schedule update ` — **fresh-GET → merge → PUT; delivery settings
preserved** unless `--deliver` is passed (which REPLACES them). Options:
`--cron` · `--name` · `--description` · `--prompt` · `--deliver …` ·
`--status active|paused` · `--json`.
- `ocean schedule delete ` — soft delete (history preserved). Removes only
the job: agent/query/mission-ref jobs leave their auto-created wrapper
workflow "Scheduled: " in your flows — `ocean workflow delete ` it
separately if you want it gone.
Example:
```bash
ocean schedule create "Weekday brief" --type agent --target research-agent \
--prompt "top AI news, 5 bullets" --cron "0 9 * * 1-5" \
--deliver slack:CHANNEL_ID --deliver email:me@example.com
```
## `ocean execution` — runs & results [session unless noted]
Only `status` and `output` have API-key fallbacks; everything else here —
including `continue` and `export` — is session-only with no key path (a
key-only script cannot continue a paused run or export).
- `ocean execution list [-w|--workflow ] [-l N]` — recent runs (limit default
20, must be a positive integer).
- `ocean execution status [--json]` **[session or key]** — one-line
status; when the run is paused on a question/approval, the ⏸ block is relayed
verbatim (the printed `continue … --approve` hint is itself session-only).
Falls back to the MCP key path for gateway-dispatched runs. `--json` shape
differs by path: Studio = full execution JSON (`.status` field); key/MCP =
`{"execution_id","status_text":""}` — parse the `**Status:**` line
inside `status_text`.
- `ocean execution show ` — metadata.
- `ocean execution output ` **[session or key]** — result markdown (MCP key
fallback for gateway-dispatched runs). Rendered terminal-formatted (wrapped,
`── Output ──` header, pager for long results in a TTY); there is no
raw-markdown flag — for byte-exact artifacts use `execution export`
(session), or parse the wrapped text with `NO_COLOR=1`.
- `ocean execution conversation ` — full multi-turn thread
(input → result → follow-ups).
- `ocean execution continue [--approve]` — resume a paused conversation:
answer the pending question (prompted) or approve the pending action.
- `ocean execution export -f|--format [-o|--out ] [--models ]` —
formats: `docx` · `pptx` · `xlsx` · `finmodel` · `pdf` · `package` ·
`google-docs`. `--models` selects FinModel types.
- `ocean execution versions ` — saved result snapshots.
- `ocean execution save-version ["note"]`
- `ocean execution restore-version ` — number or version id.
## `ocean observatory` [session]
- `ocean observatory run [-i ""] [--inputs ]` —
run with an Observatory-style live event timeline instead of the plain stream.
## Validation & error behavior
- Numeric flags like `-l/--limit` reject non-positive/non-integer values.
- Choice flags (`--mode`, `--depth`) reject values outside their set.
- `auth set-key`/`set-session` take no positional value — a pasted secret dies
with Commander's "too many arguments". Nothing else scans argv, and argv is
sent to the platform as `user_request` on every key-side verb — keep secrets
out of all command arguments (hidden prompts / `OCEAN_API_KEY` only).
- A 401 from any surface prints a friendly hint (`ocean login` /
`ocean auth set-key`) instead of a stack trace.
- Exit codes are 0/1 only. Failures exit 1 (`ocean doctor` included), and sync
`workflow run` exits 1 when the run itself reports a workflow error — but
`execution status`/`output` of a FAILED run exit 0 (they successfully report
the failure; `output` prints a "_No stored markdown output_" notice). Async
CI gates must parse the status value, not the exit code.
# plungeai-mcp-setup
Source: https://docs-preview.plungeai.com/skills/plungeai-mcp-setup
Connect and operate the PlungeAI MCP server (https://mcp.plungeai.com/v1) — endpoint and Bearer ozk_/X-API-Key auth, a generic MCP client config (native remote/HTTP, or the mcp-remote stdio bridge), plungeai_whoami, the structured-outcome envelope and trust fences, the full plungeai_* tool index pointing to the capability skill for each tool, and connection troubleshooting. Use when connecting ANY MCP client to PlungeAI, calling or planning plungeai_* tool calls, polling an execution, resuming a paused run (plungeai_continue), or debugging a 401, a short tool list, or a fenced key. Triggers: "plungeai MCP", "mcp.plungeai.com", "connect an MCP client", "plungeai_whoami", "needs_approval", "execution id". Per-editor install steps live in `plungeai-in-` — load that instead. REST/codegen is `plungeai-api-setup`; terminal is `plungeai-cli-setup`; CNL authoring is `plungeai-workflows`.
[Download zip](https://skills.plungeai.com/plungeai-mcp-setup.zip) · [View raw SKILL.md](https://skills.plungeai.com/plungeai-mcp-setup/SKILL.md)
The PlungeAI MCP server turns the whole platform into a control plane for any MCP client:
discover and run agents, execute and build CNL workflows, run typed tool calls, bounded
autonomous missions, schedules, persistent chat, human-in-the-loop approvals, and long-term
memory. Everything it creates uses the same storage as Ocean Studio, so workflows,
executions, and conversations cross-appear in every app and door.
## Prerequisites
Self-service `ozk_` key: **Dashboard → One API → Keys** (`https://dashboard.plungeai.com`) →
create → copy it once. Ask the account owner only for a shared/team key minted under
someone else's account.
## Connect
Endpoint `https://mcp.plungeai.com/v1` (Streamable HTTP), auth header
`Authorization: Bearer ozk_YOUR_KEY` (or `X-API-Key: ozk_YOUR_KEY`). `POST
https://api.plungeai.com/v1/mcp` is the identical server on the API host, for a client that
can only reach one host. One-click install page: `https://mcp.plungeai.com/install`
(machine form: `/install.json`) — type the key into the box **before** clicking a button,
so the deeplink is rewritten with the Authorization header baked in; clicked without a key
the server installs auth-less and you add the header by hand afterward.
**Generic client config** (any MCP client not covered by a `plungeai-in-` skill):
1. **Native remote/HTTP support (preferred):** URL `https://mcp.plungeai.com/v1`, header
`Authorization: Bearer ozk_YOUR_KEY`.
2. **stdio-only client:** bridge with [mcp-remote](https://www.npmjs.com/package/mcp-remote)
(Node 18+):
```json
{ "mcpServers": { "plungeai": { "command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.plungeai.com/v1",
"--header", "Authorization: Bearer ozk_YOUR_KEY"] } } }
```
Clients that mangle spaces inside `args` (mcp-remote's README names Cursor, Codex CLI,
and Claude Desktop on Windows): pass `"--header", "Authorization:${AUTH_HEADER}"` plus
`"env": { "AUTH_HEADER": "Bearer ozk_YOUR_KEY" }` in the same entry. The bridge is an
`npx` process — a cold start can exceed a client's default startup timeout (Codex
default: 10s); raise it where the client has one.
3. Neither → skip MCP and use the One API instead (`plungeai-api-setup`) — every capability
is reachable over plain HTTPS.
**Key handling.** User-level config, never committed: the literal key lives only in the
tool's home config or its secret store, never in a repo file. A project-level config may
only reference an env var. Before the first commit in any repo you just configured:
```bash
git grep -n "ozk_" # tracked files
grep -rn "ozk_" . --exclude-dir=.git --exclude-dir=node_modules # untracked too
```
Both must print nothing.
## Verify
```
plungeai_whoami {user_request: "verify my plungeai connection"}
```
Expect: user id, auth type + tier, key label, rate-limit window (used/minute, used/day), and
the server identity (`mcp.plungeai.com`). A 401 means the key is missing/invalid — fix the
header, don't retry blind. There is no permissions field on the card — fencing shows up as
which tools `tools/list` returns, not on `whoami`. One real call proves the catalog too:
`plungeai_list_agents {search: "web search"}` → live results.
## The five rules that prevent most failures
1. **Discovery first, ids never from memory.** The agent catalog is live and active-only.
`plungeai_list_agents {search: ""}` is a hybrid
semantic+keyword search — take agent ids verbatim from its results. An unknown or
non-active id is REFUSED at execution (nothing runs); re-discover, never guess or reuse
an id from an earlier session.
2. **Relay results verbatim.** Every successful tool output is final, platform-rendered,
user-ready markdown. Present it in full — do not re-write, shorten, or summarize unless
asked. The parts addressed to you are the guidance tails: execution-id footers, poll
hints, and ⏸ continuation blocks — act on those.
3. **Structured outcomes, never blind retries.** Execution tools answer with a status
envelope (`ok | needs_input | needs_connection | needs_api_key | needs_approval |
unavailable | error`), never a raw error. Follow the `remediation`; never retry the
identical call.
4. **⏸ approval fences are the user's, not yours.** A run pausing with
`⏸ AWAITING USER APPROVAL: (cost)` or `⏸ AWAITING USER: ` must be
relayed verbatim. Only after the user decides do you call `plungeai_continue`
(`approve: true` ONLY for an explicit yes; `message: ""` for an answer,
denial, or change of course). NEVER approve on your own.
5. **Pass `user_request` on every call** — the user's original ask, verbatim, before you
translated it into arguments. Every tool accepts it; the platform uses it for routing and
support diagnostics.
**Terminology trap:** users call their saved workflows "agents" too. An unqualified "show me
my agents" means their SAVED WORKFLOWS → `plungeai_list_workflows`, not the registry
(`plungeai_list_agents`).
## Sync vs async, and continuation
- **Sync (default on most tools):** streams progress, returns the finished result. Typical
workflows finish in seconds (parallel RPC fan-out).
- **Async (`mode: "async"`):** returns an `execution_id` immediately; the run continues
server-side. Use it for anything that could exceed ~3 minutes (Claude Desktop hard-caps a
tool call at ~4 minutes). Poll `plungeai_get_workflow_status`, fetch with
`plungeai_get_result`. Ceiling: ~15-minute wall cap per attempt.
`plungeai_run_mission`/`plungeai_learn` default to async; `plungeai_execute_agent` has no
`mode` — always sync.
- **⏸ Continuation:** the pause appears as a tail on the result, on `plungeai_get_result`,
and in `plungeai_get_workflow_status.structuredContent.continuation`. Relay it verbatim →
ask the user → `plungeai_continue {execution_id, approve: true}` (yes) or
`{execution_id, message: ""}` (no/change). The execution id doubles as the
conversation session id.
## Tool map
The catalog is served live by `tools/list` (20 tools at last sync — `tools/list` is
authoritative; a fenced key sees fewer). Full parameter-level detail for each lives in the
capability skill named below.
| Tool | One-line purpose | Capability skill |
|---|---|---|
| `plungeai_whoami` | The authenticated identity, tier, key label, rate window | this skill |
| `plungeai_list_agents` | Search the live agent registry (semantic); fetch one full card | `plungeai-discovery` |
| `plungeai_get_tool_contract` | Exact invocation contract for one agent: schema, operations, credential status | `plungeai-discovery` |
| `plungeai_execute_agent` | Run one prompt-driven agent once | `plungeai-agents` |
| `plungeai_execute_tool` | Run one structured tool-agent with typed `{agent_id, operation, params}` | `plungeai-tools-connectors` |
| `plungeai_get_result` | Fetch a run's output by execution id; `task_id` reads a single step | `plungeai-results-traces` |
| `plungeai_execute_workflow` | Run a saved workflow or ad-hoc CNL YAML; sync streams, async polls | `plungeai-workflows` |
| `plungeai_get_workflow_status` | Poll a run: status, error, duration, `continuation` when paused | `plungeai-workflows` |
| `plungeai_list_workflows` | The user's saved workflows | `plungeai-workflows` |
| `plungeai_workflow` | Workflow CRUD + versioning | `plungeai-workflows` |
| `plungeai_build_workflow` | Generate a workflow from a goal, or refine one | `plungeai-workflows` |
| `plungeai_executions` | Execution history: list/get/output/conversation/delete | `plungeai-results-traces` |
| `plungeai_chat` | Persistent chat with the platform assistant | `plungeai-results-traces` |
| `plungeai_followup` | Ask a follow-up on a completed run | `plungeai-results-traces` |
| `plungeai_continue` | Resume a paused run: answer a question or deliver approval | this skill (above) |
| `plungeai_run_mission` | Bounded autonomous agent mission (tool fence, iteration cap) | `plungeai-missions` |
| `plungeai_learn` | Distill a URL/text/session into a reusable private skill | `plungeai-memory` |
| `plungeai_schedule` | Cron jobs: stats/list/get/create/update/pause/resume/delete/run_now/runs | `plungeai-scheduling` |
| `plungeai_memory` | Long-term memory: recall/remember/search_runs/get_run | `plungeai-memory` |
| `plungeai_templates` | Workflow templates: list/get/use | `plungeai-workflows` |
**Beyond tools**, the server also serves 8 MCP resources (registry or the caller's own data,
ownership-checked): `plungeai://agents/list`, `/agents/categories`, `/agents/{category}`,
`/personas/list`, `/workflows/list`, `/workflows/{id}`, `/executions/{id}`,
`/docs/workflow-authoring` — plus one prompt, `/plungeai`, that primes a client with the
platform operating instructions.
## Auth model, outcome envelope, trust fences
**An API key IS a user identity** — the key resolves to a user id, and every read/write on
every tool is scoped to what that user owns, the same view they have in Studio. A foreign id
answers "not found," not "forbidden."
Execution tools never return a raw error: the answer is text plus `structuredContent` with
`status: ok | needs_input | needs_connection | needs_api_key | needs_approval | unavailable
| error`, `summary`, and typed `remediation.actions` (`connect_provider`, `provide_api_key`,
`provide_field`, `approve_via`/`respond_via`, `retry_with`, `use_alternative`). `isError` is
true ONLY for terminal `error` outcomes — every other status is guidance, not a crash.
Trust fences (surface, never retry, never bypass): the **active-only fence** refuses an
unknown/inactive agent id before dispatch — re-discover, never retry the same id. The
**approval fence** (`needs_approval` / ⏸) is a deliberate human boundary — only the user
decides. **Connection fences** (`needs_connection`/`needs_api_key`) need the user's browser
(Studio → Connectors) — relay instructions, wait, then retry the identical call once they
confirm (the one case where repeating the same call is correct). Full protocol-error table,
rate limits (free 30/min·1k/day, pro 100/min·10k/day, enterprise 300/min·100k/day), per-key
fences (`allowed_ips`, `allowed_tools`), and the failure-classification table:
[`references/identity-and-errors.md`](/skills/plungeai-mcp-setup/references/identity-and-errors).
## Troubleshooting
| Symptom | Cause → fix |
|---|---|
| 401 (`Bearer ozk_ key required`) | Key typo'd, pasted with whitespace, or header never sent → fix the header in the client's config |
| Connected, no `plungeai_*` tools — or fewer than expected | Client not reloaded after the config edit, or the key is fenced to a subset (`allowed_tools`): policy, not a bug |
| 405 or an immediate connect error | Client is SSE-only or stdio-only (`GET /mcp` answers 405 at once) → use the mcp-remote bridge |
| Bridge "never appears" / times out | npx cold start exceeded the client's startup timeout, or Node.js is missing |
| 401 only through the bridge | Client mangled the spaces in `--header` → use `Authorization:${AUTH_HEADER}` + `env` (above) |
| Works for one teammate, not another | Separate keys, separate fences — per-machine config |
| 403 `refused` / 409 `approval_required` | Trust fence, not a connection problem — relay to the user |
Per-tool reload steps and config paths (Cursor, VS Code, Claude Code, Claude Desktop, Codex,
Gemini CLI, OpenCode, Windsurf, Replit, Lovable, Bolt, v0): `plungeai-in-`.
## References
- Full guide: https://mcp.plungeai.com/docs#1-quickstart — every tool's parameters and a
`tools/call` example at https://mcp.plungeai.com/docs#14-tool-reference.
- [`references/identity-and-errors.md`](/skills/plungeai-mcp-setup/references/identity-and-errors) — `plungeai_whoami` in full, the auth model, the two
error planes (protocol vs tool-outcome), rate limits, per-key fences, and the failure
classification table.
## Related skills
- `plungeai-in-` — exact per-editor connect steps and quirks.
- `plungeai-api-setup` — the same platform over REST instead of MCP.
- `plungeai-cli-setup` — operate PlungeAI from a terminal.
- `plungeai-workflows` — CNL YAML authoring deep-dive.
- `plungeai-discovery`, `plungeai-agents`, `plungeai-tools-connectors`, `plungeai-missions`,
`plungeai-scheduling`, `plungeai-memory`, `plungeai-results-traces` — per-tool capability
detail.
## Reference pages
---
# Identity & errors — whoami, the auth model, outcome envelope, trust fences
Source: https://docs-preview.plungeai.com/skills/plungeai-mcp-setup/references/identity-and-errors
---
## plungeai_whoami
**Purpose:** show the authenticated identity — the ground truth for "who am
I acting as" and "how much budget is left". Read-only, no arguments beyond
`user_request`. Use it to verify a new connection, and whenever ownership
("Execution not found") or rate-limit errors appear.
**Example:** `{"user_request": "verify my plungeai connection"}`
**Returns**
```
# Who am I
- **User:** ``
- **Auth:** api-key · tier **pro**
- **Key:**