Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Azure OpenAI
AZURE_OPENAI_API_KEY=your_api_key
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/
AZURE_OPENAI_DEPLOYMENT=your_deployment_name
OPENAI_API_VERSION=2024-10-21

# Google Serper (Web Search)
GOOGLE_SERPER_API_KEY=your_api_key

# Pushover (Notifications - Optional)
PUSHOVER_TOKEN=your_token
PUSHOVER_USER=your_user_key

# LangSmith Tracing (Optional - for debugging)
# LANGCHAIN_TRACING_V2=true
# LANGCHAIN_API_KEY=your_api_key
# LANGCHAIN_PROJECT=your_project_name
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Environment
.env
.venv
venv/

# Python
__pycache__/
*.py[cod]
*.egg-info/
*.db
*.db-shm
*.db-wal

# IDE
.idea/
.vscode/

# OS
.DS_Store
*.swp
*.swo

# Project-specific
ms-playwright/
memory.db
memory.db-shm
memory.db-wal

#uv lock
uv.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# 🤖 Sidekick - Personal Co-Worker

An AI agent that completes tasks step-by-step with intelligent evaluation feedback. It integrates multiple tools to search the web, run code, manage files, and more.

## **Quick Start**

### **1. Install Dependencies**
```bash
# Using pip (recommended for all users)
pip install -e .

# Or using uv (faster alternative)
uv sync
```

### **2. Configure Environment**
```bash
# Copy the example environment file
cp .env.example .env

# Add your API keys to .env
```

**Required API Keys:**
- **Azure OpenAI**: Get from [Azure Portal](https://portal.azure.com)
- **Google Serper**: Get from [serper.dev](https://serper.dev)
- **Pushover** (optional): Get from [pushover.net](https://pushover.net)

### **3. Run the App**
```bash
# Using pip installation
python app.py

# Or using uv
uv run app.py
```

Open `http://127.0.0.1:7860` in your browser.

---

## **Features**

| Tool | What It Does |
|------|--------------|
| 🔍 **Web Search** | Find current information online |
| 🌐 **Browser** | Navigate websites and extract data |
| 📚 **Wikipedia** | Look up information from Wikipedia |
| 🐍 **Python REPL** | Execute Python code directly |
| 📁 **File Manager** | Create, read, write files |
| 📲 **Notifications** | Send push alerts |

---

## **How to Use**

1. **Enter your task** - e.g., "Find the current Bitcoin price"
2. **Set success criteria** - e.g., "Price in USD and EUR"
3. **Click Submit** - Agent works through the task
4. **Review output** - See results and evaluation

---

## **Tech Stack**

- **Framework**: LangGraph v0.2+ (Agent Orchestration)
- **UI**: Gradio 6.0 (Web Interface)
- **LLM**: Azure OpenAI
- **Browser**: Playwright
- **Async**: Python 3.10+ asyncio
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README states Python 3.10+ in the Tech Stack section but Python 3.12 is specified in the Requirements section and .python-version file. This inconsistency could confuse users about the actual minimum Python version required. Update the Tech Stack section to match the actual requirement of Python 3.12.

Suggested change
- **Async**: Python 3.10+ asyncio
- **Async**: Python 3.12 asyncio

Copilot uses AI. Check for mistakes.

---

## **Project Structure**

```
sidekick/
├── app.py # Gradio UI
├── sidekick.py # LangGraph agent
├── sidekick_tools.py # Tool integrations
├── pyproject.toml # Dependencies
├── .env.example # Configuration template
└── README.md # Documentation
```

---

## **Example Queries**

- "Search for latest AI news and summarize"
- "Write Python code to calculate Fibonacci numbers"
- "Create a file with sample data and parse it"
- "Visit Python.org and get the current version"

---

## **Requirements**

- Python 3.12
- Azure OpenAI API key
- Google Serper API key
- Pushover account for notifications

---
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
import gradio as gr
from sidekick import Sidekick
import asyncio
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import of 'asyncio' is not used.

Suggested change
import asyncio

Copilot uses AI. Check for mistakes.
from typing import Optional


async def setup_sidekick():
"""Initialize Sidekick on app load"""
print("Setting up Sidekick...")
sidekick = Sidekick()
await sidekick.setup()
return sidekick


async def process_message(
message: str,
success_criteria: str,
history: Optional[list],
sidekick: Sidekick
) -> tuple:
"""
Process user message and return updated chat history.
Returns: (updated_history, cleared_message_box)
"""
if not message or not success_criteria:
return history or [], ""

updated_history = await sidekick.run_superstep(
message, success_criteria, history or []
)
return updated_history, "" # Clear the message box after submission


async def reset_conversation(sidekick: Optional[Sidekick]):
"""Reset the conversation and create a new Sidekick instance"""
if sidekick:
await sidekick.cleanup()
new_sidekick = await setup_sidekick()
return [], "", "", new_sidekick # chatbot, message, success_criteria, sidekick


async def free_resources(sidekick: Optional[Sidekick]) -> None:
"""Cleanup callback when app closes"""
if sidekick:
try:
await sidekick.cleanup()
print("Sidekick resources freed")
except Exception as e:
print(f"Error during cleanup: {e}")
Comment on lines +9 to +49
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The print statements in the app.py file are inconsistent with the logging approach used in sidekick.py and sidekick_tools.py. Consider importing and using the logging module for consistent logging throughout the application.

Copilot uses AI. Check for mistakes.


# ============================================================================
# GRADIO INTERFACE
# ============================================================================

with gr.Blocks(title="Sidekick - Personal Co-Worker") as ui:
# State management
sidekick = gr.State(value=None)

# Header
gr.Markdown("# 🤖 Sidekick Personal Co-Worker")
gr.Markdown("Your AI assistant that completes tasks step-by-step with evaluation feedback.")

# Chat interface
with gr.Row():
chatbot = gr.Chatbot(
label="Conversation",
height=400
)

# Input section
with gr.Group():
gr.Markdown("### Task Setup")
with gr.Row():
message = gr.Textbox(
show_label=False,
placeholder="Enter your request (e.g., 'Find the current Bitcoin price')",
scale=4
)
with gr.Row():
success_criteria = gr.Textbox(
show_label=False,
placeholder="Define success (e.g., 'I need the price in USD and EUR')",
scale=4
)

# Control buttons
with gr.Row():
reset_button = gr.Button("🔄 Reset", variant="stop", scale=1)
submit_button = gr.Button("🚀 Submit", variant="primary", scale=1)

# Info section
gr.Markdown(
"""
**How it works:**
1. Enter your task in the request field
2. Define what success looks like in the criteria field
3. Click Submit or press Enter
4. Sidekick will work through the task and provide feedback
"""
)

# Event handlers
submit_button.click(
fn=process_message,
inputs=[message, success_criteria, chatbot, sidekick],
outputs=[chatbot, message]
)

reset_button.click(
fn=reset_conversation,
inputs=[sidekick],
outputs=[chatbot, message, success_criteria, sidekick]
)

# Initialize sidekick on load
ui.load(fn=setup_sidekick, outputs=[sidekick])


if __name__ == "__main__":
ui.launch(
server_name="127.0.0.1",
server_port=7860,
share=False,
css="""
.header-text { text-align: center; margin-bottom: 20px; }
.info-text { font-size: 14px; color: #666; }
"""
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[project]
name = "sidekick"
version = "0.1.0"
description = "AI agent that completes tasks step-by-step with intelligent evaluation feedback"
readme = "README.md"
requires-python = ">=3.12"
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pyproject.toml specifies 'requires-python = ">=3.12"' but the README Tech Stack section mentions 'Python 3.10+ asyncio'. This creates an inconsistency about the minimum Python version. Ensure all documentation and configuration files specify Python 3.12 as the minimum version.

Copilot uses AI. Check for mistakes.
dependencies = [
"aiosqlite>=0.22.1",
"beautifulsoup4>=4.14.3",
"gradio>=6.3.0",
"langchain>=1.2.3",
"langchain-community>=0.4.1",
"langchain-experimental>=0.4.1",
"langchain-openai>=1.1.7",
"langgraph>=1.0.5",
"langgraph-checkpoint-sqlite>=3.0.1",
"lxml>=6.0.2",
"openai>=2.15.0",
"playwright>=1.57.0",
"python-dotenv>=1.2.1",
"requests>=2.32.5",
"wikipedia>=1.4.0",
]
Loading