|
11 | 11 |
|
12 | 12 | | Date | Release | info
|
13 | 13 | |--------------| --- | ---
|
| 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) |
14 | 15 | | Jun 21, 2024 | `1.0-SNAPSHOT` | Add support of [Mermaid] diagram generation - [issue #5](https://github.com/bsorrentino/langgraph4j/issues/5)
|
15 | 16 | | Jun 19, 2024 | `1.0-SNAPSHOT` | Add [adaptive rag](adaptice-rag/README.md) sample
|
16 | 17 | | Jun 10, 2024 | `1.0-SNAPSHOT` | Refactoring how generate graph representation (plantuml)
|
|
26 | 27 |
|
27 | 28 | **Maven**
|
28 | 29 |
|
29 |
| -**JDK8 compliant** |
30 | 30 | ```xml
|
31 | 31 | <dependency>
|
32 | 32 | <groupId>org.bsc.langgraph4j</groupId>
|
|
35 | 35 | <dependency>
|
36 | 36 | ```
|
37 | 37 |
|
38 |
| -**JDK17 compliant** |
39 |
| -> _work in progress_ |
40 |
| -
|
41 |
| - |
42 | 38 | ### Define the agent state
|
43 | 39 |
|
44 | 40 | 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 );
|
190 | 186 | * [Agent Executor](agent-executor/README.md)
|
191 | 187 | * [Image To PlantUML Diagram](image-to-diagram/README.md)
|
192 | 188 | * [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 | + |
| 229 | + |
193 | 230 | # References
|
194 | 231 |
|
195 | 232 | * [LangGraph - LangChain Blog][langgraph.blog]
|
|
0 commit comments