Agent SDK
#1742
Replies: 1 comment
-
Agree on the notion of the idea. I've extracted a set of three tasks to act as a generic Evaluator Optimizer and really like how it feels Unsure i this basic loop should sit natively within trigger, be upstreamed to ai-sdk, or just be cookbook examples. But if there's help on llm streaming and metadata sharing that might be worth it. (edit: also eagerly awaiting v2) |
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
-
Depending on your definition of an Agent, Trigger.dev is already a pretty great platform for building and executing them, with the ability to wait, trigger subtasks dynamically, observe everything that is going on, and not have to worry about timeouts. Combined with Build Extensions allowing you to add all sorts of great packages to your builds, like ffmpeg and chrome, we're uniquely positioned for the agent-sphere.
One thing we're currently not very good at is the "agent-loop" where each iteration continues from some external event. With Run Engine v2 and our new waitpoints (and
wait.forToken
), it will start to be possible to pause execution while waiting for an external event.We should provide an easy way to run an "agent" loop inside a task that uses our Realtime system + Run engine v2.
A manual example
Here's an example of doing this completely manually:
Using a built-in helper function
We could provide a helper function like so to make this standardized:
Beta Was this translation helpful? Give feedback.
All reactions