Skip to content

Commit c45b049

Browse files
committed
docs: update readme
1 parent e96162e commit c45b049

File tree

2 files changed

+42
-5
lines changed

2 files changed

+42
-5
lines changed

README.md

+42-5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
| Date | Release | info
1313
|--------------| --- | ---
14+
| Jul 19, 2024 | `1.0-SNAPSHOT` | Add support of an embed **Playground Webapp** able to run Langgrap4j flow - [issue #9](https://github.com/bsorrentino/langgraph4j/issues/9)
1415
| Jun 21, 2024 | `1.0-SNAPSHOT` | Add support of [Mermaid] diagram generation - [issue #5](https://github.com/bsorrentino/langgraph4j/issues/5)
1516
| Jun 19, 2024 | `1.0-SNAPSHOT` | Add [adaptive rag](adaptice-rag/README.md) sample
1617
| Jun 10, 2024 | `1.0-SNAPSHOT` | Refactoring how generate graph representation (plantuml)
@@ -26,7 +27,6 @@
2627
2728
**Maven**
2829

29-
**JDK8 compliant**
3030
```xml
3131
<dependency>
3232
<groupId>org.bsc.langgraph4j</groupId>
@@ -35,10 +35,6 @@
3535
<dependency>
3636
```
3737

38-
**JDK17 compliant**
39-
> _work in progress_
40-
41-
4238
### Define the agent state
4339

4440
The main type of graph in `langgraph` is the `StatefulGraph`. This graph is parameterized by a state object that it passes around to each node.
@@ -190,6 +186,47 @@ return app.stream( inputs );
190186
* [Agent Executor](agent-executor/README.md)
191187
* [Image To PlantUML Diagram](image-to-diagram/README.md)
192188
* [Adaptive RAG](adaptive-rag/README.md)
189+
190+
# Playground Webapp
191+
192+
It is available an **embed playground webapp** able to run a Langgraph4j workflow in visual way.
193+
194+
## Maven
195+
196+
```xml
197+
<dependency>
198+
<groupId>org.bsc.langgraph4j</groupId>
199+
<artifactId>langgraph4j-server-jetty</artifactId>
200+
<version>1.0-SNAPSHOT</version>
201+
<dependency>
202+
```
203+
204+
## Sample
205+
206+
### Code
207+
```java
208+
StateGraph<AgentState> workflow = new StateGraph<>( AgentState::new );
209+
210+
// define your workflow
211+
212+
...
213+
214+
// compile workflow
215+
CompiledGraph<AgentState> app = workflow.compile();
216+
217+
// connect playgroud webapp to workflow
218+
var server = LangGraphStreamingServer.builder()
219+
.port(8080)
220+
.title("LANGGRAPH4j - TEST")
221+
.addInputStringArg("input")
222+
.build(app);
223+
// start playground
224+
server.start().join();
225+
226+
```
227+
### Demo
228+
![result](assets/playground-demo.gif)
229+
193230
# References
194231

195232
* [LangGraph - LangChain Blog][langgraph.blog]

assets/playground-demo.gif

608 KB
Loading

0 commit comments

Comments
 (0)