← Back to AgentsKB

Documentation

REST API reference for querying researched technical knowledge

Base URL

https://agentskb-api.agentskb.com/api/free

Status: Production - Deployed on Azure VM with HTTPS and auto-scaling

Performance: Average response time <1s (100 questions in batch). Knowledge base contains 39,827 Q&As across 272 technical domains.

Authentication: None required - completely free and public.

Rate Limiting: Not currently enforced. Use responsibly.

Quick Start in 30 Seconds

Start asking technical questions and get researched answers backed by 99% accuracy.

# Ask a question
curl "https://agentskb-api.agentskb.com/api/free/ask" \
  -H "Content-Type: application/json" \
  -d '{"question":"What is FastAPI?"}'

# Search for questions
curl "https://agentskb-api.agentskb.com/api/free/search?q=postgresql"

# Get statistics
curl "https://agentskb-api.agentskb.com/api/free/stats"

Knowledge Base Overview

Statistics

  • 39,827 Q&As
  • 272 technical domains
  • 99% avg confidence
  • Curated by Claude Sonnet 4.5

What We Cover

  • Programming languages (Python, TypeScript, Go, Rust)
  • Web frameworks (React, Next.js, Angular, FastAPI)
  • Cloud platforms (AWS, Azure, GCP)
  • Infrastructure (Docker, Kubernetes, Terraform)
  • Databases (PostgreSQL, MongoDB, Redis)
  • And 257 more domains...

How it works

Each answer is researched for accuracy and includes confidence scores and sources. Our search finds the most relevant answers across all technical documentation.

Your questions help the KB grow

Questions we can't answer are anonymously queued for research. If we find authoritative sources, they become part of the KB - helping the next developer who asks. Learn more

How AgentsKB Works

AgentsKB operates in two modes, designed for different use cases:

Instant Mode (Default)

  • Response: <100ms
  • If found: Returns verified answer
  • If not found: Returns message, queues for research
  • Best for: High-throughput, non-critical queries

Research Mode

  • Response: 60-180s (if researching)
  • If found: Returns verified answer instantly
  • If not found: Researches live, returns answer
  • Best for: Critical queries, agent automation

Self-Healing Knowledge Base

When you use research_mode: "research" and the answer isn't in our KB, we:

  1. Trigger live research using multiple AI models
  2. Verify the answer against authoritative sources
  3. Return the researched answer to you
  4. Automatically save it to the KB for future queries

Building an agent?

See our Agent Integration Guide for system prompts, best practices, and code examples.

API Endpoints

Quick Reference

Method Endpoint Purpose
GET / API information and status
GET /health Health check and system status
GET /stats Knowledge base statistics and metrics
POST /ask Ask a question and get a researched answer
POST /ask-batch Ask up to 100 questions in a single request
GET /search Search the Q&A database
GET /

Returns API information including version, status, and available endpoints.

Example Request

curl "https://agentskb-api.agentskb.com/api/free/"

Example Response

{
  "name": "AgentsKB API",
  "version": "1.0.0",
  "description": "Researched Q&A knowledge base for technical questions",
  "status": "production",
  "endpoints": [
    "/health",
    "/stats",
    "/ask",
    "/ask-batch",
    "/search"
  ],
  "stats": {
    "total_questions": 39827,
    "domains": 272,
    "accuracy": 99
  }
}
GET /health

Health check endpoint to verify API and database status. Returns system health, uptime, and response time metrics.

Example Request

curl "https://agentskb-api.agentskb.com/api/free/health"

Example Response

{
  "status": "healthy",
  "timestamp": "2025-11-11T00:30:00.000Z",
  "uptime": 86400.5,
  "services": {
    "api": {
      "status": "healthy",
      "response_time_ms": 45
    },
    "database": {
      "status": "healthy",
      "type": "Qdrant",
      "response_time_ms": 12
    },
    "vector_search": {
      "status": "healthy",
      "dimension": 384,
      "model": "sentence-transformers/all-MiniLM-L6-v2"
    }
  }
}
GET /stats

Returns comprehensive statistics about the knowledge base including domain breakdown, accuracy metrics, and coverage.

Example Request

curl "https://agentskb-api.agentskb.com/api/free/stats"

Example Response

{
  "total_questions": 39827,
  "domains": 272,
  "avg_confidence": 99,
  "curated_by": "Claude Sonnet 4.5",
  "verification_rate": 99.96,
  "domains_list": [
    "python",
    "typescript",
    "javascript",
    "nodejs",
    "go",
    "rust",
    "react",
    "vue",
    "nextjs",
    "angular",
    "aws",
    "azure",
    "gcp",
    "terraform",
    "kubernetes",
    "postgresql",
    "mongodb",
    "redis",
    "elasticsearch",
    "docker",
    "jenkins",
    "github-actions",
    "gitlab-ci",
    "fastapi",
    "django",
    "flask",
    "spring",
    "laravel",
    "express",
    "gin",
    "rust",
    "actix",
    "axum",
    "pandas",
    "numpy",
    "tensorflow",
    "pytorch",
    "machine-learning",
    "data-science",
    "blockchain",
    "ethereum",
    "solidity",
    "web3",
    "graphql",
    "rest",
    "microservices",
    "devops",
    "sre"
  ],
  "domain_breakdown": {
    "python": 89,
    "typescript": 76,
    "aws": 65,
    "kubernetes": 54,
    "postgresql": 48,
    "fastapi": 42,
    "docker": 38,
    "react": 35,
    "go": 32,
    "rust": 28
  }
}
POST /ask

Ask a technical question and receive a researched answer with confidence score and sources.

Request Body

Field Type Required Description
question string Yes The technical question to ask
domain string No Optional domain filter (e.g., "python", "aws")
research_mode string No Set to "research" to wait for live research if answer not in KB (60-180s). Costs 1.0 quota.
tier string No Quality tier: GOLD, SILVER, or BRONZE

Research Mode

Use research_mode: "research" when you need a guaranteed answer. If the question isn't in the KB, we'll research it live (60-180s) and save the answer for future queries. Learn more in the Agent Guide.

Example Request

curl "https://agentskb-api.agentskb.com/api/free/ask" \
  -H "Content-Type: application/json" \
  -d '{
    "question": "What is FastAPI and how is it different from Flask?",
    "domain": "python",
    "tier": "GOLD"
  }'

Example Response

{
  "question": "What is FastAPI and how is it different from Flask?",
  "answer": "FastAPI is a modern, high-performance web framework...",
  "confidence": 0.96,
  "sources": [
    "https://fastapi.tiangolo.com/",
    "https://docs.python.org/3/library/typing.html"
  ],
  "source_count": 2,
  "researched": false,
  "match_score": 0.94,
  "content_type": "explanation"
}

Content Types

The content_type field indicates what kind of answer was returned:

Type Description
factDirect lookup, single answer
explanationHow something works
methodologyStep-by-step guide
troubleshootingError diagnosis and fixes
decisionCompare options
referenceAPI/syntax documentation
POST /ask-batch

Ask multiple questions in a single request. Optimized for high-throughput batch processing - up to 100 questions in under 1 second.

Performance & Cost

Batch requests are significantly faster and cheaper. 100 questions in under 1 second. All batches are 10x cheaper than individual calls. Re-hits in batch save even more.

Request Body

Field Type Required Description
questions string[] Yes Array of questions (1-100 questions)
research_mode string No Set to "research" to research unmatched questions (up to 5 in parallel)

Example Request

curl "https://agentskb-api.agentskb.com/api/free/ask-batch" \
  -H "Content-Type: application/json" \
  -d '{
    "questions": [
      "What is the default max_connections in PostgreSQL?",
      "How do I create an index in PostgreSQL?"
    ],
    "research_mode": "research"
  }'

Example Response

{
  "total": 2,
  "found": 2,
  "not_found": 0,
  "researched": 0,
  "answers": [
    {
      "question": "What is the default max_connections in PostgreSQL?",
      "answer": "The default value for max_connections in PostgreSQL is 100...",
      "confidence": 0.99,
      "sources": ["https://www.postgresql.org/docs/current/runtime-config-connection.html"],
      "topic": "postgresql",
      "found": true,
      "researched": false,
      "content_type": "fact"
    },
    {
      "question": "How do I create an index in PostgreSQL?",
      "answer": "To create an index in PostgreSQL, use CREATE INDEX...",
      "confidence": 0.98,
      "sources": ["https://www.postgresql.org/docs/current/sql-createindex.html"],
      "topic": "postgresql",
      "found": true,
      "researched": false,
      "content_type": "methodology"
    }
  ],
  "processing_time_ms": 62
}

Limits

  • Maximum 100 questions per request
  • Each question follows the same validation rules as /ask
  • Questions that fail validation are returned with null answer
GET /search

Search the Q&A database for questions and answers. Returns ranked results based on relevance to your query.

Query Parameters

Parameter Type Required Default Description
q string Yes - Search query
domain string No all Domain filter (e.g., "python", "aws")
limit number No 10 Maximum results to return (1-50)

Example Request

curl "https://agentskb-api.agentskb.com/api/free/search?q=postgresql&domain=database&limit=5"

Example Response

{
  "query": "postgresql",
  "results": [
    {
      "id": "qa_001",
      "question": "What is PostgreSQL and what are its main features?",
      "answer": "PostgreSQL is a powerful, open-source object-relational database system with over 35 years of active development...",
      "domain": "postgresql",
      "confidence": 0.98,
      "tier": "GOLD",
      "similarity": 0.95
    },
    {
      "id": "qa_045",
      "question": "How do I create an index in PostgreSQL?",
      "answer": "To create an index in PostgreSQL, use the CREATE INDEX command. Here's the basic syntax...",
      "domain": "postgresql",
      "confidence": 0.94,
      "tier": "SILVER",
      "similarity": 0.87
    },
    {
      "id": "qa_123",
      "question": "What is the difference between PostgreSQL and MySQL?",
      "answer": "PostgreSQL and MySQL are both popular relational databases, but they have key differences...",
      "domain": "postgresql",
      "confidence": 0.92,
      "tier": "GOLD",
      "similarity": 0.82
    }
  ],
  "meta": {
    "total": 48,
    "returned": 3,
    "search_time_ms": 28
  }
}

Code Examples

Ask a Question

# Ask a question
curl "https://agentskb-api.agentskb.com/api/free/ask" \
  -H "Content-Type: application/json" \
  -d '{"question":"What is FastAPI?"}'

# Ask with domain filter
curl "https://agentskb-api.agentskb.com/api/free/ask" \
  -H "Content-Type: application/json" \
  -d '{"question":"How to use async in Python?","domain":"python"}'

Search Questions

# Search for questions
curl "https://agentskb-api.agentskb.com/api/free/search?q=postgresql&limit=5"

# Search with domain filter
curl "https://agentskb-api.agentskb.com/api/free/search?q=async&domain=python&limit=3"

MCP Integration

Status

AgentsKB MCP server is currently in development. The API is production-ready, but MCP integration will be available soon.

AgentsKB integrates with Claude Desktop via the Model Context Protocol (MCP), providing direct access to Q&A within Claude conversations.

Available MCP Tools

Tool Description Parameters
ask_question Get researched answers to technical questions question (required), domain, tier
search_questions Search Q&A database query (required), limit, domain
get_stats Get knowledge base statistics none

Configuration

Add AgentsKB to your Claude Desktop MCP configuration:

{
  "mcpServers": {
    "agentskb": {
      "command": "stdio",
      "args": [],
      "env": {},
      "url": "https://mcp.agentskb.com/mcp-kb",
      "transport": "Streamable HTTP",
      "protocolVersion": "MCP 2025-03-26",
      "capabilities": {
        "tools": {
          "listChanged": true
        }
      }
    }
  }
}

Claude Desktop Config Location

Platform Config Path
macOS ~/Library/Application Support/Claude/claude_desktop_config.json
Windows %APPDATA%\Claude\claude_desktop_config.json
Linux ~/.config/Claude/claude_desktop_config.json

Note

Once MCP is available, you'll be able to ask questions directly in Claude Desktop like: "Ask AgentsKB: What is Docker and how does it work?"

HTTP Status Codes

Code Status Description
200 OK Request successful
400 Bad Request Missing or invalid required parameters
404 Not Found Endpoint doesn't exist
500 Internal Server Error Server-side error occurred

Error Response Format

All errors follow a consistent JSON format with an error object containing a code and message:

{
  "error": {
    "code": "MISSING_QUESTION",
    "message": "Question field is required"
  },
  "meta": {
    "responseTimeMs": 5
  }
}

Real Response Examples

Examples from the production API showing real data and response structures.

Ask Question Success

156ms 200 OK

Ask about FastAPI and receive a researched answer with confidence score

{
  "question": "What is FastAPI?",
  "answer": {
    "text": "FastAPI is a modern, high-performance web framework for building APIs with Python 3.7+ based on standard Python type hints. Key features:",
    "confidence": 0.96,
    "tier": "GOLD",
    "sources": ["https://fastapi.tiangolo.com/"]
  },
  "meta": {
    "domain": "python",
    "search_time_ms": 42
  }
}

Search Questions Success

89ms 200 OK

Search for 'postgresql' questions and get ranked results

{
  "query": "postgresql",
  "results": [
    {
      "id": "qa_001",
      "question": "What is PostgreSQL?",
      "similarity": 0.95,
      "tier": "GOLD"
    },
    {
      "id": "qa_045",
      "question": "How to create an index?",
      "similarity": 0.87,
      "tier": "SILVER"
    }
  ],
  "meta": {
    "total": 48,
    "returned": 2,
    "search_time_ms": 28
  }
}

Stats Success

12ms 200 OK

Get comprehensive knowledge base statistics

{
  "total_questions": 39827,
  "domains": 272,
  "avg_confidence": 99,
  "domains_list": ["python", "typescript", "aws", "kubernetes", "postgresql"],
  "domain_breakdown": {
    "python": 89,
    "typescript": 76,
    "aws": 65
  }
}

Lockfiles (Advanced)

Pin knowledge versions for reproducible builds

For teams that need version-controlled knowledge, our CLI can generate lockfiles that pin exact answers by SHA-256 hash.

# Install CLI
npm install -g @agentskb/cli

# Initialize manifest (list questions your project needs)
agentskb init

# Generate lockfile (pins current answers)
agentskb lock

# Verify integrity
agentskb verify

Same lockfile = same answers, every time. Useful for auditing and compliance.

Need Help?

  • Contact us for support, feature requests, or to contribute Q&As