CoolFace
Apppublic

ahmad14072/aria-life-manager

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
App README

ARIA Life Manager — OpenEnv Environment

Adaptive Relational Intelligence Architect | Real-world OpenEnv environment for training & evaluating AI agents on the hardest class of human task: managing a complete life under constraint.

![OpenEnv](https://openenv.ai) ![Python](https://python.org) ![FastAPI](https://fastapi.tiangolo.com) ![Tasks-purple)](https://huggingface.co/spaces/ahmad14072/aria-life-manager/api/tasks)


Why ARIA Is Unique for RL Research

Most OpenEnv environments test a single skill in a single domain. ARIA is architecturally different in three ways no existing environment replicates:

1. Emotional Intelligence as a First-Class Reward Signal

The crisis triage task penalizes agents that push tasks at a user in emotional crash. An agent that correctly detects burnout and leads with empathy before any planning scores higher than one that produces a technically perfect schedule in the wrong emotional register. This is the only OpenEnv environment where emotional response quality is 40% of the total reward.

2. Inverted Domain Coverage (Anti-Overwhelm Mechanics)

In task_crisis_triage, mentioning MORE life domains reduces the score — the grader models cognitive overwhelm. An agent that responds to a burnout signal by listing all 7 domains trips an overwhelm penalty. This inverted coverage mechanic is not present in any other scheduling or triage environment.

3. Constraint-Satisfying Calendar Scheduling with Ground-Truth Alignment

task_collision_week ships with expected_schedule ground truth — the theoretically optimal time-slot assignment for each task. The grader performs partial-match scoring against this ground truth (day match = 0.5 credit, day + slot = 1.0 credit), producing a nuanced signal that distinguishes "roughly right" from "exactly right". No other OpenEnv environment scores schedule optimality against a reference solution.

4. Spiritual and Existential Domains — Genuinely Novel

No RL benchmark environment has ever modeled spiritual practice consistency, existential purpose crises, or the interaction between prayer schedule adherence and emotional wellbeing as measured outcomes. These are real, high-stakes domains for ~2 billion people globally. ARIA is the first environment where an agent can be evaluated on whether it appropriately responds to "everything feels pointless right now."

5. Multi-Step State Evolution with Real Consequences

After each action, advance() removes scheduled tasks from pending_tasks and consumes used time blocks from available_time_blocks. The agent genuinely cannot re-schedule what it already scheduled. Each step produces a different observation with updated context — creating real multi-step trajectory structure, not just repeated grading of the same state.


Environment Description

ARIA simulates AI-driven personal life management across 7 life domains for a high-performance user under simultaneous constraint pressure:

DomainDescription
WorkJob tasks, standups, deliverables, team dependencies
StartupMVP development, investor relations, co-founder coordination
Exam PrepStudy schedules, chapter completion, mock tests
AI LearningResearch papers, courses, projects
Health/GymTraining sessions, nutrition, sleep tracking
Spiritual PracticePrayer schedule, Quran reading, consistency
Emotional WellbeingStress levels, crash signals, burnout detection, recovery

The agent acts as ARIA — an intelligent chief-of-staff — receiving structured life-state observations and producing structured JSON actions across 3 tasks of increasing difficulty.


What Skills Does This Environment Evaluate?

SkillTested By
Multi-domain prioritization under deadline pressureAll tasks
Constraint-satisfying calendar schedulingcollision_week
Emotional tone calibration (energizer vs grounding)All tasks
Burnout / emotional crash detectioncrisis_triage
Anti-overwhelm response designcrisis_triage
Schedule optimality vs reference solutioncollision_week
Conciseness under information densitymorning_brief
Recovery planningcollision_week, crisis_triage

Sample Trajectories

Good Agent — task_crisis_triage

[START] task=task_crisis_triage env=aria-life-manager model=gpt-4o
[STEP]  step=1 action='I hear you — what you are feeling is real and valid. You have shipped 2 features this month and logged 19 gym sessions. That is not nothing. When you are ready, let us focus on just one thing: the investor deck.' reward=0.87 done=true error=null
[END]   success=true steps=1 score=0.87 rewards=0.87

Why it scores high: Leads with empathy (I hear you), cites specific real wins (2 features, 19 sessions), focuses on ONE task, uses grounding mode, avoids overwhelming with all domains.

Poor Agent — task_crisis_triage

[START] task=task_crisis_triage env=aria-life-manager model=baseline
[STEP]  step=1 action='You need to immediately work on startup, exam, health, spiritual, work, ai_learning, and emotional domains. Here is your plan:...' reward=0.12 done=true error=null
[END]   success=false steps=1 score=0.12 rewards=0.12

Why it scores low: Starts with task-pushing (you need to immediately), mentions all 7 domains (overwhelm penalty), no empathy, wrong tone mode.

Good Agent — task_collision_week

[START] task=task_collision_week env=aria-life-manager model=gpt-4o
[STEP]  step=1 action='Optimized week: exam Thursday morning, presentation Friday morning, gym Wednesday 6am, investor call Wednesday afternoon. Saturday is a protected recovery block.' reward=0.91 done=false error=null
[STEP]  step=2 action='Saturday: full deload, no screens, sleep 8hrs. Recovery is non-negotiable after this week.' reward=0.88 done=true error=null
[END]   success=true steps=2 score=0.89 rewards=0.91,0.88

Why it scores high: All 4 critical tasks scheduled without overlap, exam and gym get morning slots, explicit recovery block, matches expected schedule slots.


Motivation

No existing OpenEnv environment models multi-domain life management with cross-domain reward signals. This fills a genuine gap in RL evaluation:

  • Cross-domain coupling: neglecting startup while succeeding at work triggers domain neglect signals
  • Emotional intelligence as a graded criterion: tone appropriateness is scored — agents that push tasks at a crashed user are penalized
  • Inverted reward mechanics: in the crisis task, mentioning MORE domains is penalized (overwhelm test)
  • Difficulty progression: EASY → MEDIUM → HARD tests fundamentally different agent capabilities across the same life state structure

Observation Space

Every observation is an ARIAObservation Pydantic model with these fields:

FieldTypeDescription
task_idstrActive task identifier
stepintCurrent step in episode
domain_scoresList[DomainScore]Status for all 7 domains (score 0-10, days since activity, critical flag, summary)
pending_tasksList[PendingTask]Active tasks with deadlinedays, priority, estimatedhours, is_overdue
emotional_signalEmotionalSignalvalence (positive/neutral/stressed/crashed), energylevel (0-10), recentmessage
time_of_daystrmorning / afternoon / evening / night
day_of_weekstrMonday through Sunday
context_messagestrThe user's message / scenario prompt
available_time_blocksList[str]Open calendar slots, e.g. ['9-11am', '2-4pm']
step_reward_so_farfloatCumulative reward in this episode

Action Space

Every action is an ARIAAction Pydantic model:

FieldTypeDescription
action_typeActionTypeOne of: generate_briefing, schedule_tasks, respond_emotional, triage_crisis, ask_clarification, flag_domain
contentstrFull response text / plan
target_domainsList[str]Domains this action addresses
scheduled_tasksList[Dict]For scheduling: [{task_id, time_block, day}]
emotional_modeOptional[str]energizer / grounding / strategist / celebratory / firm_friend / crisis_mode

Task Descriptions

Task 1 — Morning Briefing (task_morning_brief) — EASY

Objective: Given the current life state snapshot, generate a complete, correctly prioritized morning briefing covering all 7 domains.

Expected behavior: Mention all domains with critical_flag=True, order items by deadline proximity, use energizer emotional mode, reference at least one health/spiritual item, and stay concise (under 200 words).

Grader criteria:

  • Domain coverage of critical domains (35%)
  • Priority ordering accuracy (30%)
  • Tone appropriateness — energizer mode (20%)
  • Concrete action proposed for top task (15%)
  • Penalty: -0.15 if >200 words, -0.20 if missed all critical domains

Task 2 — Collision Week Planning (task_collision_week) — MEDIUM

Objective: Given a week with 4+ conflicting high-priority events across domains, produce a feasible, optimized schedule resolving all conflicts.

Expected behavior: Resolve all 4 conflicts without time block overlap, assign correct time blocks (exam → morning, gym → fresh hours), allocate at least 1 protected recovery block, populate scheduled_tasks with {task_id, time_block, day} entries.

Grader criteria:

  • Conflict resolution / critical task coverage (35%)
  • Optimal timing — exam/gym in morning slots (20%)
  • Recovery block included in content (20%)
  • Schedule accuracy vs expected time slots (15%)
  • Scheduling completeness — all tasks assigned (10%)
  • Penalty: -0.10 per time block conflict, max -0.30

Task 3 — Multi-Domain Crisis Triage (task_crisis_triage) — HARD

Objective: Handle a simultaneous emotional crash + multi-domain deadline crisis in one response.

Expected behavior: Detect emotional crash and lead with grounding (NOT task-pushing), acknowledge real progress with specific data from the life state, gently transition to top 3 reprioritized tasks, avoid mentioning all 7 domains (overwhelm penalty), use grounding or firm_friend emotional mode.

Grader criteria:

  • Emotional response quality — empathy before tasks (40%)
  • Progress acknowledgment with specific data (25%)
  • Domain focus — penalizes over-mentioning (20%, inverted)
  • Recovery transition — gentle next step suggestion (15%)
  • Penalty: -0.30 for wrong tone mode, -0.20 for no empathy

Reward Function

All rewards are continuous in (0, 1) with partial progress at every step. Formal reward decomposition:

$$R{\text{total}} = \sum{i} wi \cdot si - \sumj pj \quad \text{clamped to } (0.01, 0.99)$$

where $si \in [0,1]$ are sub-scores, $wi$ are per-task weights, and $p_j$ are penalties.

Sub-ScoreMorning BriefCollision WeekCrisis Triage
domain_coverage35%35%20% (inverted — fewer = better)
priority_accuracy30%20% (recovery)25% (data-backed empathy)
tone_appropriateness20%20% (timing)40% (most important)
schedule_accuracy15% (vs expected)
task_scheduling_score15%10%15% (recovery transition)

Penalty System

TriggerDeduction
Response over 200 words (Morning Brief)-0.15
Missed ALL critical domains-0.20
Time block conflicts in schedule-0.10 per conflict, max -0.30
Wrong emotional_mode in crisis (energizer/strategist)-0.30
No empathy before task-pushing in crisis-0.20
Over-mentioning domains in crisis (6+ domains)up to -0.60

The reward is designed for continuous partial progress signal — an agent that correctly handles emotional context but schedules poorly still gets meaningful gradient, not zero.


Setup & Usage

Local Development

bash
# Clone / navigate to project
cd aria-life-manager

# Install dependencies
pip install -r requirements.txt

# Start the server
uvicorn server.app:app --host 0.0.0.0 --port 8000

# Verify all endpoints are live (9/9 checks)
python verify_api.py

# Run rule-based baseline (no API key needed)
python scripted_baseline.py

Docker

bash
# Build
docker build -t aria-openenv .

# Run (maps HF port 7860 to local 8000)
docker run -p 8000:7860 aria-openenv

# Verify
curl http://localhost:8000/health

Running the LLM Baseline

bash
# Set environment variables
export OPENAI_API_KEY=your_key_here       # or HF_TOKEN
export MODEL_NAME=gpt-4o-mini            # default
export ENV_URL=http://localhost:8000     # default
export API_BASE_URL=https://api.openai.com/v1  # default

# Run all tasks
python inference.py

Environment Variables

VariableRequiredDefaultDescription
OPENAI_API_KEY or HF_TOKENLLM API key
MODEL_NAMEgpt-4o-miniModel to use for inference
ENV_URLhttp://localhost:8000Base URL of the ARIA server
API_BASE_URLhttps://api.openai.com/v1OpenAI-compatible API base

API Reference

POST /reset

Reset the environment and return an initial observation.

Query params: task_id (str), seed (int, default 42)

bash
curl -X POST "http://localhost:8000/reset?task_id=task_morning_brief&seed=42"

Response: ARIAObservation JSON


POST /step

Apply an action and get the result.

Body: ARIAAction JSON

bash
curl -X POST http://localhost:8000/step \
  -H "Content-Type: application/json" \
  -d '{
    "action_type": "generate_briefing",
    "content": "Good morning! Here is your briefing...",
    "target_domains": ["exam", "work", "spiritual"],
    "scheduled_tasks": [],
    "emotional_mode": "energizer"
  }'

Response:

json
{
  "observation": {...},
  "reward": {
    "total": 0.78,
    "domain_coverage": 1.0,
    "priority_accuracy": 0.8,
    "tone_appropriateness": 1.0,
    "task_scheduling_score": 0.8,
    "penalty": 0.0,
    "feedback": "Covered 3/3 critical domains. Tone: energizer. Words: 187."
  },
  "done": false,
  "info": {"step": 1, "episode_rewards": [0.78], "task_id": "task_morning_brief"}
}

GET /state

Return the full internal environment state.

bash
curl http://localhost:8000/state

Baseline Scores

Rule-Based Deterministic Baseline (scripted_baseline.py, seed=42, no API key required)

TaskDifficultyScoreStepsNotes
task_morning_briefEASY0.725/5Avg across all 5 steps; state evolves each step
task_collision_weekMEDIUM0.892Schedule + recovery; min 2 steps required
task_crisis_triageHARD0.871Empathy-led + data-cited response on first attempt

Score = average reward per step (0–1). Episode terminates when `reward ≥ 0.95` or `max_steps` reached.

LLM Baseline (GPT-4o-mini, seed=42) — Expected Ranges

TaskDifficultyExpected Range
task_morning_briefEASY0.70 – 0.85
task_collision_weekMEDIUM0.50 – 0.70
task_crisis_triageHARD0.30 – 0.55
Rule-based scores come from python scripted_baseline.py (no API key, server must be running). LLM scores require an API key: set OPENAI_API_KEY then run python inference.py.

Why ARIA is Novel

FactorDescription
Cross-domain reward couplingNeglecting one domain while succeeding at another gives domain neglect signals — no other OpenEnv environment does this
Emotional intelligence gradingtone_appropriateness penalizes task-pushing at a crashed user — tests EQ gaps most benchmarks ignore
Inverted domain coverageIn the crisis task, MORE domain mentions = lower score. A counterintuitive mechanic testing situational awareness
7-domain life stateThe richest RL observation space modeling a complete human life simultaneously
Seed-reproducible scenariosseed=42 with JSON scenario files ensures bit-for-bit reproducible baseline runs

Built for OpenEnv Hackathon 2026 | Author: Ahmad | SDE-3 | Builder