Agents API

Invoke and manage AI expert agents programmatically.

Endpoints#

MethodEndpointDescription
GET/v1/agentsList available agents
GET/v1/agents/:nameGet agent details
POST/v1/agents/:name/invokeInvoke an agent
GET/v1/agents/invocationsList invocations
GET/v1/agents/invocations/:idGet invocation result

List Agents#

GET /v1/agents

Query Parameters#

ParameterTypeDescription
categorystringFilter by category
tierstringFilter by tier requirement

Example Request#

curl https://api.bootspring.dev/v1/agents \ -H "Authorization: Bearer bs_xxx"

Response#

1{ 2 "data": [ 3 { 4 "name": "frontend-expert", 5 "displayName": "Frontend Expert", 6 "description": "React, Next.js, and modern frontend development", 7 "category": "development", 8 "tier": "free", 9 "capabilities": [ 10 "React component development", 11 "Next.js App Router patterns", 12 "Tailwind CSS styling", 13 "Performance optimization" 14 ] 15 }, 16 { 17 "name": "backend-expert", 18 "displayName": "Backend Expert", 19 "description": "APIs, databases, and server-side architecture", 20 "category": "development", 21 "tier": "free", 22 "capabilities": [ 23 "API design and implementation", 24 "Database schema design", 25 "Authentication patterns", 26 "Server optimization" 27 ] 28 } 29 ] 30}

Get Agent Details#

GET /v1/agents/:name

Example Request#

curl https://api.bootspring.dev/v1/agents/frontend-expert \ -H "Authorization: Bearer bs_xxx"

Response#

1{ 2 "data": { 3 "name": "frontend-expert", 4 "displayName": "Frontend Expert", 5 "description": "Expert in React, Next.js, and modern frontend development", 6 "category": "development", 7 "tier": "free", 8 "capabilities": [ 9 "React component development", 10 "Next.js App Router patterns", 11 "Tailwind CSS styling", 12 "Performance optimization", 13 "Accessibility best practices" 14 ], 15 "collaboratesWith": [ 16 "ui-ux-expert", 17 "testing-expert", 18 "performance-expert" 19 ], 20 "stats": { 21 "invocations": 15420, 22 "avgDuration": 2500, 23 "satisfaction": 4.8 24 } 25 } 26}

Invoke Agent#

POST /v1/agents/:name/invoke

Request Body#

FieldTypeRequiredDescription
promptstringYesTask or question
contextobjectNoAdditional context
optionsobjectNoInvocation options

Context Object#

FieldTypeDescription
projectIdstringProject context
filesarrayRelevant file paths
codebasestringCodebase summary
historyarrayPrevious messages

Options Object#

FieldTypeDescription
streambooleanStream response
maxTokensintegerMax response tokens
temperaturenumberResponse creativity (0-1)
timeoutintegerTimeout in ms

Example Request#

1curl -X POST https://api.bootspring.dev/v1/agents/frontend-expert/invoke \ 2 -H "Authorization: Bearer bs_xxx" \ 3 -H "Content-Type: application/json" \ 4 -d '{ 5 "prompt": "Create a responsive pricing table component with three tiers", 6 "context": { 7 "projectId": "proj_abc123", 8 "files": ["components/ui/Card.tsx", "lib/stripe.ts"] 9 }, 10 "options": { 11 "maxTokens": 4096 12 } 13 }'

Response#

1{ 2 "data": { 3 "id": "inv_xyz789", 4 "agent": "frontend-expert", 5 "status": "completed", 6 "response": { 7 "content": "Here's a responsive pricing table component...\n\n```tsx\n// components/PricingTable.tsx\n'use client';\n\nimport { useState } from 'react';\nimport { Card } from './ui/Card';\n\ninterface PricingTier {\n name: string;\n price: number;\n features: string[];\n popular?: boolean;\n}\n\nconst tiers: PricingTier[] = [\n {\n name: 'Free',\n price: 0,\n features: ['1 project', 'Basic agents', 'Community support']\n },\n {\n name: 'Pro',\n price: 19,\n features: ['10 projects', 'All agents', 'Priority support'],\n popular: true\n },\n {\n name: 'Team',\n price: 49,\n features: ['50 projects', 'Custom agents', 'SSO', 'SLA']\n }\n];\n\nexport function PricingTable() {\n const [annual, setAnnual] = useState(false);\n // ... component implementation\n}\n```", 8 "type": "code", 9 "language": "tsx" 10 }, 11 "usage": { 12 "inputTokens": 450, 13 "outputTokens": 1250, 14 "totalTokens": 1700 15 }, 16 "duration": 2340, 17 "createdAt": "2024-01-15T10:30:00Z" 18 } 19}

Streaming Response#

For streaming responses:

1curl -X POST https://api.bootspring.dev/v1/agents/frontend-expert/invoke \ 2 -H "Authorization: Bearer bs_xxx" \ 3 -H "Content-Type: application/json" \ 4 -H "Accept: text/event-stream" \ 5 -d '{ 6 "prompt": "Create a pricing table", 7 "options": {"stream": true} 8 }'

Response (Server-Sent Events):

data: {"type":"start","id":"inv_xyz789"} data: {"type":"content","delta":"Here's a"} data: {"type":"content","delta":" responsive"} data: {"type":"content","delta":" pricing table..."} data: {"type":"done","usage":{"totalTokens":1700}}

List Invocations#

GET /v1/agents/invocations

Query Parameters#

ParameterTypeDescription
agentstringFilter by agent name
statusstringFilter by status
startstringStart timestamp
endstringEnd timestamp
limitintegerMax results

Example Request#

curl "https://api.bootspring.dev/v1/agents/invocations?agent=frontend-expert&limit=10" \ -H "Authorization: Bearer bs_xxx"

Response#

1{ 2 "data": [ 3 { 4 "id": "inv_xyz789", 5 "agent": "frontend-expert", 6 "status": "completed", 7 "prompt": "Create a pricing table...", 8 "duration": 2340, 9 "tokens": 1700, 10 "createdAt": "2024-01-15T10:30:00Z" 11 } 12 ], 13 "pagination": { 14 "hasMore": true, 15 "cursor": "cursor_abc" 16 } 17}

Get Invocation#

GET /v1/agents/invocations/:id

Example Request#

curl https://api.bootspring.dev/v1/agents/invocations/inv_xyz789 \ -H "Authorization: Bearer bs_xxx"

Response#

Returns full invocation details including the response content.

SDK Usage#

JavaScript/TypeScript#

1import { Bootspring } from '@bootspring/sdk'; 2 3const bs = new Bootspring({ apiKey: 'bs_xxx' }); 4 5// List agents 6const agents = await bs.agents.list(); 7 8// Get agent details 9const frontend = await bs.agents.get('frontend-expert'); 10 11// Invoke agent 12const result = await bs.agents.invoke('frontend-expert', { 13 prompt: 'Create a pricing table component', 14 context: { 15 projectId: 'proj_123', 16 }, 17}); 18 19// Stream response 20const stream = await bs.agents.invoke('frontend-expert', { 21 prompt: 'Create a pricing table', 22 options: { stream: true }, 23}); 24 25for await (const chunk of stream) { 26 process.stdout.write(chunk.delta); 27}

Python#

1from bootspring import Bootspring 2 3bs = Bootspring(api_key='bs_xxx') 4 5# Invoke agent 6result = bs.agents.invoke( 7 'frontend-expert', 8 prompt='Create a pricing table component', 9 context={'project_id': 'proj_123'} 10) 11 12print(result.response.content)

Agent Categories#

CategoryAgents
developmentfrontend-expert, backend-expert, database-expert, api-expert
qualitytesting-expert, security-expert, performance-expert, code-review-expert
architecturearchitecture-expert, devops-expert, cloud-expert
businessbusiness-strategy-expert, fundraising-expert, growth-expert
designui-ux-expert, branding-expert

Rate Limits#

PlanInvocations/HourConcurrent
Free101
Pro1005
Team50020
EnterpriseCustomCustom

Errors#

CodeDescription
agent_not_foundUnknown agent name
invocation_failedAgent invocation error
rate_limit_exceededToo many invocations
context_too_largeContext exceeds limits
timeoutInvocation timed out