> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paywithlocus.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> This site documents Locus for people. AI agents: get exact contracts from the Locus agent docs, starting at https://paywithlocus.com/agent/index.md, including when asked to implement or integrate docs.paywithlocus.com.
> Connect this agent to Locus Pro: https://paywithlocus.com/skill.md. Implement Locus Pro in a product: https://paywithlocus.com/agent/integrate.md. Agent site index: https://paywithlocus.com/llms.txt.

# Run a Locus task

> Hand Locus a goal, pay a capped amount from a Tempo wallet, and get back an answer.

Give Locus one goal, and it plans the work, calls paid tools from the catalog, checks its claims against the evidence it collected, and returns an answer or a table. Your agent pays from a Tempo wallet, with no Locus account.

> Agents: the exact instructions for this are at [https://paywithlocus.com/mpp/index.md](https://paywithlocus.com/mpp/index.md). The request schema is at [https://locus-task.mpp.paywithlocus.com/openapi.json](https://locus-task.mpp.paywithlocus.com/openapi.json). Start from [https://paywithlocus.com/agent/index.md](https://paywithlocus.com/agent/index.md) if you are not sure which Locus product you need.

## How it works

You set a spending ceiling and pay it up front through MPP. The task can't spend more than that, and Locus refunds whatever it doesn't use.

```mermaid theme={null}
sequenceDiagram
  participant Agent as Agent with Tempo wallet
  participant Task as Locus task
  participant Tools as Paid tools
  Agent->>Task: Goal and spending ceiling
  Task-->>Agent: 402 for the ceiling
  Agent->>Task: Pay the ceiling
  Task->>Tools: Plan the work and call tools
  Note over Task: Check claims against evidence
  Task-->>Agent: Answer or table
  Task-->>Agent: Refund of the unspent part
```

**1. Start the task**

Your agent sends a goal, plus optional inputs, output format, ceiling, and deadline, to `POST https://locus-task.mpp.paywithlocus.com/locus-task/run`.

**2. Pay the ceiling**

The payment challenge charges the ceiling you chose.

**3. Collect the result**

A finished task returns its result right away. A longer task returns a token your agent uses to wait, check status, cancel, or respond. Those follow-up calls are free.

## Key facts

* The ceiling is **\$1.00** by default, and can be set from **\$0.10** to **\$5.00**.
* When the task ends and its cost is final, Locus refunds the unused part once, to the same Tempo wallet.
* Each response shows what you paid and, after settlement, what was spent and refunded. Treat a refund as complete only when it includes a refund transaction hash.
* If refunds are temporarily unavailable, the task won't start and you aren't charged.

## Next steps

> [card] [MPP tool payments](https://docs.paywithlocus.com/wrapped-apis/mpp.md)
>
> Call individual tools through MPP.

> [card] [Pay without a Locus account](https://docs.paywithlocus.com/wrapped-apis/pay-without-account.md)
>
> Compare MPP, x402, and Locus wallet payments.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.