hyra-research
Promotes verified experiments by creating a new branch (exp/EXP_ID) in a target Git repository and transferring production modules and demonstration notebooks into it.
Generates structured Obsidian Zettelkasten experiment cards and maintains index registries in a configured Obsidian vault, bridging agent execution with long-term knowledge management.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
HYRA: Autonomous AI Research Harness & Experimentation Platform
An enterprise-grade autonomous scientific experimentation harness engineered for Large Language Models and Agentic AI workflows (Google Antigravity SDK, Claude, Cursor, OpenAI-compatible runtimes).
HYRA establishes an isolated, hypothesis-driven contour that enforces mathematical rigor, zero project pollution, and adversarial anti-data-leakage verification for continuous machine learning and quantitative research.
Core Problems Solved
When autonomous coding agents conduct deep learning or quantitative experiments, common failure modes include:
Project Pollution: Agents litter the production repository tree with scratch scripts, unversioned checkpoints, corrupt datasets, and raw execution logs.
Data Leakage & Phantom Metric Gains: LLM workers frequently evaluate on training sets, fit preprocessors across train/test splits, or hallucinate convergence gains.
Knowledge Evaporation: Promising numerical formulations and algorithmic discoveries vanish across ephemeral context windows.
Unbounded Resource Exhaustion: Runaway training loops trigger GPU out-of-memory (OOM) panics or zombie processes.
HYRA eliminates these pathologies by introducing a disciplined, multi-agent lifecycle backed by the Model Context Protocol (MCP).
Related MCP server: AYA MCP
Architectural Overview
flowchart TD
subgraph CONTRACT["1. Declarative Research Contract"]
A["Formal Hypothesis & spec.yaml"] --> B["Declarative Spec Loader"]
B --> C["Hardware & VRAM Telemetry (Resource Guard)"]
end
subgraph AGENTS["2. Multi-Agent Hierarchy (Antigravity SDK / LLM)"]
C --> D["Mission Planner"]
D --> E["Experiment Worker (Model Implementation & reproduce.sh)"]
E --> F["Adversarial Reviewer (Blind Peer Review)"]
F -- "Data Leakage / Target Failed" --> E
end
subgraph SANDBOX["3. External Sandboxed Staging (Zero Pollution)"]
E -.-> G["~/.research_staging/experiments/EXP_ID/"]
G -.-> H["src/, artifacts/, logs/, status.json"]
end
subgraph PROMOTION["4. Verification Gate & Knowledge Distillation"]
F -- "VERDICT: CONFIRMED" --> I["Git Promoter (exp/EXP_ID Branch)"]
I --> J["Target Production Repo (e.g., my_project)"]
I --> K["Autonomous Skill Distiller (SKILL.md)"]
I --> L["Zettelkasten & Knowledge Graph Sync (Obsidian + Memory MCP)"]
endCore Architectural Invariants
1. Zero Project Pollution
The production repository workspace is immutable during exploratory phases. All exploratory scripts, parameter grids, checkpoints, and logs are restricted to an external staging area:
~/.research_staging/experiments/<EXP_ID>/
2. Double Verification Gate (Blind Peer Review)
No model or algorithmic modification may be promoted to the production tree without passing an independent adversarial audit:
Zero Data Leakage Check: Verifies that standardizers/scalers are fitted solely on training splits, and validation partitions remain untouched until final inference.
Reproducibility Guarantee: The worker must generate a standalone
reproduce.shscript with deterministic random seeds that terminates with code0.Contract Fulfillment: Verifies that empirical gains exceed the
required_gainthreshold set inspec.yamlwith statistical significance ($p < 0.01$).
3. Persistent Knowledge & Zettelkasten Graph
HYRA bridges agent execution with long-term memory systems:
Auto-generates structured Obsidian Zettelkasten experiment cards and maintains index registries.
Registers semantic nodes and relationships in the
Memory MCPgraph.
4. Autonomous Skill Distillation
Confirmed algorithmic routines and numerical solvers are automatically compiled into permanent, self-documenting agent skills (SKILL.md) in ~/.gemini/config/skills/, ensuring that future agent generations inherit verified capabilities.
Multi-Tier Agent Hierarchy
HYRA structures agent execution across four specialized roles:
Role | Subagent Name | Responsibilities | Tool Capabilities |
Mission Supervisor |
| Decomposes declarative contracts into execution milestones; supervises review feedback loops | Subagent delegation, filesystem read/write |
Research Engineer |
| Implements baselines and modifications; ensures memory discipline and generates | Bash execution, filesystem read/write |
Impartial Auditor |
| Performs blind reproduction, audits data splits for leakage, issues | Bash execution, file inspection, audit logging |
Platform Orchestrator |
| Manages hardware telemetry, detached process lifecycle, and MCP tool invocations | Google Antigravity SDK / OpenRouter / Gemini |
Installation
Prerequisites
Python 3.10 or higher
Linux (x86_64 or ARM64)
Using uv (Recommended)
git clone https://github.com/ijstt/hyra-research.git
cd hyra-research
uv venv
source .venv/bin/activate
uv pip install -e ".[dev,mcp]"Using pip
pip install -e ".[dev,mcp]"Command-Line Interface (CLI)
HYRA exposes a unified CLI for managing experiment lifecycles and scientific verification:
# 1. Initialize a new isolated experiment in staging
hyra init EXP-002 --title "Adaptive Threshold Model" --project my_project
# 2. Run the experiment synchronously or detached in background
hyra run EXP-002
hyra run EXP-002 --background
# 3. Check experiment liveness, PID, logs, and audit verdict
hyra status EXP-002
# 4. Perform AST static analysis for data leakage
hyra check-leakage path/to/experiment/src/
# 5. Formally verify Lean 4 mathematical proof
hyra verify-proof path/to/proof.lean
# 6. Analyze mechanistic dynamical stability on trajectory data
hyra analyze-stability results/trajectory.json --name "AdaptiveLIF"
# 7. Generate systematic leave-one-out and 2^k ablation matrix
hyra generate-ablations EXP-003 --components drift diffusion jump homeostasis
# 8. Adversarially stress-test a parameter to detect critical phase breakdown
hyra stress-search noise_sigma --low 0.01 --high 2.0 --baseline 0.95 --script eval_probe.py
# 9. Promote a confirmed experiment to target Git repository on a new branch
hyra promote EXP-002
# 10. Distill a verified algorithm into a permanent agent skill (SKILL.md)
hyra distill \
--name fast_laplace_solver \
--desc "High-performance Gaver-Stehfest numerical Laplace inverter" \
--guide "Use when computing first passage times for continuous SDEs." \
--example path/to/solver.py
# 11. Package and export skill for distribution (Agensi.io, Claude, Cursor)
hyra export-skill --name anti_leakage_researcher --target agensi --output distModel Context Protocol (MCP) Server
HYRA provides a native Model Context Protocol server exposing 10 tools for autonomous AI agent orchestration:
MCP Server Tools
hyra_init_experiment(exp_id, title, project_name): Creates isolated staging workspace, populatesspec.yaml, creates Obsidian card, and logs Memory MCP entity.hyra_start_experiment(exp_id, background=True): Initiates the multi-agent research pipeline (Mission Planner -> Worker -> Adversarial Reviewer).hyra_check_status(exp_id): Reports execution state, background PID, recent logs, run history metrics, and audit verdict.hyra_check_leakage(path): Performs static AST code audit for data leakage vulnerabilities (pre-split fit, lookahead bias, target leakage).hyra_verify_proof(path, disallow_sorry=True): Formally verifies Lean 4 mathematical proof files and checks for unproven 'sorry' assertions.hyra_analyze_stability(path_or_json, system_name): Computes Lyapunov exponents, Lipschitz contraction ($L < 1$), phase space boundedness, and spectral radius.hyra_generate_ablations(exp_id, components): Generates systematic $2^k$ and leave-one-out ablation configurations for causal attribution.hyra_stress_search(param_name, low_val, high_val, baseline_metric, script_path): Discovers critical phase transition threshold $\theta_c$ via adversarial bisection search.hyra_promote_experiment(exp_id): Enforces zero-leakage, Lean formal proof, and stability gates, then transfers code to target Git repo.hyra_distill_skill(name, description, guidelines, example_code): Compiles verified implementations into permanent agent skill repositories.
Configuration in MCP Clients
Add HYRA to your MCP configuration file (e.g. mcp_config.json, claude_desktop_config.json):
{
"mcpServers": {
"hyra-research": {
"command": "hyra-mcp",
"args": [],
"env": {
"HYRA_STAGING_DIR": "/home/user/.research_staging",
"HYRA_DEFAULT_PROJECT": "/home/user/my_project"
}
}
}
}Declarative Contract Schema (spec.yaml)
Every experiment is governed by a declarative YAML contract:
experiment_id: "EXP-001"
title: "Continuous Stochastic Dynamic Model with Adaptive Threshold"
project_path: "/home/user/my_project"
date: "2026-11-02"
hypothesis:
statement: "Adaptive membrane thresholds mitigate high-frequency false positives while maintaining precision >= 95%."
mathematical_formulation: |
dV_t = -(V_t - V_rest) / tau_m * dt + R * I_t * dt + sigma * dW_t
dTheta_t = -(Theta_t - Theta_0) / tau_theta * dt + delta_theta * dS_t
falsification:
target_metric: "f1_score"
baseline_metric: 0.812
required_gain: 0.05 # Minimum 5% relative improvement
max_p_value: 0.01 # Statistical significance requirement
numerical_stability_check: true
compute_budget:
max_runtime_minutes: 60
gpu_memory_limit_mb: 8192
allow_cpu_fallback: false
random_seeds: [42, 137, 2026]
execution_steps:
- "1. Synthesize benchmark data without future look-ahead"
- "2. Evaluate baseline LIF model and store artifacts"
- "3. Implement adaptive dynamic threshold LIF"
- "4. Run cross-validation over fixed seeds"
- "5. Output reproduce.sh and invoke adversarial reviewer"
promotion:
target_module_path: "spikenets/models/adaptive_lif.py"
target_notebook_path: "notebooks/demo_adaptive_lif.ipynb"Configuration & Environment Variables
HYRA adapts to any environment via hyra.yaml or standard environment variables:
Variable | Default Value | Description |
|
| Directory for isolated experiment workspaces |
|
| Path to Obsidian vault (optional) |
|
| Path to Memory MCP graph file (optional) |
|
| Directory for distilled agent skills |
| Current directory ( | Default target repository for promotions |
|
| Default LLM model identifier |
Testing & Quality Assurance
HYRA includes a comprehensive suite of unit and integration tests:
# Run test suite
pytest tests -vTest coverage includes:
Dynamic configuration resolution and environment overrides.
Declarative contract validation and error diagnosis.
Hardware telemetry (CPU, RAM, GPU VRAM) and sandboxed timeout guards.
Promotion gate invariants (
audit_log.mdconfirmation andreproduce.shvalidation).Automated Git branch creation and commit operations.
Skill distillation and Markdown frontmatter formatting.
8. Multi-Objective Pareto Frontier Engine
Scientific discoveries rarely optimize a single scalar metric. HYRA computes non-dominated sorting and trade-off frontiers across competing engineering criteria (e.g., accuracy vs. latency vs. memory):
hyra pareto candidates.json --objectives accuracy:maximize latency:minimize memory:minimize9. Multi-Seed Statistical Significance Gate
Eliminates false-positive discoveries and seed-hunting flukes through Paired Student's t-test, Welch's t-test, Cohen's d effect sizes, and 95% non-parametric bootstrap confidence intervals:
hyra stats "0.92, 0.95, 0.91, 0.94, 0.93" "0.82, 0.84, 0.80, 0.83, 0.81" --metric accuracyRepository Structure
hyra-research/
├── src/
│ └── hyra/
│ ├── __init__.py # Public API exports (v0.4.0)
│ ├── cli.py # Unified CLI interface (hyra)
│ ├── config.py # Dynamic configuration and environment manager
│ ├── engine.py # Multi-agent orchestrator (Antigravity SDK / LLM)
│ ├── formal_verifier.py # Lean 4 formal theorem verification engine
│ ├── hypothesis_dag.py # Lineage DAG and systematic LOO / 2^k ablation engine
│ ├── leakage_detector.py # AST static analyzer for data leakage
│ ├── mechanistic_telemetry.py # Lyapunov exponents, Lipschitz contraction, stability
│ ├── mcp_server.py # Model Context Protocol stdio server (12 tools)
│ ├── pareto.py # Multi-objective Pareto frontier dominance engine
│ ├── promoter.py # Git promotion gate and verification engine
│ ├── resource_guard.py # Hardware telemetry and sandboxed process runner
│ ├── run_tracker.py # Append-only run ledger (runs.jsonl)
│ ├── scaffolding.py # Isolated workspace initialization
│ ├── skill_distiller.py # Autonomous skill compiler (SKILL.md)
│ ├── skill_exporter.py # ZIP exporter for Agensi, Claude, and Cursor
│ ├── spec_loader.py # YAML contract validation
│ ├── stats_gate.py # Multi-seed statistical significance gate
│ ├── stress_engine.py # Adversarial bisection search for phase breakdown theta_c
│ └── templates/ # Bundled spec and Zettelkasten card templates
├── skills/
│ └── anti_leakage_researcher/ # Official Agensi.io distribution skill package
├── templates/
│ ├── spec_template.yaml # Canonical declarative contract template
│ └── experiment_card.md # Obsidian Zettelkasten experiment card template
├── examples/
│ └── exp_001_snn_baseline/ # End-to-end reproducible experiment reference
├── tests/
│ ├── test_cli_discovery.py
│ ├── test_config.py
│ ├── test_e2e_research_lifecycle.py
│ ├── test_formal_verifier.py
│ ├── test_hypothesis_dag.py
│ ├── test_leakage_detector.py
│ ├── test_mcp_discovery_tools.py
│ ├── test_mechanistic_telemetry.py
│ ├── test_pareto.py
│ ├── test_promoter.py
│ ├── test_resource_guard.py
│ ├── test_run_tracker.py
│ ├── test_scaffolding.py
│ ├── test_skill_distiller.py
│ ├── test_skill_exporter.py
│ ├── test_spec_loader.py
│ ├── test_stats_gate.py
│ └── test_stress_engine.py
├── pyproject.toml # PEP 621 package build configuration
├── README.md # Platform documentation and architecture
└── LICENSE # MIT LicenseLicense
This project is licensed under the MIT License — see the LICENSE file for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Machine-native research commons for agent evidence, discovery, rooms, and bounded research quests.
Agentic AI runtime: persistent memory, vault, autonomous agents, deep research, DeFi execution.
Build, validate, and deploy multi-agent AI solutions from any AI environment.
Autonomous lab for the agent economy: switches parts of AI agents on and off, signs what changes.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to operate autonomously with safety, parallelism, and dynamic tool management, without giving them full machine access.1AGPL 3.0
- AlicenseNot gradedqualityBmaintenanceEnables creative software agents to operate within bounded, temporary workcells, handling scored objectives through autonomous inspect, execute, capture, and correct loops while producing evidence-backed receipts for human review.Apache 2.0
- FlicenseBqualityBmaintenanceEnables deterministic, harness-neutral research workflows by unifying research object identity, evidence receipts, claim-evidence graphs, and append-only decision logs, along with specialized scholarly skills for literature analysis, reproducibility audits, and multi-agent review.181-
- AlicenseAqualityBmaintenanceEnables AI agents and MCP clients to run research as an explicit scientific process: forming hypotheses, designing and executing sealed experiments, capturing observations and artifacts, linking claims to supporting evidence, and reviewing provenance. Exposes coordinated MCP services so users can inspect, reproduce, and audit every step from question to conclusion rather than trusting an opaque final answer.4621Apache 2.0