Skip to content

wandb/sambanova-webinar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

711 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Samba Agents Logo

Weights & Biases Weights & Biases

Agents

This repo is used for Weight and Biases and SambaNova Webniar. You can find the related blog here

This Agent application routes requests to four different agents: General assistant agent, Sales leads agent, Deep research agent, and a Finance analysis agent. The agents process tens of thousands of tokens that generates lightning fast and accurate results.

The basic process of the Agents application is described below.

  1. User query processing
  2. Agent assignment
  3. Data retrieval and processing
  4. Response generation

Note: This application uses Weave by Weights & Biases to track agent interactions. Learn more about Weave traces your agents' actions

Prerequisites

Ensure to install the prerequisites.

  • Python 3.11 (exact version required)

  • Node.js 18.17.0 or later

  • Yarn

  • Redis (via Docker or Homebrew)

    # Install Redis with Docker
    docker run --name redis -p 6379:6379 -d redis
    # Install Redis with Homebrew on macOS
    brew install redis
    brew services start redis

Get the following API keys to setup the Agents application.

Clerk authentication setup

  1. Sign up for a Clerk account at clerk.com.
  2. Create a new application in the Clerk dashboard.
  3. Get your publishable key and secret key.
  4. Configure your JWT issuer URL.
  5. Add these values to your environment variables as shown above.

Note: The DeepSeek-R1-8K model is supported in this application via SambaNova Cloud.

Application and Environment variables Setup

Environment variables setup

Frontend environment variables

Note: For the frontend environment variables, go to /frontend/sales-agent-crew/.

  1. Create a .env file with the following variables.
    VITE_API_URL=/api
    VITE_WEBSOCKET_URL=ws://localhost:8000
    VITE_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key

Backend environment variables

Note: For the backend environment variables, go to /backend/.

  1. Create a .env file with the following required variables.
    # Authentication
    CLERK_SECRET_KEY=your_clerk_secret_key
    CLERK_JWT_ISSUER=https://your-clerk-instance.clerk.accounts.dev/.well-known/jwks.json
    
    # API Keys for Services
    EXA_API_KEY=your_serper_api_key
    TAVILY_API_KEY=your_tavily_api_key  # Required for Deep Research agent
    
    WANDB_API_KEY=your_wandb_key
    WANDB_PROJECT=your_unique_project_name
    

Application Setup

Frontend setup

Follow the steps below to install the frontend for the Agents application.

Note: For the following commands, go to /frontend/sales-agent-crew/ directory.

  1. Install Vue.js dependencies.

    yarn install
  2. Run a local development environment.

    yarn dev
  3. Create a production build.

    yarn build

Backend setup

Follow the steps below to install the backend for the Agents application.

Note: For the following commands, go to /backend/ directory.

  1. Install Python dependencies: Create and activate a virtual environment (for example with venv) and install the project dependencies inside it. Make sure to use Python 3.11.

    python3.11 -m venv venv
    source venv/bin/activate
    pip install -r requirements.txt
  2. Run the application.

    uvicorn api.lead_generation_api:create_app --reload --host 127.0.0.1 --port 8000

Lauching the application

  1. Start Redis

    brew services start redis
  2. Start the FastAPI backend server.

    # From the project root
    cd backend
    uvicorn api.lead_generation_api:create_app --reload
  3. Start the Vue.js frontend development server.

    # From the project root
    cd frontend/sales-agent-crew/
    yarn dev
  4. Open your browser and navigate to:

    http://localhost:5174/

Architecture

Agents Architecture Diagram

This application is built with:

  • Vue 3 + Composition API
  • Vite
  • TailwindCSS
  • Clerk for authentication
  • Axios for API calls

Technology stack

The stack is designed to offer high-performance and scalability for both frontend and backend needs. See the frontend and backend technology stack listed in the table below.

Category Technologies used
Frontend
  • Vue.js 3 (Composition API)
  • TailwindCSS for styling
  • Vite for build tooling
  • Clerk for authentication
Backend
  • FastAPI
  • CrewAI
  • SambaNova Agentic Cloud
  • Exa Search API
  • Tavily API for research
  • Redis for caching
  • Financial Data APIs

Features

Intelligent query routing

The application automatically determines the best category for your query, ensuring efficient processing. Query routing is automatically done for use-cases such as:

  • Sales lead information gathering
  • Educational content/research creation
  • Financial analysis and market research

Voice input support

The application allows you to make queries using audio input. Simply click the microphone icon to start speaking. It also offers:

  • Automatic speech-to-text transcription
  • Hands-free operation for convenience

Additional features

Additional features of the application are listed below.

  • 🔐 Secure API key management – Encrypted for maximum protection
  • 📜 Chat history tracking – Easily access past conversations
  • 📥 Results export functionality – Download and share insights effortlessly
  • 🔄 Real-time query routing – Instant categorization for accurate responses
  • 📊 Detailed company insights – In-depth business data at your fingertips
  • 💹 Financial analysis and market trends – Stay ahead with real-time analytics
  • ✍ AI-generated outreach templates – Craft professional messages instantly

Project Forked from SambaNova Deepresearch Agent

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published