CoolFace
Apppublic

Anjalikumari30/AI_Career_Agent_OpenEnv_Environment

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

AI Career Agent OpenEnv Environment

An OpenEnv-style benchmark for autonomous career agents. The environment models a real job-search workflow: finding relevant jobs, analyzing requirements, tailoring a resume, checking ATS fit, protecting authenticity, networking for referrals, applying selectively, and tracking outcomes.

Why This Environment Exists

Most resume projects stop at text generation. Real candidates need a fuller loop:

  • —search selectively instead of mass applying
  • —adapt resumes without inventing experience
  • —improve ATS match without sounding machine-written
  • —decide whether to apply now, revise more, or skip
  • —network with employees and request referrals
  • —track outcomes and interview probability

This environment turns that workflow into a reproducible benchmarkable task instead of a toy prompt.

Functional Requirements Coverage

1. Real-World Task Simulation

The environment simulates real career-search decisions rather than a game or puzzle. The core loop lives in career_agent_env/env.py, and the live workflow companion app lives in career_agent_env/live_app.py.

2. OpenEnv Specification Compliance

The repo now includes:

  • —typed Pydantic Observation, Action, Reward, and EnvironmentState models in career_agent_env/models.py
  • —reset() -> Observation
  • —step(action) -> (Observation, Reward, Done, Info)
  • —state() -> EnvironmentState
  • —an openenv.yaml metadata file at the repo root
  • —a FastAPI OpenEnv-compatible server at server/app.py

Validation command:

bash
python -m openenv.cli validate . --verbose

3. Minimum of Three Tasks with Agent Graders

The environment provides three tasks with increasing difficulty and deterministic graders in career_agent_env/tasks.py.

4. Meaningful Reward Function

The reward model gives incremental feedback during the trajectory. It rewards ATS/authenticity improvement and useful actions, while penalizing spammy loops, low-quality submissions, and other undesirable behavior.

5. Baseline Inference Script

The baseline runner is scripts/run_baseline.py.

  • —If OPENAI_API_KEY is set, it uses the OpenAI planner in career_agent_env/openai_policy.py
  • —If HF_TOKEN is set, it uses the same OpenAI-compatible client against the Hugging Face router
  • —Otherwise it falls back to the deterministic heuristic policy in career_agent_env/policies.py

OpenEnv Runtime

Metadata

The OpenEnv metadata file is openenv.yaml:

yaml
spec_version: 1
name: career_agent_env
type: space
runtime: fastapi
app: server.app:app
port: 8000

HTTP Endpoints

The FastAPI server exposes:

  • —GET /health
  • —GET /metadata
  • —POST /reset
  • —POST /step
  • —GET /state
  • —GET /docs
  • —GET /web

Run locally:

bash
uvicorn server.app:app --host 0.0.0.0 --port 8000

Observation Space

The Observation model includes:

  • —candidate profile
  • —current resume version
  • —available job listings
  • —active job id
  • —current job analysis
  • —ATS score
  • —authenticity score
  • —networking status
  • —application history
  • —interview probability estimate
  • —remaining steps
  • —applications remaining

Action Space

Supported actions:

  • —SEARCH_JOBS
  • —ANALYZE_JOB
  • —MODIFY_RESUME
  • —ADD_KEYWORDS
  • —REMOVE_KEYWORDS
  • —PERSONALIZE_RESUME
  • —GENERATE_COVER_LETTER
  • —CHECK_ATS_SCORE
  • —APPLY_JOB
  • —CONNECT_EMPLOYEE
  • —REQUEST_REFERRAL
  • —WAIT_FEEDBACK
  • —SKIP_JOB

Reward Model

The typed Reward model returns:

  • —value: scalar reward in [0.0, 1.0]
  • —components: ATS improvement, authenticity improvement, bonus, and penalty

The main reward logic lives in career_agent_env/env.py.

Tasks and Difficulty Levels

1. smart_application (easy)

Apply once with ATS above threshold while keeping authenticity above the required floor.

2. strategic_campaign (medium)

Earn at least one interview with a limited number of applications.

3. career_optimization (hard)

Maximize interview rate across multiple companies while preserving authenticity.

Each task is scored by a deterministic grader returning a value from 0.0 to 1.0.

Data and Market Model

The environment uses dataset/Resume/Resume.csv to train a market model that powers:

  • —category prediction
  • —skill extraction
  • —candidate profile construction
  • —synthetic job generation
  • —ATS alignment estimates

The training code lives in career_agent_env/dataset.py.

Live Workflow Companion App

The repo also includes a separate Streamlit app for a more human-facing workflow:

bash
streamlit run career_agent_env/live_app.py

It can:

  • —upload a real resume
  • —infer a domain from the uploaded resume
  • —fetch jobs from public Greenhouse and Lever boards
  • —tailor resume and cover-letter drafts
  • —score ATS and authenticity
  • —export a tracker and application bundle

Setup

bash
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt

Environment variables:

bash
OPENAI_API_KEY=
OPENAI_BASE_URL=
OPENAI_MODEL=gpt-4.1-mini
HF_TOKEN=
HF_OPENAI_BASE_URL=https://router.huggingface.co/v1

Usage

Run the OpenEnv API Server

bash
uvicorn server.app:app --host 0.0.0.0 --port 8000

Run the Baseline

bash
python scripts/run_baseline.py

Train the RL Policy

bash
python scripts/train_rl_agent.py

Run Tests

bash
python -m unittest tests/test_env.py tests/test_live_workflow.py tests/test_server.py tests/test_openai_policy.py

Run the Dashboard

bash
streamlit run career_agent_env/dashboard.py

Verified Baseline Performance

Verified locally on April 8, 2026 with the default seed (7) and heuristic fallback policy:

TaskScoreSuccess
smart_application0.9976true
strategic_campaign0.6989true
career_optimization0.6469false

Aggregate baseline:

  • —average_task_score: 0.7811
  • —success_rate: 0.6667
  • —policy: heuristic_fallback
  • —seed: 7

Containerized Execution

Build and run the Docker image:

bash
docker build -t career-agent-openenv .
docker run -p 8000:8000 career-agent-openenv

The container starts the FastAPI OpenEnv server and serves the lightweight web page at http://localhost:8000/web.

Hugging Face Spaces Readiness

This repository is prepared for a Docker-based Hugging Face Space:

  • —Docker metadata is defined in the README front matter
  • —the repo is tagged with openenv
  • —the container entrypoint is the FastAPI server
  • —the public web surface is served at /web

Repository Map

  • —career_agent_env/env.py: environment loop
  • —career_agent_env/models.py: typed models
  • —career_agent_env/tasks.py: task registry and graders
  • —career_agent_env/scoring.py: ATS and authenticity scoring
  • —career_agent_env/dataset.py: dataset-backed market model
  • —career_agent_env/policies.py: heuristic policy
  • —career_agent_env/openai_policy.py: OpenAI planner
  • —career_agent_env/live_workflow.py: live workflow orchestration
  • —career_agent_env/live_app.py: Streamlit companion app
  • —career_agent_env/dashboard.py: tracking dashboard
  • —server/app.py: FastAPI OpenEnv server
  • —scripts/run_baseline.py: baseline benchmark
  • —scripts/train_rl_agent.py: RL trainer
  • —openenv.yaml: OpenEnv metadata

Team

  • —f-kansal-06
  • —MikeanOP
  • —Anjalikumari990