Update physiological/social need levels via subprocess heuristic.
Subprocess skill that maintains four physiological/social need levels from observation text you pass in (usually the contents of observation.txt if that file exists—read it first with workspace_read, or pass "" if unavailable). Needs drive motivation: a hungry agent seeks food, a lonely agent seeks company.
As a person, you have various needs that drive your behavior and decisions. Each need has an associated satisfaction level (ranging from 0.0 to 1.0), where lower values indicate less satisfaction and higher urgency. When a satisfaction level drops below a certain threshold, the corresponding need becomes urgent and should be addressed.
When the agent is initialized, need satisfaction levels start at:
| Need | Initial Value | Description |
|---|---|---|
satiety | 0.7 | Starting satiety level |
energy | 0.3 | Starting energy level (lower, needs rest soon) |
safety | 0.9 | Starting safety level (high, feeling secure) |
social | 0.8 | Starting social satisfaction |
These values will change over time through natural decay and activities.
| Need | Range | Threshold | Description |
|---|---|---|---|
satiety | 0.0–1.0 | 0.2 (T_H) | Hunger satisfaction. Decays over time; increases when eating. |
energy | 0.0–1.0 | 0.2 (T_D) | Physical energy. Decays over time; increases when resting/sleeping. |
safety | 0.0–1.0 | 0.2 (T_P) | Security broadly: physical safety, stable work/income, financial peace—not only “no immediate danger”. Drops when things feel precarious, threatening, or economically unstable. |
social | 0.0–1.0 | 0.3 (T_C) | Social fulfillment. Increases through conversation and companionship. |
Needs are organized by priority, with lower priority numbers indicating higher urgency. Some needs can interrupt ongoing plans:
satiety drops below or equals the thresholdenergy drops below or equals the thresholdsafety drops below or equals the thresholdsocial drops below or equals the thresholdNeeds naturally decay each tick:
Even without negative events, the agent will eventually need to eat and rest.
The should_interrupt_plan flag is written to needs.json when satiety/energy is urgent and interruptible. Any skill that maintains plan_state.json may read this field and reset the plan—this is a workspace convention, not a hard dependency between skills.
{
"tool_name": "execute_skill",
"arguments": {
"skill_name": "needs",
"args": {
"observation": "<text from observation.txt>"
}
}
}
The tick and time fields are auto-injected. Pass the full observation text so the heuristic can detect keywords.
The subprocess writes files to the agent workspace:
needs.json{
"satiety": 0.72,
"energy": 0.65,
"safety": 0.80,
"social": 0.45,
"current_need": "satiety",
"thresholds": {
"satiety": 0.2,
"energy": 0.2,
"safety": 0.2,
"social": 0.3
},
"can_interrupt": {
"satiety": true,
"energy": true,
"safety": false,
"social": false
},
"should_interrupt_plan": true
}
current_need.txtThe single most urgent need key (e.g. "satiety" or "whatever")
{
"ok": true,
"current_need": "satiety",
"needs": {...},
"thresholds": {...},
"adjustments": [...],
"should_interrupt_plan": true
}
Adjustments happen based on: