Complete reference for the ELO-AGI REST API. Health checks, cognitive chat, sandboxed Python REPL, benchmarks, and analysis.
https://zedigital-elo-agi.fly.dev
All endpoints return JSON. Interactive Swagger/OpenAPI documentation is available at /docs on the API server.
/api/health
Health check endpoint. Returns the current status, uptime in seconds, and API version.
curl https://zedigital-elo-agi.fly.dev/api/health
{
"status": "ok",
"uptime": 123.45,
"version": "0.9.0"
}
/api/info
Returns detailed system information including module counts, tier breakdown, capabilities list, and author details.
curl https://zedigital-elo-agi.fly.dev/api/info
{
"name": "ELO-AGI (NEURO)",
"version": "0.9.0",
"module_count": 38,
"tiers": {
"cognitive": 20,
"infrastructure": 6,
"support": 5,
"agi": 7
},
"capabilities": [
"causal_reasoning",
"compositional_abstraction",
"continual_learning",
"robustness",
"language_understanding"
],
"author": "Elvi Zekaj"
}
/api/modules
Returns an array of all 38 cognitive modules with their name, category, and description, plus the total count.
curl https://zedigital-elo-agi.fly.dev/api/modules
{
"modules": [
{
"name": "Global Workspace",
"category": "Cognitive",
"description": "GWT attention-gated broadcasting"
},
{
"name": "Predictive Coding",
"category": "Cognitive",
"description": "Free Energy Principle, hierarchical predictions"
}
// ... 36 more modules
],
"total": 38
}
/api/chat
Chat with the cognitive AI engine. Accepts a message and optional conversation history, returns a response with cognitive context.
{
"message": "string (max 10000 characters)",
"history": [
{ "role": "user", "content": "previous message" },
{ "role": "assistant", "content": "previous response" }
]
}
curl -X POST https://zedigital-elo-agi.fly.dev/api/chat \ -H 'Content-Type: application/json' \ -d '{"message": "Explain causal reasoning", "history": []}'
{
"response": "Causal reasoning is the ability to identify...",
"cognitive_context": {
"modules_activated": ["reasoning", "language", "memory"],
"processing_time_ms": 245,
"confidence": 0.87
}
}
/api/repl
Execute Python commands in a sandboxed REPL environment. Dangerous imports are blocked, with a 256MB memory limit and 10-second execution timeout.
{
"command": "string (max 5000 characters)"
}
curl -X POST https://zedigital-elo-agi.fly.dev/api/repl \ -H 'Content-Type: application/json' \ -d '{"command": "print(2 + 2)"}'
{
"output": "4\n",
"error": null,
"execution_time": 0.003
}
/api/benchmark
Run the cognitive benchmark suite. Optionally specify which categories to evaluate. Returns scores per category with an overall aggregate.
{
"categories": ["causal_reasoning", "compositional"] // optional
}
causal_reasoning
compositional
continual_learning
robustness
language
memory
planning
reasoning
curl -X POST https://zedigital-elo-agi.fly.dev/api/benchmark \ -H 'Content-Type: application/json' \ -d '{"categories": ["causal_reasoning", "robustness"]}'
{
"results": {
"categories": {
"causal_reasoning": {
"average_score": 0.85,
"tests": 124,
"passed": 124
},
"robustness": {
"average_score": 0.71,
"tests": 192,
"passed": 192
}
},
"overall_score": 0.78,
"total_tests": 316
}
}
/api/analyze
Run cognitive analysis on input text. Supports dual-process thinking, emotion analysis, and reasoning chain analysis.
{
"text": "string (max 5000 characters)",
"analysis_types": ["dual_process", "emotion", "reasoning"]
}
dual_process
System 1 (fast/intuitive) vs System 2 (slow/analytical) thinking pathways
emotion
Affect spectrum, valence, arousal, and primary emotion detection
reasoning
Logical, analogical, and causal reasoning chain analysis
curl -X POST https://zedigital-elo-agi.fly.dev/api/analyze \ -H 'Content-Type: application/json' \ -d '{"text": "The discovery filled me with wonder", "analysis_types": ["dual_process", "emotion"]}'
{
"analyses": {
"dual_process": {
"system1": {
"response_time_ms": 42,
"confidence": 0.78,
"assessment": "Positive emotional content detected"
},
"system2": {
"response_time_ms": 1180,
"confidence": 0.91,
"assessment": "Expression of epistemic emotion (wonder/awe)"
},
"integration": {
"override": true
}
},
"emotion": {
"primary_emotion": "awe",
"primary_score": 0.89,
"valence": 0.82,
"arousal": 0.65,
"affect_spectrum": {
"joy": 0.72,
"surprise": 0.68,
"anticipation": 0.45
}
}
},
"execution_time": 1.24
}