DEV Community

Aastha Yadav
Aastha Yadav

Posted on

StudentOS Opportunity Intelligence: A Sanity-Powered AI Agent for Opportunity Readiness

Sanity Challenge Path One Submission

This is a submission for the Sanity Challenge, Path One: Ship an Agent That Queries Real Content

What I Built

StudentOS Opportunity Intelligence is an AI-powered opportunity readiness agent built into StudentOS.

Instead of simply showing students a list of internships, hackathons, fellowships, and developer programs, StudentOS answers a more useful question:

“Am I actually ready for this opportunity?”

The system combines two types of context:

  • Private student context — skills, education, goals, applications, and progress.
  • Structured Sanity knowledge — opportunities, organizations, eligibility rules, required skills, application processes, documents, resources, and source provenance.

StudentOS then evaluates the student's deterministic eligibility and skill fit, identifies gaps, and uses grounded AI to answer opportunity-specific questions.

For example, a student can select an opportunity and ask:

  • Am I actually ready for this?
  • What documents do I need?
  • What skills am I missing?
  • How can I prepare over the next 2 weeks?

The result is an actionable path from opportunity discovery → eligibility → skill gaps → preparation → application.

Demo

Live Project: https://studentos-ai-phi.vercel.app/app

Demo Video: https://youtu.be/jMnrf-GSKoA

The demo focuses on the Opportunity Intelligence flow:

  1. Select an opportunity.
  2. Retrieve its structured knowledge from Sanity.
  3. Calculate deterministic student-opportunity fit.
  4. Show eligibility and skill gaps.
  5. Surface the application workflow, documents, and resources.
  6. Ask the grounded Opportunity Intelligence Agent follow-up questions.
  7. Switch between opportunities and verify that the agent uses the newly selected opportunity's context.

Code

GitHub Repository: https://github.com/aastha-yadav2/studentos-ai

The repository contains the StudentOS application, Opportunity Intelligence implementation, Sanity integration, AI Router integration, fallback handling, and validation logic.

How I Used Sanity

Sanity acts as the structured knowledge layer behind StudentOS Opportunity Intelligence.

I modeled opportunity knowledge as connected structured content rather than keeping application information in a single unstructured prompt.

The Sanity dataset contains structured records for:

  • Opportunities
  • Organizations
  • Skills
  • Eligibility Rules
  • Application Processes
  • Resources
  • Sources / provenance

An opportunity is connected to its organization, eligibility rules, required skills, application process, resources, and source information.

StudentOS retrieves the selected opportunity's knowledge graph and combines it with the student's private context.

The deterministic matching layer calculates the student's fit using the existing 50/30/20 scoring model, while deterministic eligibility remains authoritative.

The AI layer is then grounded in the selected opportunity's resolved Sanity context.

This distinction is important: Sanity provides the opportunity knowledge; StudentOS provides the student context; the agent combines both to produce actionable readiness guidance.

I also added defensive identity validation and opportunity-specific fallbacks so that information from one opportunity cannot silently appear while another opportunity is selected.

For example, switching from Hack2Skill to Google Summer of Code changes the complete opportunity context used by the agent, including eligibility, skills, documents, application workflow, resources, and Q&A.

The Q&A layer also classifies questions into intents such as:

  • Readiness
  • Documents
  • Skills
  • Two-week preparation
  • General opportunity questions

This allows the agent to provide different, grounded answers rather than returning the same generic response for every question.

Sanity Project Details

Sanity Project ID: p2hu7iqp

Dataset: production

The live Sanity project contains the structured opportunity knowledge used by StudentOS Opportunity Intelligence.

The project currently contains the opportunity knowledge graph and its related organizations, eligibility rules, skills, application processes, resources, and source records.

Agent Session

The project was developed iteratively using Google Antigravity as the AI-native development environment.

Antigravity was used throughout the build to implement, debug, test, and refine the StudentOS Opportunity Intelligence experience, including the Sanity integration, structured opportunity knowledge graph, deterministic matching, grounded Q&A, opportunity isolation, and fallback handling.

An Agent Session transcript is not included because the development session was conducted in Antigravity rather than one of the session sources currently supported by the DEV Agent Sessions uploader.

The final implementation specifically includes:

  • Sanity-backed opportunity retrieval
  • Structured opportunity relationships
  • Deterministic eligibility and matching
  • Grounded AI reasoning
  • Opportunity identity validation
  • Opportunity-specific fallback handling
  • Q&A intent classification
  • Anti-cross-opportunity response validation
  • Opportunity switching isolation
  • Automated Q&A tests

Why Structured Content Matters

The core of this project is not simply asking an LLM about opportunities.

The opportunity information is modeled as structured, connected knowledge.

That allows StudentOS to reason over specific relationships such as:

Opportunity → Organization → Eligibility → Skills → Application Process → Documents → Resources → Source

The agent can therefore answer questions using the selected opportunity's actual structured context instead of relying on a generic prompt or a flat keyword search.

StudentOS turns that structured knowledge into something directly useful to a student:

Discover the opportunity. Understand your fit. Identify the gaps. Prepare. Apply.

Top comments (0)