Conversations

The Directory API gives you access to Organizations, Accounts, Employees and Groups. Every Entity within the subsequent API calls must have an Organization attached and API calls must be made with a User specific JWT.

List active conversations for the current user.

get
Responses
200
Success
application/json
get
GET /api/v1/agent/conversations HTTP/1.1
Host: api.peoplelogic.dev
Accept: */*
[
  {
    "id": "c123e4567-e89b-12d3-a456-426614174001",
    "userId": "user123",
    "tenant": "tenantXYZ",
    "timestamp": "2025-07-13T15:00:00Z",
    "name": "Project Kickoff Discussion"
  }
]

Start a new conversation.

post
Responses
200
Success
application/json
post
POST /api/v1/agent/conversations/start HTTP/1.1
Host: api.peoplelogic.dev
Accept: */*
{
  "id": "d123e4567-e89b-12d3-a456-426614174002",
  "userId": "user123",
  "tenant": "tenantXYZ",
  "timestamp": "2025-07-13T15:05:00Z",
  "name": ""
}

Update a conversation's details.

put
Path parameters
idstringRequired

Conversation ID

Body
idstringOptional

Conversation unique identifier.

userIdstringOptional

ID of the user who owns this conversation.

tenantstringOptional

Tenant/workspace identifier to which this conversation belongs.

timestampstring · date-timeOptional

Timestamp when the conversation was created.

namestringOptional

Friendly name of the conversation.

Responses
200
Success
application/json
put
PUT /api/v1/agent/conversations/{id} HTTP/1.1
Host: api.peoplelogic.dev
Content-Type: application/json
Accept: */*
Content-Length: 167

{
  "id": "c123e4567-e89b-12d3-a456-426614174001",
  "userId": "user123",
  "tenant": "tenantXYZ",
  "timestamp": "2025-07-13T15:00:00Z",
  "name": "Project Kickoff Discussion (Updated)"
}
{
  "id": "c123e4567-e89b-12d3-a456-426614174001",
  "userId": "user123",
  "tenant": "tenantXYZ",
  "timestamp": "2025-07-13T15:00:00Z",
  "name": "Project Kickoff Discussion (Updated)"
}

Delete a conversation.

delete
Path parameters
idstringRequired

Conversation ID

Responses
200
Success (conversation deleted)
delete
DELETE /api/v1/agent/conversations/{id} HTTP/1.1
Host: api.peoplelogic.dev
Accept: */*

No content

Get agent task assignments (follow-up).

post

Retrieve the list of tasks assigned by the agent for the user's last question. Requires an existing conversation (conversationId must be provided).

Body
questionstringOptional

User's question or message.

maxResultsintegerOptional

Max number of results or steps (defaults to 5).

additionalInstructionsstringOptional

Additional instructions or context for the agent.

conversationIdstringOptional

ID of an existing conversation (for follow-ups; omit for new questions).

sincestring · date-timeOptional

If provided, get history messages since this timestamp (used in history request).

Responses
200
Success
application/json
post
POST /api/v1/agent/assign HTTP/1.1
Host: api.peoplelogic.dev
Content-Type: application/json
Accept: */*
Content-Length: 78

{
  "question": "How can I improve team productivity?",
  "conversationId": "conv123"
}
{
  "response": "I will compile the sales data and draft an email. Would you like me to proceed?",
  "needsConfirmation": true,
  "newWorkflow": false,
  "agents": [
    {
      "agent": {
        "name": "Peoplelogic Agent",
        "persona": "A general purpose AI agent."
      },
      "specificTask": "Compile Q1 and Q2 sales data",
      "step": 0,
      "dependsOn": -1,
      "workflowAssignment": false
    },
    {
      "agent": {
        "name": "Peoplelogic Agent",
        "persona": "A general purpose AI agent."
      },
      "specificTask": "Draft an email summarizing the sales data",
      "step": 1,
      "dependsOn": 0,
      "workflowAssignment": false
    }
  ],
  "subscriptionActive": true,
  "userId": "tenantXYZ_user123"
}

Ask a question (start a new conversation).

post

Submit a question to the Peoplelogic agent. Do not include a conversationId (a new conversation will be started).

Body
questionstringOptional

User's question or message.

maxResultsintegerOptional

Max number of results or steps (defaults to 5).

additionalInstructionsstringOptional

Additional instructions or context for the agent.

conversationIdstringOptional

ID of an existing conversation (for follow-ups; omit for new questions).

sincestring · date-timeOptional

If provided, get history messages since this timestamp (used in history request).

Responses
200
Success
application/json
post
POST /api/v1/agent/ask HTTP/1.1
Host: api.peoplelogic.dev
Content-Type: application/json
Accept: */*
Content-Length: 51

{
  "question": "How can I improve team productivity?"
}
{
  "success": true,
  "agent": {
    "name": "Peoplelogic Agent",
    "persona": "A general purpose AI agent.",
    "coordinator": true
  },
  "reply": "Encourage open communication and regular feedback...",
  "sources": [
    {
      "name": "Employee Handbook",
      "type": "document",
      "url": "https://example.com/handbook.pdf"
    }
  ],
  "confirming": false
}

Send a reply in a conversation.

post

Send a follow-up message or confirmation in an existing conversation. This is typically used to confirm task execution or ask a clarifying question, using the conversationId from a previous response.

Body
questionstringOptional

User's question or message.

maxResultsintegerOptional

Max number of results or steps (defaults to 5).

additionalInstructionsstringOptional

Additional instructions or context for the agent.

conversationIdstringOptional

ID of an existing conversation (for follow-ups; omit for new questions).

sincestring · date-timeOptional

If provided, get history messages since this timestamp (used in history request).

Responses
200
Success
application/json
post
POST /api/v1/agent/reply HTTP/1.1
Host: api.peoplelogic.dev
Content-Type: application/json
Accept: */*
Content-Length: 62

{
  "question": "Yes, please proceed.",
  "conversationId": "conv123"
}
{
  "success": true,
  "agent": {
    "name": "Peoplelogic Agent",
    "persona": "A general purpose AI agent.",
    "coordinator": true
  },
  "reply": "Sure, I've sent the summary email to the team.",
  "confirming": false
}

Upload a file to the knowledge base (Admin only).

post
Body
filestring · binaryOptional
Responses
200
Success
application/json
post
POST /api/v1/agent/add-file-knowledge HTTP/1.1
Host: api.peoplelogic.dev
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17

{
  "file": "binary"
}
{
  "success": true,
  "agent": {
    "name": "Peoplelogic Agent",
    "persona": "A general purpose AI agent.",
    "coordinator": true
  },
  "reply": "Added handbook.pdf to the knowledge base for your organization!",
  "confirming": false
}

Add a URL to the knowledge base (Admin only).

post
Body
string · uriOptional
Responses
200
Success
application/json
post
POST /api/v1/agent/add-url-knowledge HTTP/1.1
Host: api.peoplelogic.dev
Content-Type: text/plain
Accept: */*
Content-Length: 30

"https://docs.example.com/FAQ"
{
  "success": true,
  "agent": {
    "name": "Peoplelogic Agent",
    "persona": "A general purpose AI agent.",
    "coordinator": true
  },
  "reply": "Added https://docs.example.com/FAQ to the knowledge base for your organization!",
  "confirming": false
}

Was this helpful?