LangGraph: Adding Plan-and-Execute Planner

Adding Plan-and-Execute Planner All sources can be found in our github history. When using LLMs for complex tasks like hacking, a common problem is that they become hyper-focused upon a single attack vector and ignore all others. They go down a “depth-first” rabbit hole and never leave it. This was experienced by me and others. Plan-and-Execute Pattern One potential solution is the ‘plan-and-solve’-pattern (often also named ‘plan-and-execute’-pattern). in this strategy, one LLM (the planner) is given the task of creating a high-level task plan based upon the user-given objective. The task plan is processed by another LLM module (the agent or executor). Basically, the next step from the task plan is taken and forwarded to the executer to solve within in a limited number of steps or time. ...

October 14, 2024 · 8 min · 1607 words · Andreas Happe

LangGraph: Simplify our Tool-Calling Agent through `create_react_agent`

Simplify our Tool-Calling Agent through create_react_agent LangGraph has some amazing Prebuilt Components, one of them is the create_react_agent function that allows you to hughely simplify creating new tool-using agents. The full source code can be found within our github history. The simplified version This willb e based upon our recent configuration-improved version. Similar to that version, we start by reading the configuration data, setting up our LLM, connecting to the target system via SSH, and configuring tools for usage through LLMs: ...

October 12, 2024 · 2 min · 309 words · Andreas Happe

LangGraph: Improving Configuration Handling, esp. for Tools

Improving Configuration Handling, esp. for Tools While being quite happy that the initial prototype worked within hours, its code was very prototype-y, i.e., much of its configuration was hard-coded. In a second step, we want to fix this by making our target information (the SSH connection) configurable and remove all hard-coded credentials from the code. Big Picture We are already using python-dotenv for some of our configuration so it makes sense to further utilize this for more configuration data. In the improved implementation, our .env will look like this: ...

October 11, 2024 · 5 min · 920 words · Andreas Happe