← CookbookView source on GitHub ↗

Universal Deep Research (Nebius Token Factory) — Agent

This agent demonstrates a multi‑step research pipeline powered by Nebius Token Factory models (OpenAI‑compatible) with a FastAPI backend and a Next.js frontend. It uses the model moonshotai/Kimi-K2-Instruct by default.

What it does

Prerequisites

Quickstart

1) Clone the app

git clone https://github.com/demianarc/nebiusaistudiodeepresearch udr-nebius
cd udr-nebius

2) Backend setup

cd backend
python3 -m venv venv && . venv/bin/activate
pip install -r requirements.txt
cp env.example .env
# Required (no quotes):
# NEBIUS_API_KEY=your-nebius-api-key
# DEFAULT_MODEL=nebius-kimi-k2
# Optional (CORS for frontend):
# FRONTEND_URL=http://localhost:3004
# OpenAI-compatible Nebius base URL + model (already defaulted in this edition):
# FRAME_BASE_URL=https://api.tokenfactory.nebius.com/v1/
# FRAME_MODEL=moonshotai/Kimi-K2-Instruct
# Optional (web search):
# echo "<your-tavily-key>" > tavily_api.txt
./launch_server.sh

3) Frontend setup

cd ../frontend
cp env.example .env.local
# Connect to backend and use v1 endpoint
sed -i '' 's#^NEXT_PUBLIC_BACKEND_BASE_URL=.*#NEXT_PUBLIC_BACKEND_BASE_URL=http://localhost#' .env.local
sed -i '' 's#^NEXT_PUBLIC_BACKEND_PORT=.*#NEXT_PUBLIC_BACKEND_PORT=8000#' .env.local
sed -i '' 's#^NEXT_PUBLIC_API_VERSION=.*#NEXT_PUBLIC_API_VERSION=v1#' .env.local
sed -i '' 's#^NEXT_PUBLIC_ENABLE_V2_API=.*#NEXT_PUBLIC_ENABLE_V2_API=false#' .env.local
sed -i '' 's#^NEXT_PUBLIC_DRY_RUN=.*#NEXT_PUBLIC_DRY_RUN=false#' .env.local
npm install
npm run dev -- -p 3004

4) Use the UI Open http://localhost:3004 and enter a prompt (e.g., “Tell me everything about Nebius Token Factory”).

Notes

References