Skip to content

RustSandbox/vivatechagent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

VivaTeach Planner πŸ¦ΎπŸ“…

πŸ‘‰ Live demo: https://vivatech.remo-lab.com/

πŸ“§ Feedback? Please share your thoughts at vivatech@remolab.fr

Navigating VivaTech's schedule can feel like decoding a circuit board with no labels. I needed something faster, smarter, and more tailoredβ€”so I built VivaTeach Planner. I was literally cooking dinner while cooking up this code because I wanted a planner that thinks with me.


🎯 What It Does

βœ… Returns up to 10 tailored session picks per day based on your interests.
🧭 Surfaces high-value talks and booths in seconds.
πŸ’¬ This is alphaβ€”DM me for more recs; your feedback shapes what comes next!

Heads-up: Because this is part of my learning-in-public journey, the service runs with extremely verbose logging (every request, tool call, and agent step). If that's too noisy, just set the RUST_LOG env var to something like info or warn when you run the service to quiet things down.


πŸ› οΈ Stack Behind the Scenes

Layer Tech / Service Why it was chosen
Runtime Intelligence OpenAI GPT-4o Fast, reliable, and robust for real-time reasoning
Agentic Logic Rig Lightweight, modular framework for orchestrating tool-calling LLM agents
Web / API Rust + Axum Performant, type-safe HTTP layer
Serverless Deploy Shuttle Zero-config, Rust-native deployments
Database Neon (Postgres) Serverless with branching for safe experimentation
Authentication Supabase Quick auth flows & session handling
Embeddings mxbai-embed-large-v1 via Ollama (local) β†’ Hugging Face (cloud) Cheap to build locally, scalable remotely
Debugging Copilot Claude 4 Sharp and contextual sanity checks

πŸ–ΌοΈ High-Level Architecture

flowchart TD
    subgraph Client
        A[POST /generate-plan] -->|objective JSON| B
    end

    subgraph "Backend [Axum + Rig]"
        B[generate_plan_handler]
        B --> C[Rig Agent GPT-4o]
        C --|tool: query_vivatech_api|--> D[External VivaTech RAG API]
        C --|optional tool|--> E[assess_event_timeliness]
        C --> F[Action Plan]
    end

    D -->|JSON sources| C
    E -->|Urgency metadata| C
    F -->|string/JSON| G[HTTP Response]
Loading

πŸ“‚ Project Layout

vivaagent-opensource/
β”œβ”€ src/
β”‚  β”œβ”€ main.rs          # πŸšͺ Axum service entry-point & Shuttle glue
β”‚  β”œβ”€ tools.rs         # πŸ› οΈ  Rig tool implementations
β”‚  └─ models.rs        # πŸ—‚οΈ  Domain structs & helper fns
β”œβ”€ tests/              # βœ… (coming soon) integration & unit tests
└─ Cargo.toml          # πŸ“¦ Rust dependencies & metadata

⚑ Quick Start (Local)

Prerequisites

  • Rust >= 1.79 (rustup default stable)
  • cargo-shuttle CLI β†’ cargo install shuttle-launcher
  • An OpenAI API key with GPT-4 access
  • (Optional) Ollama if you want to run embeddings locally

1 Β· Clone & enter

git clone https://github.com/RustSandbox/vivatechagent.git
cd vivatechagent

2 Β· Configure secrets

Create a Secrets.toml (used by Shuttle) or export env vars directly.

# Secrets.toml
OPENAI_API_KEY   = "sk-..."
VIVATECH_API_URL = "https://vivatech-rag-v2-n1hk.shuttle.app/query"
# Optional fine-tuning
API_TIMEOUT_SECONDS = "30"
CONFERENCE_DATE     = "2025-06-11"

3 Β· Run locally

cargo shuttle run        # spins up http://localhost:8000

πŸ”Œ API Usage

Endpoint

POST /generate-plan

Request Payload

{
  "objective": "Find AI sessions about climate tech on Friday"
}

Example Response

1. 🌱 **AI for a Greener Planet** β€” Friday 10:00, Stage 3  
   Why attend: Top researchers share carbon-negative ML techniques.

2. πŸ€– **Robotics in Sustainability** β€” Friday 13:30, Hall B  
   Why attend: Live demo of autonomous waste-sorting bots.

… up to 10 picks …

🧩 Internals

Key Files

  • src/main.rs – Axum route /generate-plan, sets up the Rig agent and forwards the user objective.
  • src/tools.rs – Implements two Rig tools:
    • query_vivatech_api β†’ Hits the external RAG endpoint to search sessions/partners.
    • assess_event_timeliness β†’ Parses dates & classifies urgency (Immediate / Soon / Normal).
  • src/models.rs – Domain models (GeneratePlanRequest, VivatechSource, etc.).

Env Vars Used

Variable Required Purpose
OPENAI_API_KEY βœ… Calls GPT-4o for planning logic
VIVATECH_API_URL βœ… Endpoint for VivaTech RAG search
API_TIMEOUT_SECONDS ❌ HTTP timeout for external calls
CONFERENCE_DATE ❌ Override reference date for tools

πŸš€ Deploying to Shuttle

# 1. Log in / sign up
cargo shuttle login

# 2. Provision an app
cargo shuttle init --name viva-teach-planner

# 3. Deploy
cargo shuttle deploy

Shuttle automatically provisions a Postgres instance if you need one later. Add your secrets via the dashboard or Shuttle.toml.


πŸ“ License

MIT Β© 2025 β€” Happy hacking & see you at VivaTech!


🌐 Companion Services

This repo focuses on the planning micro-service, but two other services complete the picture:

Service Purpose Env Var / URL
VivaTech RAG Agent Exposes a /query endpoint that talks directly to the Postgres + embeddings DB. Our query_vivatech_api tool calls this private service to fetch relevant sessions & partner info. VIVATECH_API_URL (e.g. https://vivatechblablabla.shuttle.app/query) (private)
Session Manager / Queue A minimal private front-end layer that handles session token issuance, rate-limiting, and a small in-memory FIFO queue so we don't overload GPT-4. Think "traffic cop" for end-users. Live at https://vivatech.remo-lab.com/ (private)

The front-end session manager is available publicly at https://vivatech.remo-lab.com/. It is intentionally kept thinβ€”HTML + a sprinkle of JSβ€”so it can be swapped or scaled independently (Cloudflare Workers, Vercel Edge, etc.). For now it simply meters requests and shows a "you're in line" screen if usage spikes.

If you'd like to run these companion services locally you'll find them in their own repositories:


About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages