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/agentsReturns 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/:idReturns detailed information about a specific agent.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Agent 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/invokeInvoke an agent to get specialized assistance.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Agent 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:
| Parameter | Type | Description |
|---|---|---|
name | string | Agent 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:
| Parameter | Type | Description |
|---|---|---|
keyword | string | Expertise 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:
| Parameter | Type | Description |
|---|---|---|
name | string | Agent 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 instructionsMCP 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#
| Action | Description | Required Parameters |
|---|---|---|
list | List all available agents | None |
show | Show detailed info about an agent | name |
invoke | Invoke agent for assistance | name, topic |
search | Search agents by expertise | query |
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 ID | Name | Expertise Areas |
|---|---|---|
database-expert | Database Expert | SQL, Prisma, PostgreSQL, migrations, query optimization |
security-expert | Security Expert | OWASP, authentication, authorization, encryption |
frontend-expert | Frontend Expert | React, Next.js, Tailwind, components, state management |
backend-expert | Backend Expert | Node.js, APIs, server actions, middleware, serverless |
api-expert | API Expert | REST, GraphQL, tRPC, webhooks, API design |
testing-expert | Testing Expert | Vitest, Jest, Playwright, coverage, TDD |
performance-expert | Performance Expert | optimization, caching, profiling, Core Web Vitals |
devops-expert | DevOps Expert | CI/CD, Docker, deployment, monitoring |
architecture-expert | Architecture Expert | system design, patterns, scalability, microservices |
Business Agents#
| Agent ID | Name | Expertise Areas |
|---|---|---|
product-expert | Product Expert | product strategy, roadmapping, feature prioritization |
marketing-expert | Marketing Expert | digital marketing, SEO, content strategy |
growth-expert | Growth Expert | PLG, retention, acquisition, viral loops |
sales-expert | Sales Expert | B2B sales, pricing, demos, negotiation |
financial-expert | Financial Expert | financial 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#
- Choose the right agent: Match your task to the agent's expertise for best results
- Provide context: When invoking, include relevant details about your project and goals
- Combine agents: Complex tasks may benefit from multiple agent perspectives
- Use search: When unsure which agent to use, search by keyword