Skip to main content
POST
Search an agent's file history

Authorizations

Authorization
string
header
required

A Recursion API key, created in the console under API keys.

Headers

x-tenant-id
string

Optional tenant consistency check. When present, it must name the tenant bound to the API key, including when x-organization-id is default.

Minimum string length: 1
x-organization-id
string

Organization in which to act. Required for a tenant-scoped API key. Optional for an organization-scoped key, where it must name that same organization. The value may be an organization id or default.

Minimum string length: 1

Path Parameters

agentId
string<uuid>
required

Agent id (UUID) as returned by managedAgentsCreateAgent or managedAgentsListAgents.

Body

application/json
cursor
string

nextCursor from the previous page. The rest of the request must be unchanged.

filter
object

Structured conditions. Omit to browse.

limit
null | integer
default:20

Page size, default 20.

Required range: 1 <= x <= 100
sort
enum<string>
default:created_at_desc

created_at_desc (default) lists newest first; relevance ranks by text match and needs text.

Available options:
created_at_desc,
relevance
strictContent
boolean
default:false

Fail with content_index_incomplete instead of returning results when some candidate files could not be text-searched.

text
string

Words to find in the text of the files. All words must appear; a quoted "phrase" must appear as written; OR between words matches either; -word excludes. Only text formats are searched, and coverage says what was not.

Response

One page of an agent file search: the session outputs this agent's earlier sessions saved that match, with a cursor for the next page and the coverage of text search.

One page of an agent file search: the session outputs this agent's earlier sessions saved that match, with a cursor for the next page and the coverage of text search.

asOf
string<date-time>
required

The snapshot every page of this search reads: files saved after it are not included.

coverage
object
required

How completely the search covered the eligible files.

items
object[]
required

Matching files, in the requested order.

nextCursor
null | string
required

Opaque cursor for the next page, passed back unchanged with the same request; null on the last page.

total
integer<int64>
required

Exact number of files matching every condition in this search's snapshot.

Required range: 0 <= x <= 9007199254740991