Connect Agent to Volume
POST /agent/connect
Connect an agent to a volume (grant access). Only the volume owner can do this.
Request​
Body:
| Field | Type | Required | Description |
|---|---|---|---|
agent_id | string (UUID) | Yes | Agent ID |
volume_id | string (UUID) | Yes | Volume ID |
permissions | string[] | No | Permissions array (default: ["read", "write"]) |
Response​
{
"status": "connected",
"agent_id": "a1b2c3d4-...",
"volume_id": "e5f6g7h8-..."
}
Disconnect​
DELETE /agent/:agent_id/disconnect/:volume_id
Remove an agent's access to a volume.
{
"status": "disconnected"
}
Example​
# Connect
curl -X POST https://api.sharedmemory.ai/agent/connect \
-H "Content-Type: application/json" \
-d '{
"agent_id": "a1b2c3d4-...",
"volume_id": "e5f6g7h8-...",
"permissions": ["read", "write"]
}'
# Disconnect
curl -X DELETE https://api.sharedmemory.ai/agent/a1b2c3d4-.../disconnect/e5f6g7h8-...