# List an agent's source files

Source: https://docs.vlayers.ai/reference/hosting/list-agent-source

`GET /v1/agents/{id}/source` · scope `workspace:read`

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.

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | The agent id. Example: `"0192f5c2-6f7a-7b9c-8d1e-2f3a4b5c6d78"` |

## Request

cURL:

```bash
curl "https://api.vlayers.ai/v1/agents/$AGENT_ID/source" \
  -H "Authorization: Bearer $VOICELAYER_API_KEY"
```

TypeScript:

```ts
import { VoiceLayer } from '@voicelayer/api';

const voicelayer = new VoiceLayer();

const { files } = await voicelayer.hosting.listAgentSource('<agent-id>');
console.log(files);
```

Python:

```python
from voicelayer import VoiceLayer

vl = VoiceLayer()

result = vl.hosting.list_agent_source("<agent-id>")
print(result.files)
```

## Response `200`

```json
{
  "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
}
```
