home / skills / bdambrosio / cognitive_workbench / scienceworld-act
This skill executes a ScienceWorld action in the active session and returns observation, reward, and completion status.
npx playbooks add skill bdambrosio/cognitive_workbench --skill scienceworld-actReview the files below or copy the command above to add this skill to your agents.
---
name: scienceworld-act
type: python
description: "Take a ScienceWorld action in the active session. Returns observation, reward, done. No session_id needed - uses active session from executive_node."
schema_hint:
action: "string (text command)"
out: "$variable"
examples:
- '{"type":"scienceworld-act","action":"look","out":"$step1"}'
---
# ScienceWorld Act (Level 4)
## Input
- `action`: text command (e.g., "look", "go north", "take shovel")
- No `session_id` needed - uses active session from executive_node.scienceworld_env
## Output
- Note ID (bound to `out` variable) containing:
- `text`: observation after the action
- `metadata.reward`, `metadata.done`
- `metadata.session_id`, `metadata.action`, `metadata.info`
## Workflow
```json
{"type":"scienceworld-reset","out":"$sw"}
{"type":"scienceworld-act","action":"look","out":"$o1"}
{"type":"scienceworld-act","action":"take watering can","out":"$o2"}
```
This skill runs a single action inside the active ScienceWorld session and returns the resulting observation, reward, and done flag. It uses the executive node's active ScienceWorld environment, so you do not need to provide a session_id. The skill is designed for rapid iterative interaction with the environment during policy evaluation or scripted play.
You call the skill with a text command like "look", "go north", or "take watering can". The skill sends the command to the active scienceworld_env and returns a note containing the observation text plus metadata fields: reward, done, session_id, action, and info. Outputs are bound to the specified out variable so downstream steps can reference the observation and metadata.
Do I need to pass a session_id?
No. The skill uses the executive node's active ScienceWorld session automatically.
What metadata is returned?
The note includes metadata.reward, metadata.done, metadata.session_id, metadata.action, and metadata.info alongside the observation text.