https://github.com/neural-maze/agentic_patterns Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions By size + Enterprise + Teams + Startups By industry + Healthcare + Financial services + Manufacturing By use case + CI/CD & Automation + DevOps + DevSecOps * Resources Topics + AI + DevOps + Security + Software Development + View all Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up Reseting focus You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} neural-maze / agentic_patterns Public * Notifications You must be signed in to change notification settings * Fork 9 * Star 136 Implementing the 4 agentic patterns from scratch License MIT license 136 stars 9 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights neural-maze/agentic_patterns This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main BranchesTags Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 25 Commits img img notebooks notebooks src/ src/ agentic_patterns agentic_patterns .gitignore .gitignore LICENSE LICENSE README.md README.md poetry.lock poetry.lock pyproject.toml pyproject.toml View all files Repository files navigation * README * MIT license logo Agentic Patterns Implementing the agentic patterns using Groq No LangChain, no LangGraph, no LlamaIndex, no CrewAI. Pure and simple API calls to Groq. Introduction This repository contains an implementation of the 4 agentic patterns defined by Deeplearning.ai using Groq. logo Below, you have a description of the 4 patterns we are going to be implementing. The 4 Agentic patterns Reflection Pattern logo A very basic pattern but, despite its simplicity, it provides surprising performance gains for the LLM response. It allows the LLM to reflect on its results, suggesting modifications, additions, improvements in the writing style, etc. Want to see this pattern in action? * Check the notebook for a step by step explanation * Check the ReflectionAgent for a complete Python implementation --------------------------------------------------------------------- Tool Pattern logo The information stored in the LLM weights is (usually) not enough to give accurate and insightful answers to our questions That's why we need to provide the LLM with ways to access the outside world In practice, you can build tools for whatever you want (at the end of the day they are just functions the LLM can use), from a tool that let's you access Wikipedia, another to analyse the content of YouTube videos or calculate difficult integrals in Wolfram Alpha. Tools are the secret sauce of agentic applications and the possibilities are endless! Want to see this pattern in action? * Check the notebook for a step by step explanation * Check the ToolAgent for a complete Python implementation * Check the Tool for understanding how Tools work under the hood. --------------------------------------------------------------------- Planning Pattern logo So, we've seen agents capable of reflecting and using tools to access the outside world. But ... what about planning, i.e. deciding what sequence of steps to follow to accomplish a large task? That is exactly what the Plannin Pattern provided; ways for the LLM to break a task into smaller, more easily accomplished subgoals without losing track of the end goal. The most paradigmatic example of the planning pattern is the ReAct technique, displayed in the diagram above. Want to see this pattern in action? TBD --------------------------------------------------------------------- Multiagent Pattern logo You may have heard about frameworks like crewAI or AutoGen, which allow you to create multi-agent applications. These frameworks implement different variations of the multi-agent pattern, in which tasks are divided into smaller subtasks executed by different roles (e.g. one agent can be a software engineer, another a project manager, etc.) Want to see this pattern in action? TBD --------------------------------------------------------------------- About Implementing the 4 agentic patterns from scratch Resources Readme License MIT license Activity Custom properties Stars 136 stars Watchers 3 watching Forks 9 forks Report repository Releases No releases published Packages 0 No packages published Languages * Jupyter Notebook 88.1% * Python 11.9% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.