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
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}Interactions
List all interactions
Returns a list of interactions associated with the user. The interactions are returned sorted by creation date, with the most recently created interactions appearing first.
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
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}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 });
Authorizations
Query Parameters
The unique identifier of the agent
Used to specify the maximum number of objects that can be returned. Must be an integer ranging from 1 to 100. Defaults to 20.
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.

