Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:AIScientists Dev WorldSeed propose hypothesis handle

From Leeroopedia
Knowledge Sources
Domains Research_Automation, Knowledge_Management
Last Updated 2026-10-26 18:00 GMT

Overview

Concrete DSL effect handler for the `propose_hypothesis` action that stores private research hypotheses on an agent's entity with per-agent IDs, optional builds_on lineage, and admin-scoped confirmation.

Description

The handle function in `handlers/propose_hypothesis.py` processes the `propose_hypothesis` action. It:

  1. Validates that `claim` and `rationale` are provided (required)
  2. Validates `builds_on` if provided — must be a valid paper_id, otherwise silently dropped with a warning
  3. Generates a per-agent hypothesis ID (`hyp_001`, `hyp_002`, ...)
  4. Appends the new hypothesis to `agent.data["hypotheses"]` with status "proposed"
  5. Emits an admin-scoped event for the owner's wake confirmation

Hypotheses are private — the `hypotheses` property is in the perception `hidden_properties` list, so other agents cannot see them. They become public only when the owner publishes a paper bound to the hypothesis.

Usage

This is a DSL effect handler, invoked by the engine when an agent calls the `propose_hypothesis` action. Not called directly.

Code Reference

Source Location

  • Repository: WorldSeed
  • File: src/worldseed/autoresearch/handlers/propose_hypothesis.py

Signature

def handle(
    store: StateStore,
    event_log: EventLog,
    ctx: dict[str, Any],
    tick: int,
) -> None:
    """Handle the propose_hypothesis action."""

Import

from worldseed.autoresearch.handlers.propose_hypothesis import handle

Usage Examples

# This handler is invoked by the engine's DSL effect system
# when an agent calls the "propose_hypothesis" action:
#
# agent calls: propose_hypothesis(claim="SwiGLU improves val_loss",
#                                  rationale="Better gradient flow",
#                                  builds_on="paper_004")
#
# Engine dispatches to handle(store, event_log, ctx, tick)
# → hypothesis stored privately on agent.data["hypotheses"]

Related Pages

Implements Principle

Requires Environment

Uses Heuristic

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment