API Reference

Public Demo API - No authentication required

Base URL: https://hrag.synapsecorp.eu/api/modules/hrag Rate Limit: 20 req/min
GET ?action=demo_info
System Information

Returns system version, capabilities, and current status.

Example Request

curl https://hrag.synapsecorp.eu/api/modules/hrag?action=demo_info

Example Response

{
  "status": "success",
  "system": "SynapseHRAG",
  "version": "1.2.0",
  "edition": "Community",
  "capabilities": {
    "search": true,
    "ingest": false,
    "hebbian_mode": "manual"
  },
  "cognitive_levels": ["strategic", "tactical", "operational"]
}
GET ?action=demo_stats
Live Statistics

Returns real-time statistics about the knowledge base.

Example Request

curl https://hrag.synapsecorp.eu/api/modules/hrag?action=demo_stats

Example Response

{
  "status": "success",
  "stats": {
    "total_neurons": 847,
    "total_synapses": 2341,
    "levels": {
      "strategic": 42,
      "tactical": 156,
      "operational": 649
    },
    "avg_latency_ms": 418
  }
}
POST ?action=demo_search
Semantic Search

Search the hierarchical knowledge base across all 3 cognitive levels.

Parameters

query required Search query string
limit optional Max results per level (default: 5)

Example Request

curl -X POST https://hrag.synapsecorp.eu/api/modules/hrag \
  -d "action=demo_search&query=neural+architecture&limit=3"

Example Response

{
  "status": "success",
  "query": "neural architecture",
  "results": {
    "strategic": {
      "count": 2,
      "items": [
        {
          "content": "HRAG implements a 3-level cognitive architecture...",
          "similarity": 0.89,
          "neuron_id": "str_001"
        }
      ]
    },
    "tactical": {
      "count": 3,
      "items": [...]
    },
    "operational": {
      "count": 5,
      "items": [...]
    }
  },
  "total_results": 10,
  "latency_ms": 142
}

Response Codes

200 Success
400 Bad Request - Missing or invalid parameters
429 Rate Limited - Too many requests (20/min)
500 Server Error

Rate Limits

The demo API has the following limits:

  • 20 requests per minute
  • Burst: 10 requests
  • No authentication required

Need higher limits? Check out Startup Edition →

Code Examples

Ready-to-use clients available on GitHub: