GET
/
interactions
import { ProficientClient } from "@proficient/client";

const proficient = new ProficientClient({
  apiKey: process.env.PROFICIENT_AI_PUBLISHABLE_KEY,
  userExternalId: "...", // The user's unique ID in your system
});

const agentId = "ag_Lad8YCGGiDLiqIZPWRXmc2ix";

const { data: interactions } = await proficient.interactions.list({ agentId });
{
  "data": [
    {
      "id": "<string>",
      "object": "interaction",
      "agent_id": "<string>",
      "archived": true,
      "created_at": 123,
      "initial_turn": "user",
      "name": "<string>",
      "total_message_count": 123,
      "updated_at": 123,
      "user_id": "<string>"
    }
  ],
  "has_more": true
}
import { ProficientClient } from "@proficient/client";

const proficient = new ProficientClient({
  apiKey: process.env.PROFICIENT_AI_PUBLISHABLE_KEY,
  userExternalId: "...", // The user's unique ID in your system
});

const agentId = "ag_Lad8YCGGiDLiqIZPWRXmc2ix";

const { data: interactions } = await proficient.interactions.list({ agentId });

Query Parameters

agent_id
string | null

The unique identifier of the agent

limit
string | null

Used to specify the maximum number of objects that can be returned. Must be an integer ranging from 1 to 100. Defaults to 20.

starting_after
string | null

A pagination cursor parameter that takes an object ID as a value. This indicates the position of the list where you want to start fetching the data. For example, if your first request returns 100 objects ending with obj_100, you can use starting_after=obj_100 in your subsequent API call to retrieve the next page of the list.

Response

200
application/json
data
object[]
required
<p>Users communicate with agents via <i>interactions</i>. You can think of each interaction as a conversation between an agent and user.</p>
has_more
boolean
required

Whether the database has more items after this list. If true, then you can send more paginated requests to exhaust the remaining items.