czty's picture
Add files using upload-large-folder tool
96e6518 verified
Raw
History Blame Contribute Delete
1.17 kB
from __future__ import annotations
from dataclasses import dataclass, field
from pathlib import Path
from typing import Literal
ResourceKind = Literal["tool", "software", "database", "protocol", "knowledge"]
@dataclass(slots=True)
class Resource:
"""A searchable resource available to the agent."""
name: str
kind: ResourceKind
description: str
command_hint: str | None = None
tags: tuple[str, ...] = ()
@dataclass(slots=True)
class TaskSpec:
"""Normalized task input for a Biomni-ReAct run."""
name: str
objective: str
workspace: Path
expected_outputs: list[Path] = field(default_factory=list)
constraints: list[str] = field(default_factory=list)
metadata: dict[str, str] = field(default_factory=dict)
@dataclass(slots=True)
class ReActStep:
iteration: int
thought: str
action_type: str | None = None
action: str | None = None
observation: str | None = None
@dataclass(slots=True)
class RunResult:
task_name: str
success: bool
final_answer: str
steps: list[ReActStep]
selected_resources: list[Resource]
artifact_paths: dict[str, Path]
error: str | None = None