Replies: 1 comment
-
Hey Jonathan! If I understand correctly, you want to do something different (e.g. invoke another actor) based on a condition. This can be done using guarded transitions 📖. For example, you can target a different state that invokes a different actor. If that's not what you want, can you share some pseudocode or explain your use-case a bit more? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I apologize if this is really obvious and I just missed it int he examples. I am trying to figure out how I can conditionally choose the next actor/agent in a particular flow. I was hoping to setup a method that can determine this condition and add the method as an actor, but maybe I am thinking about this wrong.
I am still very new to the XState and AI Agents and have been trying to come up to speed by looking at your examples. Would I be looking to use fromDecision or guard to accomplish this like in this example: https://github.com/statelyai/agent/blob/094bb8a159305d3c2721a19fce205e7ef5320ecb/examples/example.ts
Is there an example somewhere that is closer to my use case that I could take a look at?
I really appreciate any help you can provide.
Best,
Jonathan
Beta Was this translation helpful? Give feedback.
All reactions