Fency.ai
Sessions

Create explore memories session

POST
/v1/sessions

Create a session for an EXPLORE_MEMORIES agent task. Optional background and examples steer how the agent explores memories. Use guardRails.memoryTypes to restrict which memories it can access.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/sessions" \  -H "Content-Type: application/json" \  -d '{    "createAgentTask": {      "taskType": "EXPLORE_MEMORIES",      "background": "You help users find relevant contracts from document content and metadata.",      "examples": [        {          "query": "Which parents lack a matching child?",          "approach": "Use keywordSearch parentForEach and filter empty search_matching_memory_ids."        }      ],      "guardRails": {        "memoryTypes": [          {            "memoryTypeId": "mty_cf4fe6caa10b4009a8b103d2d5d64042",            "memoryIds": [              "mem_cf4fe6caa10b4009a8b103d2d5d64042"            ]          }        ]      }    }  }'
{  "id": "example-session-id",  "createdAt": "2024-04-08T17:02:27.887295Z",  "type": "CREATE_AGENT_TASK",  "clientToken": "client token"}