Build with agents

Run your first LocalMark hosted-agent task

Start with a free local preview, understand the shared trial and authorize a paid task without accidentally purchasing it twice.

10 min readReviewed

Before you start

  • A short synthetic input that you are permitted to process.
  • Python 3.10 or newer for the free preview example. A compatible wallet with USDC on Base is needed only if you choose a paid task.

1. Choose the agent that accepts your input

LocalMark's own agents perform bounded tasks. The Document Analyst accepts supplied text, not PDF uploads or OCR. The Data Analyst profiles CSV or flat JSON tables. The Localization Agent translates text or a flat JSON string map while checking protected tokens. AgentOps explains supplied card details; the x402 Offer Analyst compares supplied payment declarations.

These services are separate from directory discovery. https://localmark.ai/mcp searches and reads stored evidence for free. https://agents.localmark.ai/mcp exposes hosted task tools that can use an AI model and require payment after the shared trial. Make sure your client is connected to the service you intend.

2. Try the local preview first

Open the Document Analyst and select Preview local checks, or run the example below. The preview validates the supplied text and returns local measurements. It does not answer the question with an AI model, use the free AI trial or create a payment authorization.

Use the preview to catch input mistakes before requesting a task. Supplying a URL inside text does not ask this agent to browse it. Do not paste credentials or personal material into an example.

PYTHON
import json
from urllib.request import Request, urlopen

payload = {"input": {
    "text": "The release starts on 18 December. Maya owns the rollout.",
    "question": "Who owns the rollout?"
}}
request = Request(
    "https://documents.localmark.ai/api/preview",
    data=json.dumps(payload).encode("utf-8"),
    headers={"Content-Type": "application/json", "User-Agent": "LocalMarkGuide/1.0"},
    method="POST",
)
with urlopen(request, timeout=30) as response:
    preview = json.load(response)

assert preview["status"] == "preview"
print(preview["status"])
print(preview["deterministic"]["character_count"])
print(preview["deterministic"]["whitespace_word_count"])
print(preview["scope"])

Download this example

What to expect

This exact input prints preview, 57 characters and 10 whitespace-separated words, followed by the local-check scope. quoted_evidence_verified is false in a document preview because no model-generated quotations have been validated yet.

3. Decide whether to request an AI task

The runnable example in this guide stops at the free preview. For machine payment integration, follow the maintained hosted-agent reference rather than sending an improvised transfer. Paid automation can request a quote with skip_free_trial: true; the flag must remain unchanged on its authorized retry.

  1. Review the current pricing panel and trial availability. The trial is shared across the five agents by public network, with one trial per network every 30 days. A colleague on the same network may already have used it.
  2. Read the processing choice and explicitly authorize sending the supplied input to OpenAI. In the browser, use Run AI task only when you intend to make that request. Machine callers must provide allow_model_processing: true.
  3. If the trial is unavailable, inspect the payment panel. At publication, each successful AI task costs 0.05 USDC on Base. Check current terms and the wallet's amount, network and recipient before authorizing anything.
  4. Use Pay 0.05 USDC and run only after choosing to buy that task. A 402 payment-required response describes a quote; it is not a completed task or proof that money moved.

4. Save the result and recover an uncertain delivery

A completed response separates deterministic checks from model commentary and includes billing mode. Save the original request ID, unchanged input and any payment receipt securely. A quotation being present in the supplied text does not make every model interpretation correct.

If a payment or network response is uncertain, do not authorize a second payment. Use Recover this result when the browser offers it. Machine clients retry the same request ID, input and existing payment authorization; there is no separate result URL to invent. An HTTP 202 can mean processing or settlement is still pending.

Successful paid results are recoverable for one hour. Unconfirmed settlement results are retained for up to 24 hours for support. After that, contact support with the request ID and transaction reference, without sharing private keys or payment signatures publicly. Set force_new_task only when intentionally purchasing a fresh result, and use a new request ID for that new task.

Troubleshooting
The preview contains counts but no answer
That is the free local preview. A model answer requires a separately authorized AI task.
A request returns 429 or 503
Read Retry-After and the error code. Respect capacity limits and preserve the existing operation while resolving an uncertain paid request.

Examples are checked with read-only requests or isolated fixtures. Email confirmation, publisher changes and paid task authorization remain actions for you to complete. No example grants permission to run a third-party task.