Implementation:AIScientists Dev WorldSeed propose hypothesis handle
| 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:
- Validates that `claim` and `rationale` are provided (required)
- Validates `builds_on` if provided — must be a valid paper_id, otherwise silently dropped with a warning
- Generates a per-agent hypothesis ID (`hyp_001`, `hyp_002`, ...)
- Appends the new hypothesis to `agent.data["hypotheses"]` with status "proposed"
- 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
- Environment:AIScientists_Dev_WorldSeed_Python_3_11_Engine
- Environment:AIScientists_Dev_WorldSeed_Autoresearch_Agent_Runtime