Documentation
API Reference
Reference for the hosted MCP surface, G6’s core types, and the REST surface that ships in the codebase. G6 has 250+ components and 16 bases; per-component reference is generated separately under full documentation. This page is hand-written.
Contents
Quick Examples
The REST surface is not part of the hosted product today. It ships in the codebase, but the /api/ route is closed at the g6solver.com edge, so the calls below return 404 there. G6 is reached over MCP — see MCP Servers for the working surface. The examples are kept as a reference for anyone running the REST base themselves.
Health Check
curl https://g6solver.com/api/health
{"status": "ok", "system": "G6 Hyperdistillation", "version": "0.1.0"}
Invoke a Component Directly
curl -X POST https://g6solver.com/api/invoke/grounding \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"op": "infer", "params": {"query": "What is backpropagation?", "domain": "ai_ml"}}'
{
"ok": true,
"result": "Backpropagation is an algorithm for training neural networks by computing gradients of the loss function with respect to each weight via the chain rule, propagating errors backward through the network layers.",
"confidence": 0.87
}
MCP Tools & License Tiers
G6Solver registers 250+ MCP tools on its hosted gateway, accessed via Claude Code or any MCP client. How many of them your key may call depends on your plan.
Tool Access by Plan
| Plan | Tiers Included | Tools | Billing |
|---|---|---|---|
| Free / Trial | Core + Guide + Invariants + Diagnostics | 30 tools | Free |
| Researcher | Core + Navigator + Guide | 66 tools | Monthly license |
| Builder | All 15 categories | Full tool access | Monthly license |
250+ tools on the hosted MCP gateway, across 15 categories
Every plan reaches the same server; your plan decides which of the 250+ tools it will serve. The full 30 tools on the free tier are listed below — call system_status to see what your own key can reach, and guide_find_tool to search by task.
Free — the complete list
30 toolsdecompose_goal, run_pipeline, run_bayesian, run_automl, recommend_algo, system_status, list_components, invoke_component, invoke_component_typed, job_input_schema, g6_first_call_help_tool, guide_ask, guide_how_to, guide_find_tool, guide_plan_workflow, guide_system_overview, invariants_check, invariants_verify, invariants_list_categories, invariants_summary, invariants_at_tier, invariants_tier_gap, invariants_info, diagnostics_collect, diagnostics_auto_report, diagnostics_export, diagnostics_list, diagnostics_ops, diagnostics_status, diagnostics_info
Researcher adds
+36 → 66Component navigation (nav_discover, nav_search, nav_recommend, nav_inspect, nav_stats, nav_health), the job workbench (job_submit, job_get_result, job_refine, job_export, job_feedback and the job_workbench_* family), EvoSkill read-only (list_programs, get_frontier), domain grounding (ground_domain), approvals, bug reports, and planning helpers.
Builder adds
+177 → 243The template pipelines (run_research_pipeline, run_codegen_pipeline, run_data_pipeline, run_safety_pipeline, run_knowledge_pipeline), orchestration (compose_and_run, cross_call_tool, dependency_graph, explain_component), the EvoSkill write path (evolve_skills, propose_skill, generate_skill, evaluate_program, feedback_descent_run), and the job-agent and formal-methods families. See MCP Servers for parameter reference.
The remaining 16 registered tools are on no plan at all — payment and privileged-execution tools are reachable only to administrators.
Core Types
Foundational data structures from the G6 Core module.
Result[T]
A monadic result type that encapsulates success or failure without exceptions.
| Method | Signature | Description |
|---|---|---|
| ok | Result.ok(value: T) → Result[T] |
Create success result |
| fail | Result.fail(error: str) → Result[T] |
Create failure result |
| map | .map(fn: Callable[[T], U]) → Result[U] |
Transform success value |
| flat_map | .flat_map(fn: Callable[[T], Result[U]]) → Result[U] |
Chain operations |
| or_else | .or_else(fn: Callable[[str], Result[T]]) → Result[T] |
Handle failure |
| is_ok | .is_ok() → bool |
Check success |
| is_fail | .is_fail() → bool |
Check failure |
| value | .value → T |
Get success value (raises if fail) |
| error | .error → str |
Get error message (raises if ok) |
AIBlock[I, O, S]
Generic dataclass representing a single unit of AI computation. All components inherit from this.
| Member | Type / Signature | Description |
|---|---|---|
| name | str |
Block identifier |
| state | S |
Mutable state (default: None) |
| infer | (input: I) → Result[O] |
Run inference |
| learn | (data: list[I]) → Result[S] |
Update from data |
| save | (path: str) → Result[str] |
Persist state |
| load | (path: str) → Result[str] |
Restore state |
| >> | (other: AIBlock) → PipelineBlock |
Compose into pipeline |
PipelineBlock
Created via the block_a >> block_b operator. Chains block execution left-to-right.
| Method | Signature | Description |
|---|---|---|
| process | (input: Any) → Result |
Execute pipeline left-to-right |
ResourceBounds
Frozen dataclass that caps compute, budget, and time for any operation.
| Field | Type | Default | Description |
|---|---|---|---|
| max_tokens | int |
128000 | Maximum tokens per operation |
| max_budget_usd | float |
0.0 | Budget cap (0 = unlimited) |
| timeout_sec | int |
60 | Operation timeout |
| max_retries | int |
3 | Retry limit |
ComponentRegistry
Singleton that auto-discovers all workspace components at import time.
| Method | Signature | Description |
|---|---|---|
| get_registry | () → ComponentRegistry |
Get singleton registry |
| list_all | () → list[ComponentMeta] |
List all discovered components |
| invoke | (name: str, op: str, params: dict) → Result |
Invoke component operation |
Protocols
Structural typing contracts that components may implement. Defined in the G6 Core Protocols module.
| Protocol | Method | Signature | Description |
|---|---|---|---|
| Ingestible | ingest | (raw: Any) → Result |
Parse raw input into structured form |
| Emittable | emit | (data: Any) → Result |
Format structured data for output |
| Storable | save | (path: str) → Result[str] |
Persist to disk |
| load | (path: str) → Result[str] |
Restore from disk | |
| Inferrable | infer | (input: I) → Result[O] |
Core inference operation |
| Learnable | learn | (data: list) → Result |
Online learning from data |
| InductiveBias | bias | () → dict |
Declare model assumptions |
Pipeline API
Trio-powered pipeline execution via the G6 pipeline engine. Compose multi-step workflows from any registered component.
PipelineStep
A single step in a pipeline definition.
| Field | Type | Description |
|---|---|---|
| component | str |
Component name from registry |
| op | str |
Operation to invoke |
| params | dict |
Operation parameters |
Functions
run_pipeline(steps: list[PipelineStep]) → Result[list]
run_parallel(steps: list[PipelineStep]) → Result[list]
run_pipeline executes steps sequentially; run_parallel executes them concurrently via Trio nurseries.
Usage Example
# Define pipeline steps and execute
steps = [
PipelineStep(component="ctx_search", operation="infer",
params={"query": "machine learning"}),
PipelineStep(component="ctx_rag", operation="infer",
params={"query": "summarize findings"}),
]
result = run_pipeline(steps)
REST Endpoints
Not reachable on g6solver.com. The /api/ route is closed at the edge, so every path below returns 404 against the hosted service. This section documents the REST base for people running it themselves.
HTTP API served by the g6_rest project (FastAPI + Uvicorn). All endpoints return JSON.
Health & Discovery
| Method | Path | Description |
|---|---|---|
| GET | /health | Health check — returns system status |
| GET | /blocks | List available AI blocks |
| GET | /components | List all registered components |
Example
curl https://g6solver.com/api/health
{"status": "ok", "system": "G6 Hyperdistillation", "version": "0.1.0"}
Dynamic Invocation
| Method | Path | Description |
|---|---|---|
| POST | /invoke/{component} | Invoke any component operation |
| POST | /pipeline | Run multi-step pipeline |
Security warning: These endpoints accept arbitrary component names and operations. In production, restrict access with an operation whitelist and authentication middleware.
Example: POST /invoke/grounding
curl -X POST https://g6solver.com/api/invoke/grounding \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"op": "infer", "params": {"query": "What is gradient descent?", "domain": "ai_ml"}}'
{"ok": true, "result": "Gradient descent is an optimization algorithm...", "confidence": 0.91}
Navigator
| Method | Path | Description |
|---|---|---|
| GET | /nav/discover | Discover components matching a query |
| GET | /nav/recommend | Get component recommendations |
| GET | /nav/inspect/{component} | Inspect a component's capabilities |
| GET | /nav/stats | Aggregate navigator statistics |
Example: GET /nav/discover
curl "https://g6solver.com/api/nav/discover?query=machine+learning&limit=3" \
-H "Authorization: Bearer YOUR_API_KEY"
[
{"name": "adapt_sklearn", "score": 0.95, "cluster": "self_learning"},
{"name": "adapt_pygad", "score": 0.82, "cluster": "self_learning"},
{"name": "ctx_rag", "score": 0.78, "cluster": "symbolic_ml"}
]
Guide
| Method | Path | Description |
|---|---|---|
| POST | /guide/ask | Ask a natural-language question |
| POST | /guide/plan | Plan a multi-step workflow |
| GET | /guide/overview | Get system architecture overview |
Example: POST /guide/ask
curl -X POST https://g6solver.com/api/guide/ask \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "How do I verify code safety?"}'
{"ok": true, "answer": "Use the run_safety_pipeline tool which chains CSF check → available formal checks → grounding audit. For individual checks, invoke align_csf or formal_methods directly and inspect proof status/artifacts."}
Template Pipelines
| Method | Path | Description |
|---|---|---|
| POST | /pipeline/research | Search → RAG → summarise |
| POST | /pipeline/codegen | Plan → generate → verify |
| POST | /pipeline/data | Ingest → profile → analyse |
| POST | /pipeline/safety | CSF check → verify → ground |
Example: POST /pipeline/research
curl -X POST https://g6solver.com/api/pipeline/research \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "transformer attention mechanisms"}'
{
"ok": true,
"steps": [
{"step": "search", "status": "ok", "results_found": 8},
{"step": "rag_retrieval", "status": "ok", "chunks_retrieved": 5},
{"step": "summary", "status": "ok"}
],
"summary": "Transformer attention mechanisms use scaled dot-product attention to compute relevance scores between query and key vectors..."
}
Workflow
| Method | Path | Description |
|---|---|---|
| POST | /workflow/compose | Compose and execute workflow |
| GET | /graph/dependencies | Component dependency graph |
Error Responses
{"ok": false, "error": "Invalid or expired API key"}
{"ok": false, "error": "Tool 'evolve_skills' requires a higher subscription tier. Upgrade at https://g6solver.com/pricing/"}
{"ok": false, "error": "Validation failed", "details": [{"field": "goal", "message": "Field required"}]}
{"ok": false, "error": "Rate limit exceeded. Retry after 12s"}
Request / Response Models
Pydantic models accepted by the REST endpoints. Field names are snake_case in JSON exactly as they are in Python — there is no camelCase conversion.
InvokeRequest
Body for POST /invoke/{component}
| Field | Type | Required | Description |
|---|---|---|---|
| op | str |
Yes | Operation name (e.g., "infer") |
| params | object |
No ({}) | Operation parameters |
PipelineRequest
Body for POST /pipeline
| Field | Type | Required | Description |
|---|---|---|---|
| steps | list[PipelineStep] |
Yes | Ordered pipeline steps |
| initial | object |
No | Initial payload handed to the first step |
PipelineStepModel
Each element in the steps array of a PipelineRequest.
| Field | Type | Required | Description |
|---|---|---|---|
| component | str |
Yes | Component name |
| op | str |
Yes | Operation to invoke |
| params | object |
No ({}) | Parameters |
The listing below is auto-generated from the codebase. Run python manage.py generate_api_docs to refresh.
Components
Other
adapt_audio
MCPAdapt Audio — mvp.adapt_audio
ML & Optimisation
adapt_automl
MCPadapt_automl — mvp.adapt_automl
Other
adapt_bayesian
MCPadapt_bayesian — mvp.adapt_bayesian
adapt_blender
MCPAdapt Blender — mvp.adapt_blender
adapt_comfyui
MCPAdapt ComfyUI -- mvp.adapt_comfyui
adapt_creative_api
MCPadapt_creative_api — mvp.adapt_creative_api
adapt_diagrams
MCPAdapt Diagrams — mvp.adapt_diagrams
adapt_django
MCPAdapt Django — mvp.adapt_django
adapt_eurisko
MCPAdapt Eurisko — mvp.adapt_eurisko
adapt_experta
MCPAdapt Experta — mvp.adapt_experta
adapt_ffmpeg
MCPAdapt FFmpeg -- mvp.adapt_ffmpeg
adapt_generative_art
MCPAdapt Generative Art — mvp.adapt_generative_art
Self-Modification
adapt_healing
MCPAdapt Healing — mvp.adapt_healing
Other
adapt_image
MCPAdapt Image — mvp.adapt_image
adapt_instructor
MCPAdapt Instructor — mvp.adapt_instructor
adapt_keras
MCPAdapt Keras — mvp.adapt_keras
adapt_learning
MCPadapt_learning — mvp.adapt_learning
Self-Learning
adapt_memory
MCPAdapt Memory — mvp.adapt_memory
adapt_optimisation
MCPadapt_optimisation — mvp.adapt_optimisation
adapt_pandas
MCPAdapt Pandas — mvp.adapt_pandas
Other
adapt_physical_ai
MCPAdapt Physical AI — mvp.adapt_physical_ai
Self-Learning
adapt_pygad
MCPadapt_pygad — mvp.adapt_pygad
Other
adapt_pytorch
MCPAdapt PyTorch — mvp.adapt_pytorch
adapt_rq
MCPAdapt RQ — mvp.adapt_rq
Self-Learning
adapt_sklearn
MCPAdapt Scikit-learn — mvp.adapt_sklearn
Other
adapt_synthetic_world
MCPAdapt Synthetic World — mvp.adapt_synthetic_world
adapt_trm
MCPAdapt TRM — mvp.adapt_trm
adapt_ui_design
MCPAdapt UI Design -- mvp.adapt_ui_design
adapt_visualisation
MCPAdapt Visualisation — mvp.adapt_visualisation
adapt_voice
MCPAdapt Voice — mvp.adapt_voice
adapt_webpage
MCPAdapt Webpage -- mvp.adapt_webpage
affordance_kb
Affordance Knowledge Base component.
agent_autogen
MCPAgent AutoGen — mvp.agent_autogen
Agents
agent_claude
MCPagent_claude — mvp.agent_claude
Other
agent_langchain
MCPAgent LangChain — mvp.agent_langchain
agent_langgraph
MCPAgent LangGraph — mvp.agent_langgraph
Agents
agent_nanoclaw
MCPAgent NanoClaw — mvp.agent_nanoclaw
Other
agent_openai
MCPAgent OpenAI — mvp.agent_openai
Agents
agent_openclaw
MCPAgent OpenClaw — mvp.agent_openclaw
Other
agent_smolagents
MCPAgent Smolagents — mvp.agent_smolagents
align_artifacts
MCPAlign Artifacts — mvp.align_artifacts
align_coconstructive
MCPAlign CoConstructive — mvp.align_coconstructive
Alignment
align_csf
MCPalign_csf — mvp.align_csf
align_evals
MCPalign_evals — mvp.align_evals
align_prompt_library
MCPalign_specs
MCPAlign Specs — mvp.align_specs
Other
align_verbsamp
MCPAlign VerbSamp — mvp.align_verbsamp
autonomous_orchestrator
MCPautonomy_governor
MCPAutonomy Governor -- mvp.autonomy_governor
Self-Modification
cegis
MCPcegis — mvp.cegis
Other
cog_arch_actr
MCPcog_arch_actr — ACT-R cognitive architecture.
cog_arch_aixi
MCPcog_arch_aixi — AIXItl cognitive architecture.
cog_arch_dgm
MCPDiscovering Gödel Machine (DGM) cognitive architecture component.
cog_arch_gps
MCPcog_arch_gps — General Problem Solver cognitive architecture.
cog_arch_soar
MCPcog_arch_soar — SOAR cognitive architecture.
compliance
MCPcompliance — mvp.compliance
Core Infrastructure
config
Other
context_engine
MCPContext Engine — mvp.context_engine
Core Infrastructure
core
Core — mvp.core
Failure Engineering
csf
MCPCSF — mvp.csf
Other
csf_cognitive
MCPCSF Cognitive — mvp.csf_cognitive
csf_strategy
MCPcsf_strategy — mvp.csf_strategy
ctx_ace
MCPCtx ACE — mvp.ctx_ace
ctx_claude_context
MCPCtx Claude Context — mvp.ctx_claude_context
Symbolic ML & Retrieval
ctx_cognee
MCPctx_cognee — mvp.ctx_cognee
ctx_colbert
MCPctx_colbert -- mvp.ctx_colbert
ctx_elastic
MCPCtx Elastic — mvp.ctx_elastic
Other
ctx_fenic
MCPCtx Fenic — mvp.ctx_fenic
Symbolic ML & Retrieval
ctx_langextract
MCPctx_langextract — mvp.ctx_langextract
ctx_markitdown
MCPCtx MarkItDown — mvp.ctx_markitdown
Other
ctx_mnm
MCPCtx MnM — mvp.ctx_mnm
Symbolic ML & Retrieval
ctx_rag
MCPctx_rag — mvp.ctx_rag
ctx_recursive
MCPctx_recursive — mvp.ctx_recursive
ctx_scrapling
MCPctx_scrapling -- mvp.ctx_scrapling
ctx_search
MCPctx_search — mvp.ctx_search
Other
ctx_vision
MCPctx_vision -- mvp.ctx_vision
cybersecurity
MCPcybersecurity — mvp.cybersecurity
Core Infrastructure
database
MCPDatabase — mvp.database
Other
deep_understanding
MCPmvp.deep_understanding — symbolic reasoning substrate for G6.
deploy_aws
Deploy AWS — mvp.deploy_aws
deploy_baremetal
Deploy Bare Metal — mvp.deploy_baremetal
deploy_core
Deploy Core — mvp.deploy_core
deploy_docker
Deploy Docker — mvp.deploy_docker
deploy_gcp
Deploy GCP — mvp.deploy_gcp
deploy_k8s
Deploy K8s — mvp.deploy_k8s
deploy_podman
Deploy Podman — mvp.deploy_podman
embodiment
MCPEmbodiment -- mvp.embodiment
experience_loop
Experience Loop — Dyna-style experience recording with Beta competence tracking.
Formal Methods
formal_methods
MCPFormal Methods — mvp.formal_methods
Goal Engine
goal_engine
MCPgoal_engine — mvp.goal_engine
Failure Engineering
grounding
MCPgrounding — mvp.grounding
Other
guide
MCPGuide component — AI consultant for optimal G6 system usage.
hat_orchestrator
HAT Orchestrator — multi-party human-AI teaming component.
human_development
MCPhyperdistillation
MCPHyperdistillation component — reasoning-to-code learning pipeline.
job_accountant
MCPjob_accountant — G6 Accountant job agent.
job_administration
MCPjob_administration — G6 Administration job agent.
job_agriculture
MCPjob_agriculture — G6 Agriculture job agent.
job_ai
MCPjob_ai — G6 AI job agent.
job_allied_health
MCPjob_allied_health — G6 AlliedHealth job agent.
job_analyst
MCPjob_analyst — G6 Analyst job agent.
job_business
MCPjob_business — G6 Business job agent.
job_construction
MCPjob_construction — G6 Construction job agent.
job_consultant
MCPjob_consultant — G6 Consultant job agent.
job_creative_media
MCPjob_creative_media — G6 CreativeMedia job agent.
job_education
MCPjob_education — G6 Education job agent.
job_energy
MCPjob_energy — G6 Energy job agent.
job_engineer
MCPjob_engineer — G6 Engineer job agent.
job_entertainment
MCPjob_entertainment — G6 Entertainment job agent.
job_entrepreneurship
MCPjob_entrepreneurship — G6 Entrepreneurship job agent.
job_finance
MCPjob_finance — G6 Finance job agent.
job_framework
job_framework — Foundation for all 32 G6 economic job agents.
job_hospitality
MCPjob_hospitality — G6 Hospitality job agent.
job_it
MCPjob_it — G6 IT job agent.
job_labourer
MCPjob_labourer — G6 Labourer job agent.
job_lawyer
MCPjob_lawyer — G6 Lawyer job agent.
job_logistics
MCPjob_logistics — G6 Logistics job agent.
job_machinery_operator
MCPjob_machinery_operator — G6 MachineryOperator job agent.
job_manager
MCPjob_manager — G6 Manager job agent.
job_manufacturing
MCPjob_manufacturing — G6 Manufacturing job agent.
job_marketing
MCPjob_marketing — G6 Marketing job agent.
job_medical_surgical
MCPjob_medical_surgical — G6 MedicalSurgical job agent.
job_mining
MCPjob_mining — G6 Mining job agent.
job_pharmaceutical
MCPjob_pharmaceutical — G6 Pharmaceutical job agent.
job_political
MCPjob_political — G6 Political job agent.
job_psychologist
MCPjob_psychologist — G6 Psychologist job agent.
job_public_relations
MCPjob_public_relations — G6 Public Relations job agent.
job_researcher
MCPjob_researcher — G6 Researcher job agent.
job_sales
MCPjob_sales — G6 Sales job agent.
job_scientist
MCPjob_scientist — G6 Scientist job agent.
job_services
MCPjob_services — G6 Services job agent.
job_tax
MCPjob_tax — G6 Tax job agent.
job_tourism
MCPjob_tourism — G6 Tourism job agent.
job_trades
MCPjob_trades — G6 Trades job agent.
Core Infrastructure
llm_router
MCPllm_router — mvp.llm_router
Other
mesh3d
MCPMesh3D -- mvp.mesh3d
Self-Modification
meta_programming
MCPMeta Programming — mvp.meta_programming
Other
motor_control
MCPMotor Control — mvp.motor_control
multimodal
multimodal — mvp.multimodal
navigator
MCPNavigator component — hierarchical MCP discovery and composition.
observability
MCPObservability component — profiling, metrics, tracing, alerting.
physics_prediction
Physics prediction component — articulated dynamics, contact models, stability analysis.
polyglot
MCPpolyglot — mvp.polyglot
realtime_bridge
realtime_bridge — three-tier controller interface with shared buffer and command queue.
recursive_architect
MCPself_debug
MCPself_debug — mvp.self_debug
sensory_fusion
MCPSensory Fusion -- mvp.sensory_fusion
solver
MCPSolver component — 15-step problem solving orchestrator.
system_doctor
system_doctor — Self-healing orchestration component for G6.
tactile_fusion
Tactile fusion — contact detection, grip stability, surface classification.
Core Infrastructure
workspace_manager
MCPWorkspace Manager — mvp.workspace_manager
Bases
cicd
CICD — mvp.cicd
cli
CLI — mvp.cli
computer_use
computer_use — mvp.computer_use
erlang
ERLANG — mvp.erlang
grpc
GRPC — mvp.grpc
mcp
MCP — mvp.mcp
rest
REST — mvp.rest
soap
SOAP — mvp.soap
virtualbox
virtualbox — mvp.virtualbox