Agent Tools and Skills API

Manage custom tools, skills, and their links to agents.

Base URL: https://api.bluenexus.ai/api/v1

Tools

POST /tools

Create a custom tool.

Auth: Bearer token with agents-all scope

{
  "name": "weather-lookup",
  "description": "Look up current weather for a location",
  "code": "const response = await fetch(`https://api.weather.com/...`); console.log(await response.text());",
  "language": "typescript",
  "parameters": {
    "type": "object",
    "properties": {
      "location": {"type": "string", "description": "City name"}
    },
    "required": ["location"]
  },
  "requiredSecrets": ["WEATHER_API_KEY"]
}

GET /tools

List all tools for the account.

GET /tools/:toolId

Get a specific tool.

PUT /tools/:toolId

Update a tool.

DELETE /tools/:toolId

Delete a tool.

GET /tools/built-in

List available built-in tool groups.

POST /tools/generate-code

Generate tool code using LLM assistance.

POST /tools/:toolId/test

Test a tool in a sandbox environment.


Skills

POST /skills

Create a skill (reusable behavioral pattern).

Auth: Bearer token with agents-all scope

{
  "name": "Summarizer",
  "description": "Summarizes long content into bullet points",
  "prompt": "When asked to summarize content, always use bullet points..."
}

GET /skills

List all skills.

GET /skills/:skillId

Get a specific skill.

PUT /skills/:skillId

Update a skill.

DELETE /skills/:skillId

Delete a skill.

POST /skills/generate-prompt

Generate a skill prompt using LLM assistance.


Agent Tool Links

GET /agents/:agentId/tools

List tools linked to an agent.

Auth: Bearer token with agents-all or agents-use scope

GET /agents/:agentId/tools/available

List tools available to link.

POST /agents/:agentId/tools

Link a tool to an agent.

Auth: Bearer token with agents-all scope

{"toolId": "tool-xyz"}

PATCH /agents/:agentId/tools/:toolId

Update tool secrets for the agent link.

{"secrets": {"API_KEY": "value"}}

DELETE /agents/:agentId/tools/:toolId

Unlink a tool from an agent.


Agent Skill Links

GET /agents/:agentId/skills

List skills linked to an agent.

GET /agents/:agentId/skills/available

List skills available to link.

POST /agents/:agentId/skills

Link a skill to an agent.

{"skillId": "skill-xyz"}

DELETE /agents/:agentId/skills/:skillId

Unlink a skill from an agent.