kreneskyp / ix

Autonomous GPT-4 agent platform
MIT License
1.01k stars 121 forks source link

LangGraph State Machines #452

Open kreneskyp opened 8 months ago

kreneskyp commented 8 months ago

Description

This PR adds State Machine component that compiles into a LangGraph state machine. State machines may be used to create custom agent components and to create collaborative flows. LCEL provide parallel and linear flows, and LangGraph provides looping, state, and branching.

State machines are composed of:

TODO: DIAGRAM

State Machine integrates into standard LCEL based flows seamlessly. The branches may contain most combinations of graphs. Chains will compile into a combination of LangGraph and LCEL automatically.

example: State machine that coordinates with two worker agents.

image

Changes

[List out the changes you've made in this pull request. Be as specific as possible.]

How Tested

[Explain how you tested this pull request. Include any relevant steps or scripts.]

TODOs