Skip to content

Instantly share code, notes, and snippets.

View curious-support's full-sized avatar

curious-support

View GitHub Profile
@curious-support
curious-support / step1-app.py
Created October 28, 2025 13:54
Step 1: Web Search Agent - app.py
import streamlit as st
from agent import SimpleAgent
st.set_page_config(page_title="AI Agent", page_icon="🤖", layout="centered")
st.title("🤖 AI Agent")
st.markdown("---")
user_request = st.text_area(
"What would you like the agent to do?",
@curious-support
curious-support / step1-agent.py
Created October 28, 2025 13:54
Step 1: Web Search Agent - agent.py
import json
from openai import OpenAI
import config
from tools import search_web
class SimpleAgent:
def __init__(self):
self.client = OpenAI(api_key=config.OPENAI_API_KEY)
self.max_iterations = 5
@curious-support
curious-support / step1-tools.py
Created October 28, 2025 13:54
Step 1: Web Search Agent - tools.py
import requests
import config
def search_web(query, num_results=10):
try:
response = requests.get(
"https://www.googleapis.com/customsearch/v1",
params={
"key": config.GOOGLE_CSE_API_KEY,