Skip to content
Konstera
Capability catalogue
filesread

files.get

Get file

Fetch one file by ID: metadata, link, and its text when the file is text-like (txt, md, html, csv, json, xml). Other formats return metadata and a link only.

Effect
read
Fanout
no
Cache TTL
none
Traits
none

Request arguments

Passed as the args parameter to ctx.capability.call("files.get", …).

FieldTypeRequiredDescription
idstringyes

Response

Returned by ctx.capability.call("files.get", …).

FieldTypeRequiredDescription
idstringyes
urlstringno
namestringyes
pathstring | nullno
sizeintegerno
textstring | nullno
isFolderbooleanno
mimeTypestring | nullno
truncatedbooleanno
lastModifiedstring | nullno
format: date-time
textAvailablebooleanyes

Example call

From inside your agent's handle(). The kernel resolves files.get to the tenant's connector binding at invocation time.

response = await ctx.capability.call(
    "files.get",
    args={
        "id": "...",
    },
)

See SDK quickstart for the full agent handler template; code examples covers invocation patterns including fanout and error handling.