Agents API

The Agents API provides programmatic access to Bootspring's specialized AI agents. Each agent is an expert in a specific domain and can be invoked to provide specialized guidance and analysis.

Overview#

Agents are domain experts that provide contextual assistance for specific technical areas. The API allows you to:

  • List all available agents
  • Get detailed information about specific agents
  • Invoke agents for specialized expertise
  • Search for agents by expertise area

REST API Endpoints#

List All Agents#

GET /api/v1/agents

Returns a list of all available specialized agents.

Response:

1{ 2 "data": [ 3 { 4 "id": "database-expert", 5 "name": "Database Expert", 6 "description": "Expert in database design, queries, and optimization", 7 "expertise": ["SQL", "Prisma", "PostgreSQL", "migrations", "query optimization"] 8 }, 9 { 10 "id": "security-expert", 11 "name": "Security Expert", 12 "description": "Expert in application security and best practices", 13 "expertise": ["OWASP", "authentication", "authorization", "encryption", "vulnerabilities"] 14 } 15 ], 16 "meta": { 17 "total": 30, 18 "requestId": "req_abc123" 19 } 20}

Get Agent Details#

GET /api/v1/agents/:id

Returns detailed information about a specific agent.

Parameters:

ParameterTypeDescription
idstringAgent identifier (e.g., database-expert)

Response:

1{ 2 "data": { 3 "id": "database-expert", 4 "name": "Database Expert", 5 "description": "Expert in database design, queries, and optimization", 6 "expertise": [ 7 "SQL", 8 "Prisma", 9 "PostgreSQL", 10 "migrations", 11 "query optimization" 12 ] 13 }, 14 "meta": { 15 "requestId": "req_abc123" 16 } 17}

Invoke Agent#

POST /api/v1/agents/:id/invoke

Invoke an agent to get specialized assistance.

Parameters:

ParameterTypeDescription
idstringAgent identifier

Request Body:

1{ 2 "context": "I need help optimizing a slow database query", 3 "options": { 4 "format": "code", 5 "includeTests": false 6 } 7}

Response:

1{ 2 "data": { 3 "response": "Based on my analysis of your query...", 4 "suggestions": [ 5 "Add an index on the user_id column", 6 "Consider using a materialized view for this aggregation" 7 ], 8 "code": "CREATE INDEX idx_users_email ON users(email);" 9 }, 10 "meta": { 11 "agent": "database-expert", 12 "executionTime": 1250, 13 "requestId": "req_abc123" 14 } 15}

JavaScript/Node.js API#

Module Import#

const { AGENTS, getAgents, getAgent, listAgents, findAgentsByExpertise, loadAgentContext } = require('bootspring/agents');

Functions#

getAgents()#

Returns all available agents as an object.

const agents = getAgents(); // Returns: { 'database-expert': {...}, 'security-expert': {...}, ... }

getAgent(name)#

Get a specific agent by name.

Parameters:

ParameterTypeDescription
namestringAgent identifier

Returns: Agent object or null if not found.

1const agent = getAgent('database-expert'); 2// Returns: 3// { 4// name: 'Database Expert', 5// expertise: ['SQL', 'Prisma', 'PostgreSQL', 'migrations', 'query optimization'], 6// description: 'Expert in database design, queries, and optimization' 7// }

listAgents()#

Returns an array of all agent identifiers.

const agentIds = listAgents(); // Returns: ['database-expert', 'security-expert', 'frontend-expert', ...]

findAgentsByExpertise(keyword)#

Find agents that have expertise matching a keyword.

Parameters:

ParameterTypeDescription
keywordstringExpertise keyword to search for

Returns: Array of matching agents with their IDs.

const matches = findAgentsByExpertise('React'); // Returns: // [ // { id: 'frontend-expert', name: 'Frontend Expert', expertise: [...], ... } // ]

loadAgentContext(name)#

Load the full context file for an agent.

Parameters:

ParameterTypeDescription
namestringAgent identifier

Returns: String content of the agent's context file, or null if not found.

const context = loadAgentContext('database-expert'); // Returns markdown content with full agent instructions

MCP Tool#

The bootspring_agent MCP tool provides agent functionality to AI assistants.

Tool Definition#

1{ 2 "name": "bootspring_agent", 3 "description": "Work with specialized AI agents", 4 "inputSchema": { 5 "type": "object", 6 "properties": { 7 "action": { 8 "type": "string", 9 "enum": ["list", "show", "invoke", "search"] 10 }, 11 "name": { 12 "type": "string", 13 "description": "Agent name (e.g., database-expert)" 14 }, 15 "topic": { 16 "type": "string", 17 "description": "Topic or question for the agent" 18 }, 19 "query": { 20 "type": "string", 21 "description": "Search query" 22 } 23 }, 24 "required": ["action"] 25 } 26}

Actions#

ActionDescriptionRequired Parameters
listList all available agentsNone
showShow detailed info about an agentname
invokeInvoke agent for assistancename, topic
searchSearch agents by expertisequery

Examples#

List agents:

{ "action": "list" }

Show agent details:

{ "action": "show", "name": "database-expert" }

Invoke an agent:

{ "action": "invoke", "name": "security-expert", "topic": "How do I implement rate limiting for my API?" }

Search for agents:

{ "action": "search", "query": "authentication" }

Available Agents#

Technical Agents#

Agent IDNameExpertise Areas
database-expertDatabase ExpertSQL, Prisma, PostgreSQL, migrations, query optimization
security-expertSecurity ExpertOWASP, authentication, authorization, encryption
frontend-expertFrontend ExpertReact, Next.js, Tailwind, components, state management
backend-expertBackend ExpertNode.js, APIs, server actions, middleware, serverless
api-expertAPI ExpertREST, GraphQL, tRPC, webhooks, API design
testing-expertTesting ExpertVitest, Jest, Playwright, coverage, TDD
performance-expertPerformance Expertoptimization, caching, profiling, Core Web Vitals
devops-expertDevOps ExpertCI/CD, Docker, deployment, monitoring
architecture-expertArchitecture Expertsystem design, patterns, scalability, microservices

Business Agents#

Agent IDNameExpertise Areas
product-expertProduct Expertproduct strategy, roadmapping, feature prioritization
marketing-expertMarketing Expertdigital marketing, SEO, content strategy
growth-expertGrowth ExpertPLG, retention, acquisition, viral loops
sales-expertSales ExpertB2B sales, pricing, demos, negotiation
financial-expertFinancial Expertfinancial modeling, projections, unit economics

Error Handling#

Agent Not Found#

1{ 2 "error": { 3 "code": "NOT_FOUND", 4 "message": "Agent not found: invalid-agent", 5 "details": [] 6 }, 7 "meta": { 8 "requestId": "req_abc123" 9 } 10}

Invalid Action#

1{ 2 "error": { 3 "code": "VALIDATION_ERROR", 4 "message": "Unknown action: invalid", 5 "details": [ 6 { "field": "action", "message": "Must be one of: list, show, invoke, search" } 7 ] 8 } 9}

Best Practices#

  1. Choose the right agent: Match your task to the agent's expertise for best results
  2. Provide context: When invoking, include relevant details about your project and goals
  3. Combine agents: Complex tasks may benefit from multiple agent perspectives
  4. Use search: When unsure which agent to use, search by keyword