Managing Custom Agents

List agents, agent types, marketplace publishing

Written By jazilkalim

Last updated 3 months ago

What are Custom Agents?

Custom agents in CampusMindAI are AI-powered assistants that users can build, configure, and share. Agents can be specialized for specific tasks, integrated with workflows and MCP servers, and published to the marketplace.

Why Use Custom Agents?

  • Specialized Tasks: Create agents for specific use cases beyond VTAs

  • Workflow Integration: Connect agents with n8n workflows and MCP servers

  • Marketplace Sharing: Publish agents for other users

  • Access Control: Manage who can use your agents through groups

List Agents

Retrieve a paginated list of agents with continuation token support.

Endpoint Details

  • Method: POST

  • URL: {{baseURL}}/api/v1/list_agents

  • Authentication: Required (JWT Bearer token)

Request Body

ParameterTypeRequiredDescription

list_agents_continuation_token

string

No

Token for pagination (null for first page)

Example Request

curl -X POST "https://<baseURL>/api/v1/list_agents" \
  -H "Authorization: Bearer <jwt-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "list_agents_continuation_token": null
  }'

Response

Status Code: 200 OK

{
  "agents": [
    {
      "id": "doc-123",
      "agent_vector_store_id": "vs-456",
      "agent_unique_id": "agent-789",
      "agent_name": "Research Assistant",
      "agent_description": "Helps with research and citations",
      "agent_system_prompt": "You are a research assistant...",
      "agent_publish_marketplace": 1,
      "agent_category": ["Research", "Education"],
      "agent_access": ["groups"],
      "agent_assistant_type": "custom_agent",
      "agent_active": 1,
      "agent_conversation_starters": [
        "Help me find sources on...",
        "Summarize this research paper"
      ],
      "agent_created_at": "2024-11-15T10:30:00Z",
      "agent_updated_at": "2024-12-01T14:20:00Z",
      "agent_id": "asst_abc123",
      "agent_conn_onedrive": 0,
      "agent_conn_googledrive": 1,
      "agent_conn_web": 1,
      "agent_conn_openapi": 0,
      "agent_conn_box": 0,
      "agent_conn_sharepoint": 0,
      "agent_conn_fabric": 0,
      "agent_conn_dropbox": 0,
      "agent_code_interpreter_enabled": 1,
      "agent_internet_search_enabled": 1,
      "agent_image_generation_enabled": 0,
      "tenant_id": "d508624f-a0b7-4fd3-9511-05b18ca02784",
      "tenant_name": "University ABC",
      "user_id": "user@example.com",
      "user_name": "John Doe",
      "user_email": "user@example.com",
      "user_role": 2
    }
  ],
  "list_agents_continuation_token": "token-for-next-page"
}

Key Response Fields

FieldTypeDescription

agent_id

string

Unique agent identifier

agent_name

string

Agent name

agent_description

string

Agent description

agent_publish_marketplace

integer

1=published, 0=private

agent_category

array

Categories for marketplace

agent_access

array

Access control (e.g., ["groups"])

agent_active

integer

1=active, 0=inactive

agent_conn_*

integer

Connection status for integrations (1=enabled, 0=disabled)

agent_code_interpreter_enabled

integer

Code execution capability

agent_internet_search_enabled

integer

Web search capability

agent_image_generation_enabled

integer

Image generation capability

list_agents_continuation_token

string/null

Token for next page (null if no more pages)

Agent Features

Marketplace Publishing

Agents can be published to the CampusMindAI marketplace:

  • agent_publish_marketplace: 1 - Available in marketplace

  • agent_publish_marketplace: 0 - Private to creator/organization

Access Control

Agents support group-based access:

"agent_access": ["groups"]

Use the agent-group association endpoints to control which groups can access the agent.

Integrations

Agents can connect to multiple data sources and services:

FieldDescription

agent_conn_onedrive

OneDrive integration

agent_conn_googledrive

Google Drive integration

agent_conn_web

Web search capability

agent_conn_openapi

OpenAPI/Webhook integration

agent_conn_box

Box storage integration

agent_conn_sharepoint

SharePoint integration

agent_conn_fabric

Microsoft Fabric integration

agent_conn_dropbox

Dropbox integration

Capabilities

Agents can have various AI capabilities enabled:

  • Code Interpreter: Execute code snippets

  • Internet Search: Search the web for information

  • Image Generation: Generate images based on prompts

Pagination

First Page

{
  "list_agents_continuation_token": null
}

Subsequent Pages

Use the token from the previous response:

{
  "list_agents_continuation_token": "token-from-previous-response"
}

Continue until list_agents_continuation_token is null.

Filtering Agents

Filter agents in your application after retrieving them:

By Marketplace Status

const publishedAgents = agents.filter(a => a.agent_publish_marketplace === 1);
const privateAgents = agents.filter(a => a.agent_publish_marketplace === 0);

By Category

const researchAgents = agents.filter(
  a => a.agent_category.includes("Research")
);

By Active Status

const activeAgents = agents.filter(a => a.agent_active === 1);

By Creator

const myAgents = agents.filter(a => a.user_email === "myemail@example.com");

Agent vs VTA

FeatureCustom AgentVTA

Purpose

General tasks

Course-specific teaching

Type

custom_agent

vta

Integration

Workflows, MCP servers

Canvas, Blackboard

Marketplace

Can be published

Course-specific

Access

Group-based

Course enrollment

Error Responses

Status CodeDescription

401 Unauthorized

Invalid or missing JWT token

500 Internal Server Error

Server error

Common Use Cases

List All Agents

curl -X POST "https://<baseURL>/api/v1/list_agents" \
  -H "Authorization: Bearer <jwt-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "list_agents_continuation_token": null
  }'

Find Agents with Web Search

Filter results for agent_internet_search_enabled: 1.

List Published Agents

Filter results for agent_publish_marketplace: 1.

Best Practices

  • Use continuation tokens: Always use the provided token for pagination

  • Cache results: Store agent lists to reduce API calls

  • Filter locally: Retrieve all agents and filter in your application

  • Check active status: Only show active agents to users