{"id":26161469,"url":"https://github.com/pguso/ai-agents-workshop","last_synced_at":"2026-04-15T11:31:14.467Z","repository":{"id":281673007,"uuid":"946027284","full_name":"pguso/ai-agents-workshop","owner":"pguso","description":"WIP: A hands-on guide for JavaScript developers to build AI agents with tools and long-term memory","archived":false,"fork":false,"pushed_at":"2025-03-26T11:02:04.000Z","size":62,"stargazers_count":17,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-25T23:27:47.358Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pguso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-10T13:53:21.000Z","updated_at":"2025-12-18T18:52:40.000Z","dependencies_parsed_at":"2025-03-10T15:24:07.250Z","dependency_job_id":"64d54dcf-8c12-483f-92aa-3d8e30f0120d","html_url":"https://github.com/pguso/ai-agents-workshop","commit_stats":null,"previous_names":["pguso/ai-agents-workshop"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pguso/ai-agents-workshop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pguso%2Fai-agents-workshop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pguso%2Fai-agents-workshop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pguso%2Fai-agents-workshop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pguso%2Fai-agents-workshop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pguso","download_url":"https://codeload.github.com/pguso/ai-agents-workshop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pguso%2Fai-agents-workshop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31839201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T11:29:19.690Z","status":"ssl_error","status_checked_at":"2026-04-15T11:29:19.171Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-11T12:38:24.384Z","updated_at":"2026-04-15T11:31:14.426Z","avatar_url":"https://github.com/pguso.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 AI Agents Workshop\n\n🚧 **Work in Progress**: This project is actively being developed. Expect frequent updates and improvements! 🚀\n\nA hands-on guide for JavaScript developers to build AI-powered agents with tools and long-term memory.\n\n## 🔥 Features\n- **AI Agent Development**: Learn to create intelligent agents using JavaScript.\n- **Tool Integration**: Equip agents with the ability to use external tools for enhanced functionality.\n- **Long-Term Memory**: Implement persistent memory to maintain context over time.\n- **Practical Examples**: Engage with real-world scenarios and code samples.\n\n## 🛠️ Setup\n\n### 1️⃣ Clone the Repository\n```sh\ngit clone https://github.com/pguso/ai-agents-workshop.git\ncd ai-agents-workshop\n```\n\n# Install Dependencies\n```sh\nnpm install\n```\n\n# Set Up Environment Variables\nCreate a .env file in the root directory and add the following:\n```sh\nREPLICATE_API_TOKEN=your_replicate_api_key\nSUPABASE_URL=your_supabase_project_url\nSUPABASE_SERVICE_KEY=your_supabase_service_key\nSERPAPI_KEY=your_serpapi_key\n```\n* REPLICATE_API_TOKEN – Required for AI model inference\n* SUPABASE_URL – Database URL for long-term memory\n* SUPABASE_SERVICE_KEY – API key for accessing Supabase services\n* SERPAPI_KEY – Required for AI-powered web search\n\n# Run the Project\n```shell\nnpm start\n```\n\n# 📖 How It Works\n\n## AI Agent Creation\n* Uses AI models from Replicate to process user inputs.\n* Fetches data from the web via SerpAPI.\n* Stores long-term context in Supabase.\n\n## Memory and Tools\n* Supabase enables knowledge retention over multiple interactions.\n* Tools extend the agent’s capabilities, allowing API calls and external queries.\n\n# 📂 Project Structure\n\n```\nai-agents-workshop/\n├── docs/\n│   └── ...             # Documentation files\n├── src/\n│   ├── agent/             # Core AI agent functionality\n│   ├── llm/               # Large Language Model (LLM) provider\n│   ├── memory/            # Long-term memory (under development)\n│   ├── providers/         # Different tools and external service integrations\n│   ├── examples/          # Various AI agent implementations\n│   ├── index.ts           # Main entry point\n├── .gitignore\n├── LICENSE\n├── README.md\n├── package-lock.json\n├── package.json\n└── tsconfig.json\n```\n\n# 📖 Example Implementations\nThis repository provides several practical examples of AI agents using different tools and memory capabilities.\n\n## Web Search Agent (index.ts)\nPurpose: Uses AI and web search tools to find and summarize trends in AI.\n\n* Uses WebSearchTool: Queries the web for AI trends.\n* Integrates with ReplicateLLMProvider: Uses Meta's Llama-3-8B model for processing.\n* Processes Tool Responses: Analyzes and summarizes top search results.\n* JSON-Based Output: Ensures structured responses for easy parsing.\n\n📌 Example Use Case:\nA developer wants to fetch and summarize the latest trends in AI for 2025.\n\n## Hotel Information Agent (hotel.ts)\nPurpose: Provides updates on hotel room occupancy and local events.\n\n* Uses BookingTools \u0026 EventTools: Fetches hotel room status and upcoming events.\n* AI-Generated Summary: The LLM integrates tool outputs into a structured update.\n* Ideal for Hotel Managers: Automates the process of retrieving and summarizing occupancy and event data.\n\n📌 Example Use Case:\nA hotel manager asks: \"What are the current room occupancy rates and upcoming local events?\"\n\n## Task Management Agent (tasks.ts)\nThe Task Management Agent provides AI-powered task management using Supabase as a database backend. This agent allows users to add, update, delete, and list tasks using natural language commands. It integrates tools via decorators, making them accessible for AI-driven task automation.\n\n* Automates task management via AI\n* Structured JSON responses for easy integration with other apps\n* Uses Supabase for persistence, ensuring task history is saved\n* Can be extended for multi-user or priority-based task handling\n\n📌 Example Use Case:\nA user requests: \"Add a new task 'Buy shoes', mark task ID 10 as completed and list all tasks.\"\n\n## Weather \u0026 Currency Agent (weather.ts)\nPurpose: Fetches weather, currency conversion, and Wikipedia summaries.\n\n* Uses WeatherTools, CurrencyTools, and WikipediaTools.\n* Multi-Tool Execution: Fetches weather, converts currencies and summarizes Wikipedia entries.\n* AI Processes Data: Combines tool outputs into a coherent final answer.\n\n📌 Example Use Case:\nA user asks: \"What’s the weather in Beijing, convert 500 EUR to CNY, and summarize Wikipedia’s article on China?\"\n\n## Memory-Enhanced Agent (memory.ts) (In Development)\nPurpose: Implements a long-term memory system for AI agents.\n\n* Uses MemoryManager: Stores past interactions for context-aware responses.\n* Retrieves Context: Fetches relevant memories before responding.\n* Enhances AI Capabilities: Allows AI agents to \"remember\" previous conversations.\n\n📌 Example Use Case:\nA user asks a series of questions and the AI recalls past interactions.\n\n# 🎯 Roadmap\n\n1. [x] Basic AI agent with tool use\n2. [x] Long-term memory with Supabase\n3. [ ] Support for multiple AI models \n4. [ ] Ollama Provider\n5. [ ] Llama cpp Provider\n6. [ ] Web UI for agent interaction\n7. [ ] MemGPT example\n\n# 🤝 Contributing\nContributions are welcome! Feel free to submit issues or pull requests.\n\n# 📜 License\n\nThis project is licensed under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpguso%2Fai-agents-workshop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpguso%2Fai-agents-workshop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpguso%2Fai-agents-workshop/lists"}