List an agent's source files

GET
/v1/agents/{id}/source

Lists the files of an agent's working copy with their sizes and hashes, what the tree weighs, the limits your plan sets (the largest file, the most files, the biggest tree, the most snapshots, the most source in the workspace) and the Git repository the source comes from, if one is recorded. The files are your own, kept in your workspace's own storage.

Requires an API key with the workspace:read scope.

Authorization

apiKey
headerAuthorizationBearer <token>

A secret API key from the dashboard (Developers → API keys): vl_live_…, or vl_test_… for test mode. Each operation says which scope the key needs.

Path Parameters

id*string

The agent id.

Response Body

The working copy's files, their weight, the limits and the Git record

application/json
  1. response
agentId*string
Formatuuid
files*array<>
totalBytes*integer
Range0 <= value
limits*
git*|null
Example Request
curl "https://api.vlayers.ai/v1/agents/$AGENT_ID/source" \  -H "Authorization: Bearer $VOICELAYER_API_KEY"
Example Response
{  "agentId": "0192f5c2-6f7a-7b9c-8d1e-2f3a4b5c6d78",  "files": [    {      "path": "src/index.ts",      "sizeBytes": 1204,      "sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",      "updatedAt": "2026-10-20T15:04:05.000Z"    }  ],  "totalBytes": 1204,  "limits": {    "maxFileBytes": 2097152,    "maxFiles": 2000,    "maxTreeBytes": 52428800,    "maxSnapshotsPerAgent": 30,    "maxWorkspaceBytes": 1073741824  },  "git": null}