Skip to content

API Reference

Complete API documentation for KGraph-MCP components, including FastAPI endpoints, agent interfaces, and knowledge graph operations.

🌐 API Sections

  • FastAPI


    REST API endpoints for HTTP-based interactions with KGraph-MCP.

    FastAPI Reference

  • Agents


    AI Agent interfaces for autonomous task management and execution.

    Agents API

  • Knowledge Graph


    Knowledge Graph operations, SPARQL queries, and graph management.

    Knowledge Graph API

  • Task Management


    Task creation, management, and workflow orchestration APIs.

    Task Management API

🚀 Quick API Access

Base URLs

  • Development: http://localhost:8000
  • Production: https://api.kgraph-mcp.dev (coming soon)

Authentication

# API Key Authentication (when enabled)
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
}

Example Request

import requests

# Get system status
response = requests.get("http://localhost:8000/api/v1/status")
print(response.json())

# Create a new task
task_data = {
    "title": "Example Task",
    "description": "Task description",
    "priority": "medium"
}
response = requests.post(
    "http://localhost:8000/api/v1/tasks", 
    json=task_data
)

📖 API Documentation Standards

All APIs follow these standards:

  • OpenAPI 3.0 specification
  • RESTful design principles
  • JSON request/response format
  • HTTP status codes for response indication
  • Comprehensive error handling with detailed messages
  • Request/response validation with Pydantic models

🔗 Interactive Documentation

When running the development server, access interactive API documentation: