Skip to main content

AI-powered interview automation with LangGraph. Conduct, evaluate, and report on technical interviews.

Project description

Interview AI

License: MIT Python 3.10 | 3.11 | 3.12 | 3.13 LangGraph

AI-powered interview automation with LangGraph. Conduct, evaluate, and report on technical interviews with customizable rules and tools.

Installation

pip install interview-ai

Agent Setup (Required)

After installation, run the setup command to initialize the agent configuration:

init-agent

This creates an interview_ai/ directory with:

  • config.json - LLM and storage settings
  • interview_rules.json - Interview formats and rules
  • tools.py - Custom tools for the agent
  • .example-env - Environment variables template

⚠️ Important: The package will fail without running init-agent first.

Configuration

Environment Variables

Copy .example-env to .env and configure:

# Required: Choose one (Or leave both blank for Local Models)
OPENAI_API_KEY="your-openai-key"
GOOGLE_API_KEY="your-google-key"

# Optional: Database persistence
POSTGRES_CONNECTION_URI="postgresql://..."
MONGODB_CONNECTION_URI="mongodb://..."

# Optional: Search (Bing)
# BING_SUBSCRIPTION_KEY="your-bing-key"
# BING_SEARCH_URL="https://api.bing.microsoft.com/v7.0/search"

# Optional: LangSmith Tracing
# LANGCHAIN_API_KEY="your-langchain-key"
# LANGCHAIN_TRACING_V2="true"

Config File (interview_ai/config.json)

{
  "llm_model_name": "gpt-4.1-mini",
  "storage_mode": "memory",
  "database_name": "sqlite",
  "internet_search": "duckduckgo"
}

Note: For local models, set llm_model_name to a Hugging Face model name (e.g., meta-llama/Llama-2-7b-chat-hf). The agent will handle downloading and setting it up locally (ensure API keys are blank in .env).

Quick Start

from interview_ai.clients import InterviewClient

# Initialize with interview format
client = InterviewClient(interview_format="short")

# Start interview
result = client.start()
interview_config = result["interview_config"]
print(result["message"])  # "Please enter your full name"

# Continue interview with user responses
response = client.next(interview_config, user_message="John Doe")
print(response["message"])  # Next question or prompt

# End interview and get evaluation
result = client.end(interview_config)
print(result["evaluation"])  # Final evaluation from LLM

# With operations_map for additional actions
result = client.end(interview_config, operations_map=[
    {
        "type": "email", 
        "receiver_name": "HR Manager", 
        "receiver_relation_to_interview": "Hiring Manager",
        "template": "Here is the candidate report..."
    },
    {
        "type": "whatsapp",
        "receiver_name": "HR Manager",
        "receiver_relation_to_interview": "Hiring Manager",
        "template": "Here is the candidate report..."
    },
    {
        "type": "api", 
        "endpoint": "https://api.company.com/report",
        "body": {"candidate": "John", "rating": "#Description# Extract rating #Description#"},
        "attachment": "#Evaluation PDF#"
    }
])
# Returns: {"evaluation": "...", "email": "...", "whatsapp": "...", "api": "..."}
# Note: Generated files (PDF/CSV) are saved in the 'interview_ai/' directory.

Interview Formats

Pre-configured formats in interview_rules.json:

Format Questions Time/Question Type
short 5 1 min Mixed
long 5 10 min Mixed
coding 1 30 min Coding

Custom Tools

Add your own tools in interview_ai/tools.py:

from langchain_core.tools import StructuredTool

def company_lookup(company_name: str) -> str:
    """Look up company interview patterns."""
    return f"Interview patterns for {company_name}..."

company_tool = StructuredTool.from_function(
    company_lookup,
    description="Look up typical interview questions for a company"
)

# Register your tools here
user_tools = [company_tool]

The agent will automatically load and use your custom tools.

Why Interview AI?

Feature Interview AI DIY Agent
Setup Time 5 minutes Hours/Days
Interview Flow Built-in graph with phases Manual state management
Custom Rules JSON configuration Hardcoded logic
Custom Tools Drop-in tools.py Complex integration
Evaluation Structured output schema Custom parsing
Persistence SQLite/Postgres/MongoDB Manual implementation
Answer Timer Automatic expiry Not included

Documentation

For detailed usage, API reference, and advanced configuration:

📖 Full Documentation

License

MIT © 2025 Ankit Pal

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

interview_ai-1.0.0.tar.gz (33.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

interview_ai-1.0.0-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

Details for the file interview_ai-1.0.0.tar.gz.

File metadata

  • Download URL: interview_ai-1.0.0.tar.gz
  • Upload date:
  • Size: 33.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.17

File hashes

Hashes for interview_ai-1.0.0.tar.gz
Algorithm Hash digest
SHA256 74b97fb1906eaf9beb50cf12950a65030839f36ee0944f4c626b7767cc89b006
MD5 b961731f7580bd4e042771f0665316ba
BLAKE2b-256 644a358d2b9c9efbca0f018be9cb1c518b5afcab3d63d5551ed44e417354eece

See more details on using hashes here.

File details

Details for the file interview_ai-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: interview_ai-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 27.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.17

File hashes

Hashes for interview_ai-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 443a7331826f72a01b5d6a5455011b15f68140f83d5d20116442f2da56501e55
MD5 0b88a18c103437b2f63115ac35ce0a92
BLAKE2b-256 6d57567538713e96a94a76733ecf8b61e0021588f3af6262292f4d74efe793a9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page