Repository navigation
06 Hub API Reference
Updated: 2026-08-27
The hub exposes 49 MCP tools (ring 1) + REST endpoints on :8766. Dynamic/forged
tools (dyn_*, forge_call_dynamic, forge_list_dynamic_tools, forge_spawn_swarm)
are generated at runtime and not listed here by nature; owner-only tools (agy_*) are
gated by RBAC.
Every call follows :
{
"jsonrpc": "2.0",
"id": <int>,
"method": "tools/call",
"params": {
"name": "<tool>",
"arguments": { ... }
}
}Git, Python, shell, trusted_script, GitHub, atlas, snapshot.
-
action:github|python|shell|trusted_script|atlas_build|save_situation|atlas_get|make_snapshot|setup_check|restart_claude|audit_log|worker_status -
code(shell|python) /commands[](parallel shell) /path(trusted_script) /script_args. -
sandbox:local|docker|ps_clm|windows|wasm,container,timeout.
Read a file or tail logs.
-
action:file|tail_logs -
path,lines,pattern.
Extract a single function/class from a file (AST-precise).
-
file_path,function_name.
SQL on RAG/embeddings.db (ring 0 only — use rag for ring 2+).
-
sql. - SELECT results are capped at
FORGE_QUERY_MAX_ROWS(200) viafetchmany(safer than injectingLIMIT— preserves subqueries /UNION/ aggregates). A truncation note is appended past the cap : addLIMIT/WHERE/ aggregate.
Governed in-process file edit (AST + secret scan + tree-lock claim). Writes where the sandbox is ACL-blocked. RING_0.
-
path,content(full write) orblocks(Aider SEARCH/REPLACE, ~-80% tokens).
AST skeleton of a Python file : imports + class/function signatures, bodies elided.
-
file_path.
JIT function-level call-graph : callees + callers of a function.
-
function_name,file_path.
Sandboxed Python REPL for pure compute / sqlite / urllib.
-
code.
Runtime observability : GOAP plan-cache hit-rate, event-loop lag sentinel, resources (ram/cpu/gpu). Read-only.
Hybrid retrieval.
-
action:index|search -
topic,limit.
SearXNG.
-
query,max_results.
Fetch a URL → clean markdown (trafilatura), firewalled against indirect
prompt injection (firewall_web). Pages over ~10k chars are indexed into the
RAG locally (NPU) and a short pointer is returned instead of the raw dump
(token-frugal). For non-MCP host CLIs, see the :7779 egress gateway
(Web Egress Gateway).
-
url,timeout.
Zero-token agent loop : SearXNG → Groq → RAG ingest.
-
objective,max_rounds,max_urls,domain,provider.
Bibliography worker.
-
action:extract|search|list|promote|reject|pin|unpin|get -
text,idea_id,entry_id,reason,status_filter,limit.
Sovereign local code recon (0 cloud token, file:line digest). Use before native
search/read on Nokido code.
-
intent,target,globs,breadth:narrow|medium|wide.
RPC to an LLM provider (single shot).
-
provider:claude|gemini|groq|ollama|gpt4o_github|gemini_cli|claude_agent_sdk|claude_cli|...orauto. -
message,thread_id,max_tokens,rag_context(bool).
Decision-Tree routing (predict optimal provider for a prompt).
-
prompt,task_type.
Route a task to a free-tier LLM (ollama/gemini/groq).
-
task_type,payload.
Hub state & utilities.
-
action:get_mode|set_mode|poll|notify|list_providers|search_recent|whoami|emit_telemetry|quota_model|quota_report -
mode,message,to:claude|gemini|cline|daemon|hub,topic,limit -
flash|flash_lite|pro|preview_pro(quota_report %),quality|apply(quota_model).
Task lifecycle.
-
action:assign|claim|result|status -
task_id,job_id,description,agent,intent,priority,result.
EventBus.
-
action:publish|history -
topic,kind,data,topics[],limit.
Batch multiple primitive MCP tool calls in one round-trip.
-
calls:[{tool, args}, ...].
GOAP planner — decompose a goal into JSON-RPC steps.
-
goal,ring_max,context.
Read one zone of the swarm blackboard (shared working memory).
-
zone_name(mission|architecture_rules|discovered_facts|active_bugs|scratch),filter.
Propose an atomic fact into a zone (idempotent by key, ACL by ring).
-
zone_name,fact,category,trust,key.
Local agentic loop : Qwen2.5-Coder via llama-server orchestrates MCP tools
autonomously. Loops tool_calls until finish_reason=stop.
-
task,tools[](whitelist),max_iter,model,temperature.
Autonomous loop via GOAP + autonomous_loop_state table.
-
pattern(e.g.health_check,git_hygiene),max_steps.
Centralized skills (DB + filesystem).
-
action:list|load|search|ingest -
name,query,limit.
Dynamic MCP catalogue scoping (anti context-bomb) : reduce tools/list to the group
matching an intent.
-
action:set|clear|status,intent,target_agent.
Run / generate tests for a module (AST-validated).
-
filepath.
Trigger one autonomous evolution cycle (self-improvement loop).
Trigger a forge audit cycle (health / integrity).
netcfg-agent dispatcher (multi-vendor config).
-
action:ping|vendors|list_equipments|get_dashboard|topology|audit|verify_chain|preview_deploy|open_terminal|export_topology|vendor_search|vendor_stats -
shape_id,command,wait_ms,format(d2|drawthe|mermaid),query,vendor,limit,db_path,scale_m_per_px.
NSSM lifecycle for Nokido organs.
-
organ_name,action:START|STOP|RESTART|STATUS -
priority:LOW|NORMAL|HIGH.
Move/copy files between Windows ↔ Docker ↔ WSL.
-
action:copy_to_docker|copy_from_docker|copy_to_wsl -
src,dest,distro.
Declare a service's desired state; the hub owns the privileges (SeTcbPrivilege, daemons, containers). You are a client : declare intent, the hub makes it true.
-
service(docker|searxng|hub|ollama|netcfg|webhub|graph|embed|lmstudio|Nokido<Name>),desired_state:running|stopped|restarted.
Governed Docker actions (default-deny sovereign broker, LaForgeTrusted context).
-
argv(list without the worddocker, e.g.["ps","-a"]),timeout.
Edge score in the code graph.
-
src,dst,edge_type:import|call|inherit|embed_sim -
metadata(sim, deprecated).
BFS propagation of a CVE through the dep graph.
-
cve_id,entry_module,max_depth.
Personalized PageRank.
-
seed,alpha,depth.
| Method | Path | Purpose |
|---|---|---|
| GET | /health |
Liveness probe (returns version + ts). |
| GET | /.well-known/{path} |
OAuth discovery (MCP spec compliance). |
| POST | /mcp |
The JSON-RPC MCP endpoint (above). |
| POST | /admin/restart |
Trigger NSSM restart (ring 0). |
| POST | /admin/ingest_repo |
Ingest a git repo into RAG. |
| POST | /admin/run_job |
Detached job (returns job_id). |
| GET | /admin/job/{job_id} |
Poll job status. |
| GET | /admin/providers |
LLM provider admin UI. |
| GET | /api/providers |
JSON list providers + status. |
| POST | /api/providers/{name}/key |
Set API key into vault. |
| DELETE | /api/providers/{name}/key |
Remove API key. |
| POST | /api/providers/{name}/test |
Health-check. |
| GET | /forge/rag |
RAG explorer UI. |
| GET | /api/rag/stats |
RAG stats JSON. |
| POST | /api/rag/tokenize |
Tokenize text. |
| GET | /api/rag/stream |
SSE stream of recent RAG inserts. |
| GET | /forge/network |
Network log UI. |
| GET | /api/network/stream |
SSE stream of MCP traffic. |
| GET | /api/network/history |
Network history JSON. |
| GET | /api/mcp/servers |
List MCP servers (claude_desktop_config view). |
| POST | /api/mcp/toggle |
Enable/disable an MCP server. |
| GET | /forge/watch |
Watch jobs UI. |
| GET | /api/watch/jobs |
Watch jobs JSON. |
| POST | /orchestrate/loop |
Manual orchestrate loop trigger. |
| GET | /api/swarm/health |
Swarm health overview. |
| GET | /api/loops/status |
Autonomous loops status. |
| POST | /api/maintenance/gc |
Glymphatic GC (admin token required). |
| POST | /api/sandbox/spawn |
Spawn Docker sandbox. |
| GET | /api/sandbox/runtimes |
List runtimes. |
| GET | /api/audit/recent |
Recent audit log. |
| GET | /api/audit/trace/{trace_id} |
Trace by ID. |
| GET | /api/ring_buffer/stats |
Ring buffer stats (NANO). |
- 200 : success.
- 400 : malformed JSON or invalid arguments.
-
401 :
Authorizationheader missing / wrong token. -
403 :
Originnot allowed, or ring insufficient. - 404 : unknown method/tool.
- 413 : payload too large (>512 KB).
-
500 : internal error (returned as JSON-RPC
errorobject).
{
"jsonrpc": "2.0",
"id": <int|null>,
"error": {
"code": -32600,
"message": "Invalid Request",
"data": {"validation_errors": [...]}
}
}Standard codes :
-
-32700Parse error -
-32600Invalid Request -
-32601Method not found -
-32602Invalid params -
-32603Internal error
- Every tool argument schema has an
explanationfield (optional by default, required ifLAFORGE_EXPLANATION_MODE=error) — it's a one-line why this tool is being used, to help the audit log. - Most tools take an
actiondiscriminator to keep the tool count manageable (verb-dispatcher pattern). - Tool responses always carry
{"content":[{"type":"text","text":"..."}]}. Parsing convention : always use.get()(the hub returnserrorinstead ofresulton exceptions — neverd["result"]direct). -
Output frugality guard. Bulk raw outputs (
run,exegol,browser,ctf_browser,netcfg) overFORGE_TOOL_OUTPUT_CAP(12k chars) are truncated head+tail with a pointer (re-target via grep/filter). Signal-bearing tools (read,ask,rag,research_agent,crawl, …) and valid JSON are never truncated — frugality must not reduce intelligence. Opt-outFORGE_TOOL_OUTPUT_CAP=0. -
Trace correlation. Send a
traceparent(W3C) header to thread atrace_idthrough the hub → audit log, execution traces and anchored lessons ; absent, the hub generates one (chained per session within 120 s). Read a whole flow viaGET /api/audit/trace/{trace_id}.
Nokido-labs/nokido · AGPL-3.0 (licence commerciale disponible) · wiki genere depuis docs/wiki de v0.20.12 (5fbcdc8) — corrections : ouvrir une issue ou une PR sur le depot.
Nokido
English
- 01 — Installation
- 02 — Quick Start
- 03 — Architecture overview
- 04 — MCP clients setup
- 05 — LLM providers
- 06 — Hub API reference
- 07 — Security model
- 08 — Vault & secrets
- 09 — TUI reference
- 10 — Docker profiles
- 11 — Cross-OS notes
- 12 — AMI cognitive stack
- 13 — Hardware roadmap
- 14 — Troubleshooting
- 15 — Glossary
- 16 — FAQ
- 17 — First launch
- 18 — Launchers & service files
- 19 — Knowledge Pack
- 20 — Modules Reference
- 21 — SSoT Cross-CLI
- 22 — Governance, cognition & self-safety
- 23 — Orchestration & Workflows
- 24 — Cloud peers (claude.ai, ChatGPT)
- OpenAI Gateway souverain
- Nokido — Wiki
- SearXNG Keeper
- Web Egress Gateway —
:7779
Français
- Accueil
- 01 — Installation
- 02 — Démarrage rapide
- 03 — Aperçu architecture
- 04 — Configuration clients MCP
- 05 — Providers LLM
- 06 — Référence API hub
- 07 — Modèle de sécurité
- 08 — Vault & secrets
- 09 — Référence TUI
- 10 — Profils Docker
- 11 — Notes multi-OS
- 12 — Pile cognitive AMI
- 13 — Roadmap matérielle
- 14 — Troubleshooting
- 15 — Glossaire
- 16 — FAQ
- 17 — Premier lancement
- 18 — Lanceurs & fichiers services
- 19 — Knowledge Pack
- 20 — Référence des modules
- 21 — SSoT Cross-CLI
- 22 — Gouvernance, cognition & auto-sûreté
- 23 — Orchestration & workflows
- 24 — Pairs cloud (claude.ai, ChatGPT)