API referenceAgents APISessionsResourcesAdd a resource

Add a session resource

⚠️
Preview — this feature is being built; the design below is the spec.
POST https://app.syntic.ai/v1/sessions/{session_id}/resources

Mount a file, a Git repository or a memory store into a running or idle session. The mount appears in the session’s environment before the agent’s next turn, and a resource.added event is written to the event log so the agent is told the path exists. Resources added at session creation through the resources field behave the same way.

For how this fits into a full workflow, see Session resources.

Headers

HeaderRequiredValue
AuthorizationYesBearer <key>: a private inference key (sk_live_...). See Authentication.
syntic-betaYes, while in previewagents-2026-11-01. Without it the call fails with 400 beta_required. See Versioning.
Content-TypeYesapplication/json
Idempotency-KeyNoUp to 255 characters. Retrying with the same key within 24 hours returns the first result instead of acting twice. See Idempotency.

Path parameters

ParameterTypeDescription
session_idstringThe session id, starting with sesn_.

Body parameters

ParameterTypeRequiredNotes
kindstringYesfile, git_repository or memory_store.
file_idstringFor fileA file uploaded with purpose agent_input. Up to 500 MB.
gitobjectFor git_repositoryurl (HTTPS), ref (branch, tag or commit; default branch if left out) and vault_secret, the name of a secret in the session’s vault holding a read token.
memory_store_idstringFor memory_storeAttaches the store’s tools to this session only. The agent’s own stores stay attached.
mount_pathstringNoAbsolute path under /workspace. Defaults to /workspace/inputs/<filename> for files and /workspace/<repo name> for repositories.
read_onlybooleanNoDefault true for files, false for repositories.

Response

201 Created, Content-Type: application/json

{
  "id": "sres_01JCB1D3F5H7K9M1P3R5",
  "type": "session_resource",
  "session_id": "sesn_01JC7M2K4P6R8T0V2X4Z",
  "kind": "file",
  "file_id": "file_01JC3D5F7H9K1M3P5R7T",
  "mount_path": "/workspace/inputs/orders-q3.csv",
  "read_only": true,
  "status": "mounted",
  "error": null,
  "created_at": "2026-11-05T10:01:00Z",
  "updated_at": "2026-11-05T10:01:02Z"
}
FieldTypeDescription
idstringStarts with sres_.
kindstringfile, git_repository or memory_store.
file_idstringFor kind: file: the Files API id that is mounted.
gitobjectFor kind: git_repository: url, ref, the resolved commit, and the vault secret used to clone.
mount_pathstringAbsolute path under /workspace inside the session’s environment.
read_onlybooleanRead-only mounts reject writes from the agent’s tools.
statusstringpending, mounted, failed or removed.
errorobject or nullWhy mounting failed: code and message.

Examples

curl -sS "https://app.syntic.ai/v1/sessions/sesn_01JC7M2K4P6R8T0V2X4Z/resources" \
  -H "Authorization: Bearer $SYNTIC_API_KEY" \
  -H "syntic-beta: agents-2026-11-01" \
  -H "Idempotency-Key: 8d6f0c1e-4b2a-4a57-9f0e-2f1d3c4b5a69" \
  -H "Content-Type: application/json" \
  -d '{
      "kind": "file",
      "file_id": "file_01JC3D5F7H9K1M3P5R7T",
      "mount_path": "/workspace/inputs/orders-q3.csv"
    }'

Errors

Errors use the error envelope and carry a request_id. Codes specific to this operation:

StatustypecodeWhen
400invalid_request_errorbeta_requiredThe syntic-beta header is missing.
400invalid_request_errorinvalid_mount_pathThe path is outside /workspace or already used by another resource.
400invalid_request_errorfile_purpose_mismatchThe file was not uploaded with purpose agent_input.
409conflict_errorresource_limit_reachedThe session already has 50 resources.
409conflict_errorsession_archivedArchived sessions are read-only.
404not_found_errorsession_not_foundNo session with this id in the key’s workspace.
401authentication_errorinvalid_api_keyThe key is missing, unknown, revoked or expired.
429rate_limit_errorrate_limitedToo many requests; wait for Retry-After. See Rate-limit headers.

Repositories are cloned shallowly (depth 50). A clone that takes longer than 120 seconds fails with status: failed and error.code: clone_timeout; the session keeps running without it.

Was this page helpful?