5 ms·
Temporal makes this easy and works great for such use cases. It's what I'm using for my own AI agents.
by ehsanu1 2y ago
Temporal makes this easy and works great for such use cases. It's what I'm using for my own AI agents.
- dhorthy 2y agoah very cool! are there any things you wish it did or any friction points? What are the things that "just work"?
- ehsanu1 2y agoEssentially, you don't need to think about time and space. You just write more or less normal looking code, using the Temporal SDK. Except it actually can resume from arbitrarily long pauses, waiting as long as it needs to for some signal, without any special effort beyond using the SDK. You also automatically get great observability into all running workflows, seeing inputs and outputs at each step, etc. The cost of this is that you have to be careful in creating new versions of the workflow that are backwards compatible, and it's hard to understand backcompat requirements and easy to mess up. And, there's also additional infra you need, to run the Temporal server. Temporal Cloud isn't cheap at scale but does reduce that burden.
- dhorthy 2y agohelpful - thanks! I have played with temporal a bit but have this thought that since most AI tools represent state as just a rolling context window, maybe you don't have to serialize and entire call stack and you can cut a bunch of corners. but we're all probably better off not investing that wheel
- ehsanu1 2y agoIMO just a rolling message history works for only the simplest of AI tools. Useful agents will tend towards much more complex state that extends into specific verticals/domains.
- dhorthy 2y agois that because of more deterministic AI flows like llm-as-judge, rag reranker, post-eval, etc? do you think something like langgraph state is sufficient?