ai-career-coach / README.md
Nikolay Angelov
add google analytics
3b3fbd6
metadata
title: Career Coach Agent
emoji: πŸ§‘β€πŸ’Ό
colorFrom: blue
colorTo: indigo
sdk: docker
app_port: 8000
python_version: 3.12.3
short_description: AI career coach powered by Llama-3.3-70B-Instruct
tags:
  - career
  - ai
  - langchain
  - fastapi
  - coaching

Career Coach Agent

An AI-powered career coaching assistant that helps users create personalized development plans and provides career guidance.

Project Structure

career-coach-agent/
β”œβ”€β”€ app.py              # Main FastAPI application with agent setup
β”œβ”€β”€ main.py            # Application entry point
β”œβ”€β”€ prompts.yaml       # System prompts and templates
β”œβ”€β”€ output_parser.py   # Response parsing and validation
β”œβ”€β”€ frontend/          # React frontend application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/    # React components
β”‚   β”‚   β”œβ”€β”€ types/        # TypeScript type definitions
β”‚   β”‚   └── App.tsx       # Main application component
β”œβ”€β”€ tools/             # Tool implementations
β”‚   β”œβ”€β”€ visit_webpage.py    # Web page content fetcher
β”‚   β”œβ”€β”€ wikipedia_tool.py   # Wikipedia search tool
β”‚   β”œβ”€β”€ python_repl.py      # Python code execution tool
β”‚   β”œβ”€β”€ internet_search.py  # Internet search tool
β”‚   β”œβ”€β”€ google_jobs_search.py # Google Jobs search tool
β”‚   └── date_and_time.py    # Date and time utilities
β”œβ”€β”€ helpers/           # Helper functions
β”‚   β”œβ”€β”€ helper.py         # General helper functions
β”‚   └── feedback_handler.py # Feedback processing
└── README.md          # This file

Requirements

Backend

  • Python 3.12+
  • FastAPI
  • LangChain
  • Hugging Face Hub API token
  • Additional dependencies:
    • requests
    • markdownify
    • wikipedia
    • duckduckgo-search
    • pytz
    • python-multipart
    • uvicorn

Frontend

  • Node.js 16+
  • React
  • TypeScript
  • Additional dependencies:
    • styled-components
    • axios
    • @types/react
    • @types/styled-components

Environment Variables

Required environment variables:

HUGGINGFACEHUB_API_TOKEN=your_huggingface_token

Installation

  1. Clone the repository:
git clone <repository-url>
cd career-coach-agent
  1. Install backend dependencies:
pip install -r requirements.txt
  1. Install frontend dependencies:
cd frontend
npm install
  1. Set up your Hugging Face API token as an environment variable.

Running the Application

Development Mode

  1. Start the backend:
uvicorn main:app --reload
  1. Start the frontend development server:
cd frontend
npm start

Production Mode

  1. Build the frontend:
cd frontend
npm run build
  1. Start the application:
uvicorn main:app

The application will be available at:

API Endpoints

/agent/query (POST)

Submit queries to the AI assistant.

Request body:

{
    "query": "string",
    "thread_id": "string (optional)",
    "context": {} (optional)
}

/agent/feedback (POST)

Submit user feedback.

Request body:

{
    "contact": "string",
    "feedback": "string"
}

/pdp-generator (POST)

Generate a Personal Development Plan.

Request body:

{
    "file": "PDF file",
    "career_goal": "string",
    "additional_context": "string (optional)",
    "target_date": "string"
}

Available Tools

The AI assistant has access to the following tools:

  1. Wikipedia Search

    • Searches Wikipedia for information about topics, people, or concepts
    • Returns relevant summaries and information
  2. Web Page Visitor

    • Fetches and processes content from web pages
    • Converts HTML to markdown for better readability
    • Handles timeouts and errors gracefully
  3. Python Code Execution

    • Executes Python code in a safe environment
    • Returns execution results
    • Handles syntax errors and runtime exceptions
  4. Internet Search

    • Performs web searches using DuckDuckGo
    • Returns relevant search results
    • Useful for finding current information
  5. Google Jobs Search

    • Searches for job listings on Google Jobs
    • Returns relevant job opportunities
    • Helps with career research
  6. Date and Time

    • Provides current date and time information
    • Supports multiple timezones
    • Useful for scheduling and planning

Features

Frontend

  • Modern, responsive UI built with React and TypeScript
  • Real-time chat interface with message history
  • Personal Development Plan (PDP) generation
  • PDF upload and processing
  • User feedback system
  • Mobile-friendly design

Backend

  • FastAPI-based REST API
  • LangChain-powered AI agent
  • Conversation memory and context management
  • Error handling and graceful degradation
  • CORS support
  • Interactive API documentation
  • Tool execution with proper error handling
  • Markdown formatting for better readability

Architecture

  • Frontend:

    • React with TypeScript
    • Styled Components for styling
    • Axios for API communication
    • Responsive design for all devices
  • Backend:

    • FastAPI: Handles HTTP requests and API endpoints
    • LangChain: Manages the AI agent and tools
    • Llama-3.3-70B-Instruct: Powers the AI responses
    • YAML Configuration: Manages system prompts and templates
    • Tools Integration: Wikipedia, Web, Python, Search, and more

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

[Add your license here]