Skip to content

Skills API

List and invoke agent skills.

List Skills

bash
GET /api/agents/:name/skills

Response

json
{
  "skills": [
    {
      "name": "host_shell",
      "description": "Execute shell commands",
      "version": "1.0.0",
      "needs_network": true,
      "needs_fs_read": true,
      "needs_fs_write": true
    },
    {
      "name": "web_crawler",
      "description": "Fetch and parse web content",
      "version": "1.0.0",
      "needs_network": true
    }
  ]
}

Get Skill Details

bash
GET /api/agents/:name/skills/:skill

Response

json
{
  "name": "host_shell",
  "description": "Execute shell commands on the host system",
  "version": "1.0.0",
  "run_command": "sh",
  "entrypoint": "run.sh",
  "needs_network": true,
  "needs_fs_read": true,
  "needs_fs_write": true,
  "needs_env": false,
  "usage_example": "<invoke name=\"host_shell\">[\"ls -la\"]</invoke>"
}

Invoke Skill

bash
POST /api/agents/:name/skills/:skill/invoke

Request (Array Args)

json
{
  "args": ["ls", "-la", "/home/user"]
}

Request (Object Args - MCP)

json
{
  "args": {
    "path": "/home/user",
    "recursive": true
  }
}

Response

json
{
  "success": true,
  "output": "total 24\ndrwxr-xr-x  5 user user 4096 Jan 15 12:00 .\n...",
  "exit_code": 0,
  "execution_time_ms": 23
}

Error Response

json
{
  "success": false,
  "error": "Command failed with exit code 1",
  "output": "ls: cannot access '/nonexistent': No such file or directory",
  "exit_code": 1
}

Create Skill

bash
POST /api/agents/:name/skills

Request

json
{
  "name": "my_custom_skill",
  "description": "Does something useful",
  "code": "#!/bin/bash\nread -r args\necho \"Received: $args\"",
  "language": "bash"
}

Response

json
{
  "success": true,
  "skill": {
    "name": "my_custom_skill",
    "description": "Does something useful",
    "created_at": "2024-01-15T12:00:00Z"
  }
}

Update Skill

bash
PUT /api/agents/:name/skills/:skill

Request

json
{
  "description": "Updated description",
  "code": "#!/bin/bash\nread -r args\necho \"Updated: $args\""
}

Delete Skill

bash
DELETE /api/agents/:name/skills/:skill

Response

json
{
  "success": true,
  "message": "Skill 'old_skill' deleted"
}

Install Skill from URL

bash
POST /api/agents/:name/skills/install

Request

json
{
  "url": "https://github.com/user/moxxy-skills/tree/main/skills/weather",
  "name": "weather"
}

Response

json
{
  "success": true,
  "skill": {
    "name": "weather",
    "description": "Get weather information",
    "installed_at": "2024-01-15T12:00:00Z"
  }
}

Get Skill Source

bash
GET /api/agents/:name/skills/:skill/source

Response

json
{
  "manifest": "name = \"host_shell\"\ndescription = \"...\"",
  "code": "#!/bin/bash\nread -r args\n..."
}

MCP Tools

List MCP Servers

bash
GET /api/agents/:name/mcp/servers

Response

json
{
  "servers": [
    {
      "name": "filesystem",
      "status": "connected",
      "tools_count": 5
    }
  ]
}

List MCP Tools

bash
GET /api/agents/:name/mcp/tools

Response

json
{
  "tools": [
    {
      "server": "filesystem",
      "name": "read_file",
      "description": "Read file contents",
      "input_schema": {
        "type": "object",
        "properties": {
          "path": {"type": "string"}
        },
        "required": ["path"]
      }
    }
  ]
}

Add MCP Server

bash
POST /api/agents/:name/mcp/servers

Request

json
{
  "name": "postgres",
  "command": "mcp-postgres",
  "args": ["postgresql://user:pass@localhost/db"],
  "env": {}
}

Invoke MCP Tool

bash
POST /api/agents/:name/mcp/invoke

Request

json
{
  "server": "filesystem",
  "tool": "read_file",
  "arguments": {
    "path": "/home/user/data.txt"
  }
}

Response

json
{
  "success": true,
  "content": [
    {
      "type": "text",
      "text": "File contents here..."
    }
  ]
}

Remove MCP Server

bash
DELETE /api/agents/:name/mcp/servers/:server

Open source · Self-hosted · Data sovereign