canonical: https://jentic.com/apis/plori.ai/plori

# plori REST API

The plori REST API creates and runs hosted cloud agents, schedules deferred runs, and lets GitHub Actions trigger a repository's agent without a stored key. You create an agent by name with an optional model and config, using get-or-create so a long-lived agent is reused, then submit runs with a message and limits such as max_turn_tokens or max_turn_seconds; a run is submit-only and returns 202, and you poll its status or cancel it. Files on an agent's disk can be read in windows or downloaded. Schedules fire a one-shot prompt at a set time, with owner confirmation required for schedules created with an OAuth token, and public rate cards list model and tool pricing.

## For AI agents

Create a hosted plori agent, send it messages as billable runs, poll or cancel those runs, schedule deferred runs, and read files from the agent's disk. Also exchanges a GitHub Actions OIDC token for a single-run capability and reads public pricing.

## Scope

Does not handle direct model completions, code sandbox execution, or reading run replies over HTTP. Use for creating, running, scheduling, and inspecting hosted plori agents only.

## Capabilities

- Create a cloud agent by name with a model and config, or get the existing one with if_exists set to return
- Submit a run to an agent with a message and caps such as max_turn_tokens, max_advisor_spend_micro_usd, or max_turn_seconds, replaying safely with an Idempotency-Key
- Poll a run's status, list an agent's runs, and cancel an in-flight run
- Schedule a deferred one-shot run with a prompt and fire_at or delay_seconds, then confirm or cancel it
- Read a window of a text file or download a file from an agent's disk by path
- Let a GitHub Actions workflow exchange its OIDC token for a short-lived capability that submits and polls one run
- Check an account's credit balance and plan, and read the public model and tool rate cards

## Use cases

### Agent-to-Agent Delegation via Jentic

A local coding or ops agent hands longer work to a hosted plori agent instead of running it in its own session. Through Jentic it calls createAgent with if_exists set to return so one agent is reused, submits a run with a message and a max_turn_seconds cap, polls getAgentRun until the run finishes, and reads any result files with readAgentFile.

Example prompt: Create or get the agent named 'research-bot', submit a run asking it to summarise this week's changelog with max_turn_seconds 600 and an Idempotency-Key, then poll getAgentRun until it completes

### GitHub Actions Without Stored Secrets

Repository owners trigger a plori agent from a workflow without saving an API key in GitHub. The workflow sends its OIDC JWT, minted for audience plori.ai, to the exchange operation and receives a short-lived plori_ghr_ capability that can submit exactly one run to that repository's agent and poll only that run's event stream.

Example prompt: In a GitHub Actions job, exchange the OIDC token at `/v1/github/oidc/exchange`, submit one run to the repository agent with the returned capability, and poll `/v1/github/runs/{runID}` for its events

### Deferred and Scheduled Agent Runs

Teams that want an agent to act later, such as a morning report or a follow-up check, create a schedule with a prompt and either fire_at or delay_seconds. A schedule created directly with the owner's plori_sk_ key starts pending, while one created with an OAuth access token waits for the owner to confirm it, so a schedule booked through an OAuth client does not fire until the owner approves it.

Example prompt: Create a schedule on agent agt_123 with prompt 'Post the weekly metrics summary' and delay_seconds 86400, then list schedules to check whether it is pending or awaiting_confirmation

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/v1/agents` | Create or get-or-create an agent |
| POST | `/v1/agents/{agentID}/runs` | Submit a run to an agent |
| GET | `/v1/agents/{agentID}/runs/{runID}` | Get one run's status |
| POST | `/v1/agents/{agentID}/runs/{runID}/cancel` | Cancel an in-flight run |
| POST | `/v1/agents/{agentID}/schedules` | Schedule a deferred one-shot run |
| GET | `/v1/agents/{agentID}/files/read` | Read a window of a file on the agent's disk |
| POST | `/v1/github/oidc/exchange` | Exchange a GitHub OIDC token for one run |
| GET | `/v1/pricing/models` | Read the public model rate card |

## Key resources

- **Agents** — Create or get-or-create agents, list them, fetch one, and read or download files from an agent's disk.
- **Runs** — Submit runs with message and spend or time caps, list runs, read status, and cancel in-flight runs.
- **Schedules** — Create deferred one-shot runs, list and fetch them, confirm them as the owner, and cancel them.
- **GitHub** — Exchange a GitHub Actions OIDC token for a single-run capability, claim a repository, and poll a GitHub-triggered run.
- **Credits and pricing** — Account credit balance and plan, plus public model and tool rate cards.

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 66 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 85 / 100
  - Developer Experience & Jentic Compatibility: 62 / 100
  - AI-Readiness & Agent Experience: 49 / 100
  - Agent Usability: 94 / 100
  - Security: 60 / 100
  - AI Discoverability: 73 / 100
- **View full report:** https://jentic.com/apis/plori.ai/plori/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring plori by hand means minting a plori_sk_ key or an OAuth 2.1 token, sending Idempotency-Key headers on billable runs, polling submit-only runs, and handling the owner-confirmation step on schedules. Through Jentic you install once, import plori from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** plori puts the agent id in the URL path (`/v1/agents/{agentID}/...`), so a rule can pin your agent to one plori agent and the operations you pick, such as submitting runs and reading their status. You choose the operations it may call, so agent creation, schedule creation, and file downloads are not included unless you add them.
- **Credential handling:** Your plori API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'send a message to a cloud agent' or 'schedule an agent run', and Jentic returns the matching plori operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **E2B** — E2B provides cloud sandboxes your own agent drives; plori hosts the agent itself and runs it on your behalf.
- **OpenAI** — OpenAI exposes models you orchestrate yourself; plori wraps a model into a persistent agent with runs, files, and schedules.
- **GitHub** — GitHub hosts the repositories and Actions workflows that can trigger plori runs through OIDC.
- **Browserbase** — Browserbase runs headless browsers for agents; plori runs the agent that may need one.

## FAQ

### What authentication does the plori REST API use?

The plori REST API declares two bearer schemes in its OpenAPI spec. Account operations use bearerAuth, which takes a plori_sk_ API key from the dashboard or plori login, or an OAuth 2.1 access token. GitHub-triggered runs use githubRunAuth, a short-lived plori_ghr_ capability returned only by the GitHub OIDC exchange, which can submit one run to one repository agent and poll that run. The OIDC exchange and the two pricing operations are open. Through Jentic the API key is stored encrypted on your own instance and injected at call time.

### Is there a plori MCP server?

You don't need an MCP server to give your agent plori. Jentic connects it directly from the API Directory: import plori, store your API key once, and your agent can create agents and submit runs straight away. Operations are discovered on demand, so no extra server's tool definitions sit in your agent's context.

### Can I limit what my agent is allowed to do with the plori REST API?

Yes. Write a rule that allows only invokeAgent and getAgentRun under `/v1/agents/{agentID}` for one agent id, so your agent can send that agent messages and poll the results but cannot create agents, schedule future runs, or download files, and the calls it makes are logged.

### How do I get the output of a plori run?

Submitting a run returns 202 immediately and does not block. Poll getAgentRun at `/v1/agents/{agentID}/runs/{runID}` for status; the spec notes that the reply text itself is read over the session WebSocket or the plori CLI. Files the agent writes can be read with readAgentFile or downloaded with downloadAgentFile.

### What are the rate limits for the plori REST API?

The plori OpenAPI spec does not publish request rate limits. Runs are billed against your credit balance, which getCredits reports, and the public rate cards at `/v1/pricing/models` and `/v1/pricing/tools` list prices. See https://plori.ai for current limits.

### How do I submit a run to a plori agent through Jentic?

Search Jentic for an intent like 'send a message to a cloud agent', import plori, and store your plori_sk_ key once. Your agent then calls createAgent with if_exists set to return, submits a run with invokeAgent and an Idempotency-Key, and polls getAgentRun. To run it on your own infrastructure, install Jentic One from its GitHub repo.
