 Hello! Today I want to talk a little bit about a project that we've been working on, kind of as a side project, but we're excited to share it both, one, as an example of what you can build with Laingraph, but then also, two, as something that's hopefully useful when you're developing with Laingraph. So it's called Laingraph Engineer, and the idea is that it will help you build the scaffolding for your Landgraf applications. So the idea is that we have this graph, this agent, which you can talk to. It will get requirements from you, and then it will create the scaffolding of a Landgraf app. And what does that mean? That means that it will try to get all the nodes and edges correct, but it won't try to necessarily fill in the contents of the nodes or edges. We'll leave that to you and the logic that you write. I think this is helpful because you shouldn't have to think deeply about lane graph constructs in order to build an agent, but you should have to think about your business logic. And so that's kind of like the line that we're trying to draw here. We'll try to write the lane graph boilerplate for you, but you'll have to write the business logic that lives inside the nodes and edges of your graph. So this is the Landgraf application that we've created that represents Landgraf Engineer. And what you're seeing right now is Landgraf Studio. It's deployed on Landgraf Cloud, and it's deployed publicly. So this is a new beta feature we're testing where you can share public links to a Landgraf deployment. And so in the link down below where you can try this out, you'll see the public link to try it out. So here is roughly what the Landgraf Engineer app is doing. So there's a few different nodes. So there's this gather requirements node, which can go to either draft answer or to the end. What this node does is it tries to talk to you and gather requirements for the application. So it tries to get more information from you about what exactly you want to do. Once it has enough information, it will call this draft answer node, and this will go to a separate agent. This agent is focused on writing the LandGraph application for you. So it will generate a full graph and then it will go to this check node. This check node is a very basic check to make sure that the draft node generated some markdown that contains a Python snippet. In the future, we'll add other checks in here, like making sure that all import statements are correct or even trying to run the code. After we run these checks, which are programmatic checks, if it passes, we'll go on to a critique node. If it fails, we'll feed that back into the draft answer node, and it will try again. What does the critique node do? The critique node uses an LLM to critique the outputs. So it will pass the generated Python code into an LLM and say, hey, does this look reasonable? So we're running two different types of checks here. One are programmatic checks, the other is using an LLM. If the critique node thinks it's good, then it will go to the end and it will finish. You can find all the code for this in Langraph Engineer. So this is an open source repo and if we look inside this folder we can see that there's a python file roughly for each of the nodes. So let's look inside the draft node because this is doing a lot of the heavy lifting. So we can see that it's a pretty simple prompt. It's basically some brief description about what Langraph is, a path to a unit test file, so I'll talk more about this later, and then it has some more instructions. Some of these instructions include how to generate things, and then others include the specific format, so to use this Python markdown syntax. We pass in a unit test file because we actually have a lot of pretty good unit test coverage in Landgraf. And these unit tests are actually a really good way of describing the API of what Landgraf should do and how you should invoke it. So actually, we found that by passing this in, it's able to generate pretty reasonable looking results. There's other files here for other nodes, and you can check those out. Agent.py is another great file to look at. This is where the agent is actually defined. So let's try it out. Let's ask it to generate a RAG app, please. So this is pretty vague. It's not entirely sure what, you know, it should do, and so it asks some kind of follow-up questions. Do I have any specific steps? Retrieve documents first, then generate answer. It's pretty straightforward. So now it's calling the draft answer because it has enough information. This is the draft node responding. We can see that it's writing some code. It did the check pretty fast because the check's deterministic. This is the draft node responding. We can see that it's writing some code. It did the check pretty fast because the check's deterministic. And now the critique node. And so the critique node seems good. So it's finished. If we want to look at the output, we can click this button here, and we can see the full output. So this is a new thing we've added to Langriff Studio to make it easy to see the desired types of output. So let's copy this code. let's put it in a notebook, see if it actually runs. So it actually runs! So it got kind of like the ability to define a workflow, a graph, it got all the imports correct. Now if if you notice here, the innards of the retrieve documents node and the generate answer node, they're still completely mocked out. You've got to put your logic here. And that's the idea. You'll put your business logic. We'll help create the scaffolding. That's it for this video. As I mentioned, this is publicly available, so you can try it out. We'll be improving it over the next few weeks. So we'll be adding in some more checks. We'll be improving the prompts, maybe adding in some other critique steps, maybe integrating it into Landgraf Studio so it can run locally. Thank you all for watching, and please reach out if any questions.
LangGraph Engineer
Try out the deployed version: https://smith.langchain.com/studio/thread?baseUrl=https://langgraph-engineer-23dacb3822e3589d80ff57de9ee94e1c.default.us.langgraph.app

This is an alpha version of an agent that can help bootstrap LangGraph applications. It will focus on creating the correct nodes and edges, but will not attempt to write the logic to fill in the nodes and edges - rather will leave that for you.

LangGraph: https://github.com/langchain-ai/langgraph

The agent consists of a few steps:

1. Converse with the user to gather all requirements
2. Write a draft
3. Run programatic checks against the generated draft (right now just checking that the response has the right format). If it fails, then go back to step 2. If it passes, then continue to step 4.
4. Run an LLM critique against the generated draft. If it fails, go back to step 2. If it passes, the continue to the end.