Stateful Agent #249
Closed
Archento
started this conversation in
uAgent Ideas
Replies: 1 comment
-
PR #259 opened |
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
-
Summary
The idea is that an agent should behave differently based on an internally managed state, i.e. the existing handlers would trigger not only on incoming messages but also depending on predefined-states. (also applies to interval handlers)
Current Situation
Right now this can be achieved by using variables in memory or
ctx.storage
together with varying depths ofif-else
conditions.The downside of this is an unnecessary increase of code complexity especially if the use-case requires some form of multi-step sequential behaviour.
Proposal
This implementation approach implies that the developer would still be responsible for managing the states and state changes and for ensuring that the agent will not end in an unusable state or infinite loop.
Goal
Ideally this feature will be lean enough to end up as a permanent uagents feature, giving developers the possibility to attach a state to their handlers if they need one. Otherwise this could also be seen as a uagents module that developers import on demand.
Beta Was this translation helpful? Give feedback.
All reactions