feat: subagent table structure and crud apis

This commit is contained in:
Acbox
2026-01-31 19:58:17 +08:00
parent 9fd15bfa6b
commit fe50b1d224
13 changed files with 2689 additions and 2 deletions
+599
View File
@@ -1921,6 +1921,448 @@ const docTemplate = `{
}
}
}
},
"/subagents": {
"get": {
"description": "List subagents for current user",
"tags": [
"subagent"
],
"summary": "List subagents",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/subagent.ListResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"post": {
"description": "Create a subagent for current user",
"tags": [
"subagent"
],
"summary": "Create subagent",
"parameters": [
{
"description": "Subagent payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/subagent.CreateRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/subagent.Subagent"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/subagents/{id}": {
"get": {
"description": "Get a subagent by ID",
"tags": [
"subagent"
],
"summary": "Get subagent",
"parameters": [
{
"type": "string",
"description": "Subagent ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/subagent.Subagent"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"put": {
"description": "Update a subagent by ID",
"tags": [
"subagent"
],
"summary": "Update subagent",
"parameters": [
{
"type": "string",
"description": "Subagent ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Subagent payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/subagent.UpdateRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/subagent.Subagent"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"delete": {
"description": "Delete a subagent by ID",
"tags": [
"subagent"
],
"summary": "Delete subagent",
"parameters": [
{
"type": "string",
"description": "Subagent ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/subagents/{id}/context": {
"get": {
"description": "Get a subagent's message context",
"tags": [
"subagent"
],
"summary": "Get subagent context",
"parameters": [
{
"type": "string",
"description": "Subagent ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/subagent.ContextResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"put": {
"description": "Update a subagent's message context",
"tags": [
"subagent"
],
"summary": "Update subagent context",
"parameters": [
{
"type": "string",
"description": "Subagent ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Context payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/subagent.UpdateContextRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/subagent.ContextResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/subagents/{id}/skills": {
"get": {
"description": "Get a subagent's skills",
"tags": [
"subagent"
],
"summary": "Get subagent skills",
"parameters": [
{
"type": "string",
"description": "Subagent ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/subagent.SkillsResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"put": {
"description": "Replace a subagent's skills",
"tags": [
"subagent"
],
"summary": "Update subagent skills",
"parameters": [
{
"type": "string",
"description": "Subagent ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Skills payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/subagent.UpdateSkillsRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/subagent.SkillsResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"post": {
"description": "Add skills to a subagent",
"tags": [
"subagent"
],
"summary": "Add subagent skills",
"parameters": [
{
"type": "string",
"description": "Subagent ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Skills payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/subagent.AddSkillsRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/subagent.SkillsResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
}
},
"definitions": {
@@ -2775,6 +3217,163 @@ const docTemplate = `{
"type": "integer"
}
}
},
"subagent.AddSkillsRequest": {
"type": "object",
"properties": {
"skills": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"subagent.ContextResponse": {
"type": "object",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
}
}
},
"subagent.CreateRequest": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"messages": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"metadata": {
"type": "object",
"additionalProperties": true
},
"name": {
"type": "string"
},
"skills": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"subagent.ListResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/subagent.Subagent"
}
}
}
},
"subagent.SkillsResponse": {
"type": "object",
"properties": {
"skills": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"subagent.Subagent": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"deleted": {
"type": "boolean"
},
"deleted_at": {
"type": "string"
},
"description": {
"type": "string"
},
"id": {
"type": "string"
},
"messages": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"metadata": {
"type": "object",
"additionalProperties": true
},
"name": {
"type": "string"
},
"skills": {
"type": "array",
"items": {
"type": "string"
}
},
"updated_at": {
"type": "string"
},
"user_id": {
"type": "string"
}
}
},
"subagent.UpdateContextRequest": {
"type": "object",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
}
}
},
"subagent.UpdateRequest": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": true
},
"name": {
"type": "string"
}
}
},
"subagent.UpdateSkillsRequest": {
"type": "object",
"properties": {
"skills": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}`
+599
View File
@@ -1912,6 +1912,448 @@
}
}
}
},
"/subagents": {
"get": {
"description": "List subagents for current user",
"tags": [
"subagent"
],
"summary": "List subagents",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/subagent.ListResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"post": {
"description": "Create a subagent for current user",
"tags": [
"subagent"
],
"summary": "Create subagent",
"parameters": [
{
"description": "Subagent payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/subagent.CreateRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/subagent.Subagent"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/subagents/{id}": {
"get": {
"description": "Get a subagent by ID",
"tags": [
"subagent"
],
"summary": "Get subagent",
"parameters": [
{
"type": "string",
"description": "Subagent ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/subagent.Subagent"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"put": {
"description": "Update a subagent by ID",
"tags": [
"subagent"
],
"summary": "Update subagent",
"parameters": [
{
"type": "string",
"description": "Subagent ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Subagent payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/subagent.UpdateRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/subagent.Subagent"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"delete": {
"description": "Delete a subagent by ID",
"tags": [
"subagent"
],
"summary": "Delete subagent",
"parameters": [
{
"type": "string",
"description": "Subagent ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/subagents/{id}/context": {
"get": {
"description": "Get a subagent's message context",
"tags": [
"subagent"
],
"summary": "Get subagent context",
"parameters": [
{
"type": "string",
"description": "Subagent ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/subagent.ContextResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"put": {
"description": "Update a subagent's message context",
"tags": [
"subagent"
],
"summary": "Update subagent context",
"parameters": [
{
"type": "string",
"description": "Subagent ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Context payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/subagent.UpdateContextRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/subagent.ContextResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/subagents/{id}/skills": {
"get": {
"description": "Get a subagent's skills",
"tags": [
"subagent"
],
"summary": "Get subagent skills",
"parameters": [
{
"type": "string",
"description": "Subagent ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/subagent.SkillsResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"put": {
"description": "Replace a subagent's skills",
"tags": [
"subagent"
],
"summary": "Update subagent skills",
"parameters": [
{
"type": "string",
"description": "Subagent ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Skills payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/subagent.UpdateSkillsRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/subagent.SkillsResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"post": {
"description": "Add skills to a subagent",
"tags": [
"subagent"
],
"summary": "Add subagent skills",
"parameters": [
{
"type": "string",
"description": "Subagent ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Skills payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/subagent.AddSkillsRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/subagent.SkillsResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
}
},
"definitions": {
@@ -2766,6 +3208,163 @@
"type": "integer"
}
}
},
"subagent.AddSkillsRequest": {
"type": "object",
"properties": {
"skills": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"subagent.ContextResponse": {
"type": "object",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
}
}
},
"subagent.CreateRequest": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"messages": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"metadata": {
"type": "object",
"additionalProperties": true
},
"name": {
"type": "string"
},
"skills": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"subagent.ListResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/subagent.Subagent"
}
}
}
},
"subagent.SkillsResponse": {
"type": "object",
"properties": {
"skills": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"subagent.Subagent": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"deleted": {
"type": "boolean"
},
"deleted_at": {
"type": "string"
},
"description": {
"type": "string"
},
"id": {
"type": "string"
},
"messages": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"metadata": {
"type": "object",
"additionalProperties": true
},
"name": {
"type": "string"
},
"skills": {
"type": "array",
"items": {
"type": "string"
}
},
"updated_at": {
"type": "string"
},
"user_id": {
"type": "string"
}
}
},
"subagent.UpdateContextRequest": {
"type": "object",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
}
}
},
"subagent.UpdateRequest": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": true
},
"name": {
"type": "string"
}
}
},
"subagent.UpdateSkillsRequest": {
"type": "object",
"properties": {
"skills": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
+397
View File
@@ -563,6 +563,110 @@ definitions:
max_context_load_time:
type: integer
type: object
subagent.AddSkillsRequest:
properties:
skills:
items:
type: string
type: array
type: object
subagent.ContextResponse:
properties:
messages:
items:
additionalProperties: true
type: object
type: array
type: object
subagent.CreateRequest:
properties:
description:
type: string
messages:
items:
additionalProperties: true
type: object
type: array
metadata:
additionalProperties: true
type: object
name:
type: string
skills:
items:
type: string
type: array
type: object
subagent.ListResponse:
properties:
items:
items:
$ref: '#/definitions/subagent.Subagent'
type: array
type: object
subagent.SkillsResponse:
properties:
skills:
items:
type: string
type: array
type: object
subagent.Subagent:
properties:
created_at:
type: string
deleted:
type: boolean
deleted_at:
type: string
description:
type: string
id:
type: string
messages:
items:
additionalProperties: true
type: object
type: array
metadata:
additionalProperties: true
type: object
name:
type: string
skills:
items:
type: string
type: array
updated_at:
type: string
user_id:
type: string
type: object
subagent.UpdateContextRequest:
properties:
messages:
items:
additionalProperties: true
type: object
type: array
type: object
subagent.UpdateRequest:
properties:
description:
type: string
metadata:
additionalProperties: true
type: object
name:
type: string
type: object
subagent.UpdateSkillsRequest:
properties:
skills:
items:
type: string
type: array
type: object
info:
contact: {}
title: Memoh API
@@ -1828,4 +1932,297 @@ paths:
summary: Update user settings
tags:
- settings
/subagents:
get:
description: List subagents for current user
responses:
"200":
description: OK
schema:
$ref: '#/definitions/subagent.ListResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: List subagents
tags:
- subagent
post:
description: Create a subagent for current user
parameters:
- description: Subagent payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/subagent.CreateRequest'
responses:
"201":
description: Created
schema:
$ref: '#/definitions/subagent.Subagent'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Create subagent
tags:
- subagent
/subagents/{id}:
delete:
description: Delete a subagent by ID
parameters:
- description: Subagent ID
in: path
name: id
required: true
type: string
responses:
"204":
description: No Content
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Delete subagent
tags:
- subagent
get:
description: Get a subagent by ID
parameters:
- description: Subagent ID
in: path
name: id
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/subagent.Subagent'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get subagent
tags:
- subagent
put:
description: Update a subagent by ID
parameters:
- description: Subagent ID
in: path
name: id
required: true
type: string
- description: Subagent payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/subagent.UpdateRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/subagent.Subagent'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Update subagent
tags:
- subagent
/subagents/{id}/context:
get:
description: Get a subagent's message context
parameters:
- description: Subagent ID
in: path
name: id
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/subagent.ContextResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get subagent context
tags:
- subagent
put:
description: Update a subagent's message context
parameters:
- description: Subagent ID
in: path
name: id
required: true
type: string
- description: Context payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/subagent.UpdateContextRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/subagent.ContextResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Update subagent context
tags:
- subagent
/subagents/{id}/skills:
get:
description: Get a subagent's skills
parameters:
- description: Subagent ID
in: path
name: id
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/subagent.SkillsResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get subagent skills
tags:
- subagent
post:
description: Add skills to a subagent
parameters:
- description: Subagent ID
in: path
name: id
required: true
type: string
- description: Skills payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/subagent.AddSkillsRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/subagent.SkillsResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Add subagent skills
tags:
- subagent
put:
description: Replace a subagent's skills
parameters:
- description: Subagent ID
in: path
name: id
required: true
type: string
- description: Skills payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/subagent.UpdateSkillsRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/subagent.SkillsResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Update subagent skills
tags:
- subagent
swagger: "2.0"