Start Agent

An agent run: a prompt (and optional URLs and JSON Schema) in, the answer with its sources out. It searches, maps and reads pages through the same ladder as a crawl, and charges the same way: pages as they are read (refused pages free), model tokens at the model's price plus 20% (or 1 per 1k tokens on your own connectionId); maxCredits caps the run (2,000 by default). Runs in the background: 202 with next to poll at GET /agent/{id}, or wait up to timeout seconds. With a webhook the run's life is posted to it, signed with webhookSecret (returned here once).

post/api/v1/agent

Request

  • Base URL: https://api.mesharc.dev (the document declares no server; this is the origin it was published from)
  • URL: https://api.mesharc.dev/api/v1/agent
  • Auth: none declared

Headers

authorizationstring nullable
x-mesharc-tenantstring nullable

Request body

promptstring required
urlsstring[] nullable
schemaobject nullable
maxCreditsinteger nullable
maxStepsinteger nullable
allowedDomainsstring[] nullable
timeoutnumber nullable
connectionIdstring nullable
proposalsboolean nullable
loginIdstring nullable
dataConnectionsstring[] nullable

Response

Successful Response

idstring required
kindstring required
statusstring required
promptstring required
paramsobject required
fieldSourcesobject
creditsUsedinteger required
budgetinteger required
budgetLimitedboolean required
tokensobject required
stepsinteger required
modelstring required
threadIdstring required
continuesRunIdstring nullable
continuedBystring nullable
followsRunIdstring nullable
followedBystring nullable
stopReasonstring required
errorstring required
doingobject nullable
nextstring nullable
createdAtstring nullable
startedAtstring nullable
finishedAtstring nullable
expiresAtstring nullable
request_idstring required
webhookSecretstring nullable

Changes

No recorded changes to this operation across all 1 revision of this API.