Skip to content

box-community/box-langchain-skills-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Employee Onboarding Readiness Agent

LangChain Skills × Box AI — HR Onboarding Demo

Demo only — not production-ready. This repository is sample code for learning and experimentation. It is not audited for security, compliance, reliability, or scale, and it is not intended for real HR decisions, regulated data, or deployment as-is in a production environment.


What this does

You ask one onboarding question. The agent resolves the employee packet in Box, then progressively loads three specialized skills:

"Sarah Chen starts next week. Is she ready for day one?"
         ↓
  load_employee_profile("Sarah Chen")
         ↓
  load_skill("policy_briefing")   → HR packet, handbook, IT checklist, welcome note
  load_skill("role_ramp_planner") → department-specific onboarding plan
  load_skill("resource_readiness")→ setup guides and team resources
         ↓
  Final brief: paperwork status · week 1/2 ramp · tooling blockers · next action

This follows the same Box + LangChain Skills pattern as the earlier demo, but for a different workflow: manager-ready onboarding preparation.


Box folders used

skills.py uses dummy placeholder IDs for illustration only (fictional employees and example paths). Replace each YOUR_*_FOLDER_ID value with real folder IDs from your Box tenant before running the agent.

Example layout (names are illustrative, not tied to a real org):

  • ONBOARDING_ROOT_FOLDER_IDYOUR_ONBOARDING_ROOT_FOLDER_ID (e.g. Example Co / HR / Onboarding)
  • SHARED_TEMPLATE_FOLDER_IDYOUR_SHARED_TEMPLATES_FOLDER_ID (e.g. ... / Onboarding / _Templates)

Employee packets (same file — swap in your packet and resources folder IDs):

  • Sarah ChenYOUR_SARAH_CHEN_PACKET_FOLDER_ID, resources YOUR_SARAH_CHEN_RESOURCES_FOLDER_ID
  • Marcus RiveraYOUR_MARCUS_RIVERA_PACKET_FOLDER_ID, resources YOUR_MARCUS_RIVERA_RESOURCES_FOLDER_ID
  • Jordan LeeYOUR_JORDAN_LEE_PACKET_FOLDER_ID, resources YOUR_JORDAN_LEE_RESOURCES_FOLDER_ID

Report uploads use YOUR_REPORT_OUTPUT_FOLDER_ID in skills.py when you enable uploads.


Supported use case

The agent expects onboarding-style content in Box behind the folder IDs you configure (handbook, plans, resource guides, and so on). For a quick demo, mirror a layout like:

  • common HR docs: handbook, NDA, IT checklist, welcome note
  • employee-specific folder packets
  • department plans: Engineering_Onboarding_Plan.md Marketing_Onboarding_Plan.md Sales_Onboarding_Plan.md
  • department resource guides: engineering setup and GitHub access marketing brand and calendar templates sales CRM and playbook docs

Prerequisites

  • Python 3.9+
  • A Box Custom App using User Authentication (OAuth 2.0) with a developer token for local runs
  • An Anthropic API key

Install dependencies:

python3 -m venv .venv
source .venv/bin/activate
pip3 install -r requirements.txt

Set secrets:

cp .env.example .env

Then populate:

  • BOX_DEVELOPER_TOKEN
  • ANTHROPIC_API_KEY

.env is only for secrets. Folder IDs are configured in skills.py.


Run it

python3 agent.py

Or pass a question directly:

python3 agent.py -q "Marcus Rivera starts Monday. Summarize his HR packet, first two weeks ramp, marketing resources, and any day-one blockers."

If stdin is not a TTY and you do not pass -q, the built-in Sarah Chen demo question runs automatically.


Skill flow

The system prompt forces progressive loading:

  1. load_employee_profile() identifies the employee folder and resources folder.
  2. load_skill("policy_briefing") reviews shared HR materials plus the employee packet.
  3. search_employee_box(employee_name, skill_name, query) enforces the permitted Box scope for that employee and skill.
  4. load_skill("role_ramp_planner") focuses on the department ramp plan.
  5. load_skill("resource_readiness") checks the resources folder for access and setup needs.

This keeps context narrow and makes the routing decisions visible in the run log.

Permission model

The agent is now designed to follow least-privilege defaults:

  • it only searches the selected employee's folder, that employee's own department resources, and the shared HR templates folder when needed
  • it cannot send arbitrary Box files to Box AI; files must first come from the approved employee-scoped search
  • it treats offer letters and NDAs as sensitive and reports status only, not confidential details
  • if asked for another employee's information or anything outside onboarding need-to-know, it should refuse that portion and stay within scope

File structure

box-langchain-agent/
├── agent.py
├── box_tools.py
├── console_ui.py
├── skills.py
├── requirements.txt
├── .env.example
└── README.md

Example prompts

  1. Sarah Chen starts next week. Build a manager-ready onboarding brief with her core HR docs, first two weeks ramp plan, required engineering setup resources, and the single most important thing I need to do before day one.
  2. Is Marcus Rivera missing anything important in his onboarding packet, and what should his first two weeks in Marketing look like?
  3. Jordan Lee is joining Sales. What documents and resources are already in Box, what systems need to be ready, and what should I schedule before his first day?
  4. Only focus on Sarah Chen's engineering readiness. What setup guides and access dependencies could block her from being productive on day one?

About

Example of an Employee Onboarding Readiness Agent leveraging LangChain skills

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages