Custom Agents
List all custom agents for Admin (status = 'ACTIVE', 'PENDING', 'REJECTED').
Args: username: Authenticated username db: Database session
Returns: List of all custom agents for admin
Enter your JWT token (without 'Bearer ' prefix)
Successful Response
Response for listing custom agents for Admin.
Validation Error
GET /api/v1/custom_agents/admin/list HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"agents": [
{
"agent_id": 1,
"name": "text",
"description": "text",
"status": "PENDING",
"version": "text",
"submitted_by": "text",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"error_message": "text",
"reviewed_by": "text",
"reviewed_at": "2026-01-01T00:00:00.000Z",
"rejection_reason": "text",
"status_changed_by": "text",
"status_changed_at": "2026-01-01T00:00:00.000Z",
"submitted_at": "2026-01-01T00:00:00.000Z",
"assigned_roles": [
"text"
],
"feedback_message": "text"
}
],
"total": 1
}Get custom agents submitted by the authenticated user.
Args: username: Authenticated username db: Database session
Returns: List of all custom agents for users
Enter your JWT token (without 'Bearer ' prefix)
Successful Response
Response for listing custom agents.
Validation Error
GET /api/v1/custom_agents/user/my-agent HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"agents": [
{
"agent_id": 1,
"name": "text",
"description": "text",
"status": "PENDING",
"version": "text",
"submitted_by": "text",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"error_message": "text",
"supports_background": true,
"reviewed_by": "text",
"reviewed_at": "2026-01-01T00:00:00.000Z",
"rejection_reason": "text",
"feedback_message": "text"
}
],
"total": 1
}Upload a new custom agent.
Admin: auto-active, extracted, dependencies installed
User: pending approval
Enter your JWT token (without 'Bearer ' prefix)
Successful Response
Response for agent onboarding.
Status of a custom agent.
Current release uses: ACTIVE, DISABLED Future release adds: PENDING, REJECTED (for UI approval workflow)
Validation Error
POST /api/v1/custom_agents/user/submit HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17
{
"file": "binary"
}{
"message": "text",
"agent_id": 1,
"agent_name": "text",
"status": "PENDING"
}Upload a new version of a custom agent.
Args: agent_id: ID of the agent username: Authenticated username db: Database session
Returns: Response message and status
Enter your JWT token (without 'Bearer ' prefix)
Successful Response
Response for agent onboarding.
Status of a custom agent.
Current release uses: ACTIVE, DISABLED Future release adds: PENDING, REJECTED (for UI approval workflow)
Validation Error
POST /api/v1/custom_agents/{agent_id}/version HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17
{
"file": "binary"
}{
"message": "text",
"agent_id": 1,
"agent_name": "text",
"version": "text",
"status": "PENDING"
}Approve a custom agent (admin-only). extract to runtime directory
Args: agent_id: ID of the agent username: Authenticated username db: Database session
Returns: Approval confirmation
Enter your JWT token (without 'Bearer ' prefix)
Successful Response
Response for enabling/disabling agent.
Status of a custom agent.
Current release uses: ACTIVE, DISABLED Future release adds: PENDING, REJECTED (for UI approval workflow)
Validation Error
POST /api/v1/custom_agents/{agent_id}/approve HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"message": "text",
"agent_name": "text",
"status": "PENDING"
}Decline a custom agent (admin-only).
Args: agent_id: ID of the agent username: Authenticated username db: Database session
Returns: Decline confirmation
Enter your JWT token (without 'Bearer ' prefix)
Successful Response
Response for enabling/disabling agent.
Status of a custom agent.
Current release uses: ACTIVE, DISABLED Future release adds: PENDING, REJECTED (for UI approval workflow)
Validation Error
POST /api/v1/custom_agents/{agent_id}/decline HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 19
{
"feedback": "text"
}{
"message": "text",
"agent_name": "text",
"status": "PENDING"
}Remove a custom agent by its stable id.
This is the route the admin agent management UI uses to delete an agent — id-keyed like its sibling admin actions (version/approve/decline/ download), so it isn't exposed to free-text agent-name encoding/whitespace mismatches the way the legacy name-keyed route below is.
Args: agent_id: ID of the agent username: Authenticated username db: Database session
Returns: Removal confirmation
Enter your JWT token (without 'Bearer ' prefix)
Successful Response
Response for agent removal.
Validation Error
DELETE /api/v1/custom_agents/{agent_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"message": "text",
"agent_name": "text"
}Remove a custom agent by name (self-service route).
Args: agent_name: Name of the agent username: Authenticated username db: Database session
Returns: Removal confirmation
Enter your JWT token (without 'Bearer ' prefix)
Successful Response
Response for agent removal.
Validation Error
DELETE /api/v1/custom_agents/user/{agent_name} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"message": "text",
"agent_name": "text"
}Submit feedback for a custom agent (admin-only).
Args: agent_id (str): description feedback_request (AgentFeedbackRequest): description username (str, optional): description. Defaults to Depends(verify_api_token). db (Session, optional): description. Defaults to Depends(get_db).
Returns: feedback submit confirm
Enter your JWT token (without 'Bearer ' prefix)
Successful Response
Response for agent feedback submission.
Validation Error
POST /api/v1/custom_agents/{agent_id}/feedback HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 41
{
"message": "text",
"feedback_type": "text"
}{
"message": "text",
"agent_name": "text"
}Download custom agent package (admin and owner).
Args: agent_id (str): ID of the agent username (str, optional): Authenticated username. Defaults to Depends(verify_api_token). db (Session, optional): Database session. Defaults to Depends(get_db).
Returns: FileResponse: The .ncp package file for download
Enter your JWT token (without 'Bearer ' prefix)
Successful Response
Response for agent package download.
Validation Error
GET /api/v1/custom_agents/{agent_id}/download HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"message": "text",
"agent_name": "text"
}Check if the user can submit a new agent.
Args: username (str, optional): The username of the authenticated user. Defaults to Depends(verify_api_token). db (Session, optional): The database session. Defaults to Depends(get_db).
Returns: CustomAgentSubmitResponse: The response indicating if the user have the permission to submit a new agent.
Enter your JWT token (without 'Bearer ' prefix)
Successful Response
Response for agent submission.
Validation Error
GET /api/v1/custom_agents/user/can-submit-agent HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"submitAgent": true
}Onboard a custom agent from .ncp package (admin-only).
This endpoint is called by ncp onboard command. Unlike SDK deploy, custom agents:
Run integrated within platform (no container)
Are available to users based on role permissions
Go directly to ACTIVE status (admin upload = immediate activation)
Args: file: .ncp package file (tar.gz) update: Optional agent name to update username: Authenticated username from API key db: Database session
Returns: Onboard status and agent information
Enter your JWT token (without 'Bearer ' prefix)
Successful Response
Response for agent onboarding.
Status of a custom agent.
Current release uses: ACTIVE, DISABLED Future release adds: PENDING, REJECTED (for UI approval workflow)
Validation Error
POST /api/v1/custom_agents/onboard HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17
{
"file": "binary"
}{
"message": "text",
"agent_id": 1,
"agent_name": "text",
"status": "PENDING"
}List all custom agents (admin-only).
Args: username: Authenticated username db: Database session
Returns: List of all custom agents
Enter your JWT token (without 'Bearer ' prefix)
Successful Response
Response for listing custom agents.
Validation Error
GET /api/v1/custom_agents/list HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"agents": [
{
"agent_id": 1,
"name": "text",
"description": "text",
"status": "PENDING",
"version": "text",
"submitted_by": "text",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"error_message": "text",
"supports_background": true,
"reviewed_by": "text",
"reviewed_at": "2026-01-01T00:00:00.000Z",
"rejection_reason": "text",
"feedback_message": "text"
}
],
"total": 1
}List custom agents eligible for background scheduling.
Returns all active custom agents — every active agent can be used in a background job; no additional flag required.
Enter your JWT token (without 'Bearer ' prefix)
Successful Response
Response for listing custom agents.
Validation Error
GET /api/v1/custom_agents/background-eligible HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"agents": [
{
"agent_id": 1,
"name": "text",
"description": "text",
"status": "PENDING",
"version": "text",
"submitted_by": "text",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"error_message": "text",
"supports_background": true,
"reviewed_by": "text",
"reviewed_at": "2026-01-01T00:00:00.000Z",
"rejection_reason": "text",
"feedback_message": "text"
}
],
"total": 1
}Get details of a custom agent (admin-only).
Args: agent_name: Name of the agent username: Authenticated username db: Database session
Returns: Agent details
Enter your JWT token (without 'Bearer ' prefix)
Successful Response
Response for agent status/details.
Status of a custom agent.
Current release uses: ACTIVE, DISABLED Future release adds: PENDING, REJECTED (for UI approval workflow)
trueValidation Error
GET /api/v1/custom_agents/{agent_name} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"agent_id": 1,
"name": "text",
"description": "text",
"status": "PENDING",
"version": "text",
"submitted_by": "text",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"error_message": "text",
"supports_background": true,
"reviewed_by": "text",
"reviewed_at": "2026-01-01T00:00:00.000Z",
"rejection_reason": "text",
"feedback_message": "text"
}Remove a custom agent (admin-only).
Args: agent_name: Name of the agent username: Authenticated username db: Database session
Returns: Removal confirmation
Enter your JWT token (without 'Bearer ' prefix)
Successful Response
Response for agent removal.
Validation Error
DELETE /api/v1/custom_agents/{agent_name} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"message": "text",
"agent_name": "text"
}Disable a custom agent (admin-only).
Disabled agents are not loaded into the orchestrator.
Args: agent_name: Name of the agent username: Authenticated username db: Database session
Returns: Updated agent status
Enter your JWT token (without 'Bearer ' prefix)
Successful Response
Response for enabling/disabling agent.
Status of a custom agent.
Current release uses: ACTIVE, DISABLED Future release adds: PENDING, REJECTED (for UI approval workflow)
Validation Error
POST /api/v1/custom_agents/{agent_name}/disable HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"message": "text",
"agent_name": "text",
"status": "PENDING"
}Enable a disabled custom agent (admin-only).
Args: agent_name: Name of the agent username: Authenticated username db: Database session
Returns: Updated agent status
Enter your JWT token (without 'Bearer ' prefix)
Successful Response
Response for enabling/disabling agent.
Status of a custom agent.
Current release uses: ACTIVE, DISABLED Future release adds: PENDING, REJECTED (for UI approval workflow)
Validation Error
POST /api/v1/custom_agents/{agent_name}/enable HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"message": "text",
"agent_name": "text",
"status": "PENDING"
}Allow a custom agent to be scheduled as a background job (admin-only).
Background jobs run unattended, without a user in the loop. Not every agent is safe for that mode — long-running agents, agents that ask clarifying questions, and agents with destructive actions warrant explicit admin approval before being offered in the scheduler picker.
Enter your JWT token (without 'Bearer ' prefix)
Successful Response
Validation Error
POST /api/v1/custom_agents/{agent_name}/enable-background HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Revoke a custom agent's background-scheduling eligibility (admin-only).
Does NOT touch existing scheduled jobs — those will fail at their next fire with a clear 'agent_unavailable' reason, which surfaces a failure notification to the job creator.
Enter your JWT token (without 'Bearer ' prefix)
Successful Response
Validation Error
POST /api/v1/custom_agents/{agent_name}/disable-background HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Last updated
