Commit Graph

148 Commits

Author SHA1 Message Date
Vercel Release Bot b4132d0895 Version Packages (beta) (#635) 2025-12-18 20:07:06 +01:00
Vercel Release Bot fc6a32d6dc Version Packages (beta) (#607) 2025-12-16 21:05:18 +01:00
Vercel Release Bot 5f61987a58 Version Packages (beta) (#605) 2025-12-12 19:16:54 -08:00
Vercel Release Bot 7018f490e6 Version Packages (beta) (#589)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-12 18:11:25 -08:00
Karthik Kalyanaraman a4b67a9b3a [web] Show chat conversation UI when detecting step spans from DurableAgent (#586)
---------

Signed-off-by: Karthik Kalyanaraman <karthik@scale3labs.com>
2025-12-09 16:35:46 -08:00
Vercel Release Bot 76795b0cd0 Version Packages (beta) (#561) 2025-12-09 09:26:51 -08:00
Vercel Release Bot 6194ded51b Version Packages (beta) (#533) 2025-12-05 15:24:04 -08:00
Vercel Release Bot 60e3a423b7 Version Packages (beta) (#530)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-04 11:30:44 -08:00
Vercel Release Bot 1ea0826fad Version Packages (beta) (#517)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-03 15:50:12 -08:00
Vercel Release Bot 4b79bee16c Version Packages (beta) (#513)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-03 12:07:57 -08:00
Vercel Release Bot 00b12be415 Version Packages (beta) (#499) 2025-12-02 13:01:12 -08:00
Vercel Release Bot 9916f2a4a6 Version Packages (beta) (#447)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-02 10:12:48 -08:00
Nathan Rajlich 172e0151ba Add AI provider step wrapper functions (#428) 2025-11-26 23:51:12 -08:00
Vercel Release Bot 87ad24b3b6 Version Packages (beta) (#416) 2025-11-26 19:55:04 -08:00
Peter Wielander 17904fc7b4 [ai] Pass messages to step functions in DurableAgent and add prepareStep callback (#446) 2025-11-26 19:45:34 -08:00
Vercel Release Bot 018c5a053e Version Packages (beta) (#410) 2025-11-24 15:22:23 -08:00
Julian Benegas aba5264174 [ai] Add onStepFinish callback to DurableAgent#stream() (#404) 2025-11-24 15:10:49 -08:00
Vercel Release Bot e5c0380bbd Version Packages (beta) (#396) 2025-11-24 14:25:39 -08:00
Nathan Rajlich 00e334506c [ai] Make DurableAgent#stream() return a messages array (#362)
* Make `DurableAgent#stream()` return a `messages` array

* Docs updates

* Docs updates

* fix

---------

Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
2025-11-23 11:02:53 -08:00
Vercel Release Bot 7a230a9ad1 Version Packages (beta) (#387)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-22 07:32:12 -08:00
Vercel Release Bot 2856d665c0 Version Packages (beta) (#375)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-20 14:24:12 -08:00
Copilot 154670ae01 Handle FatalError in DurableAgent tool execution (#376)
* Initial plan

* Fix DurableAgent to handle FatalError in tool calls

Convert FatalError exceptions in tool execution to tool-result errors that get
propagated back to the LLM, mimicking AI SDK behavior. Non-fatal errors are
re-thrown to allow workflow retry mechanisms to handle them.

- Updated executeTool to catch FatalError and convert to error-text tool result
- Added comprehensive tests for error handling scenarios
- All tests passing

Co-authored-by: pranaygp <1797812+pranaygp@users.noreply.github.com>

* Address code review feedback and add changeset

Remove unnecessary type assertion and add changeset for the DurableAgent fix

Co-authored-by: pranaygp <1797812+pranaygp@users.noreply.github.com>

* Update packages/ai/src/agent/durable-agent.ts

* Apply suggestion from @pranaygp

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pranaygp <1797812+pranaygp@users.noreply.github.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
2025-11-20 14:17:48 -08:00
Nathan Rajlich 43a3f797d3 [ai] Fix "start" and "finish" chunk events in DurableAgent (#378)
* [ai] Remove "start" and "finish" chunk events

* Wire through sendStart and sendFinish properly

* changeset

---------

Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
2025-11-20 14:16:21 -08:00
Nathan Rajlich 1e636e170d [ai] Make writable property be required in DurableAgent#stream() (#365) 2025-11-20 00:19:35 -08:00
Vercel Release Bot 29892a0f93 Version Packages (beta) (#369) 2025-11-19 11:15:09 -08:00
Vercel Release Bot 70fb4ebc9d Version Packages (beta) (#357)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-19 08:51:25 -08:00
Vercel Release Bot f1b734129a Version Packages (beta) (#354) 2025-11-17 14:19:24 -08:00
Peter Wielander 566681a92a [ai] Add stopCondition to DurableAgent and emit error parts to writeable stream (#353) 2025-11-17 13:53:35 -08:00
Vercel Release Bot c78bec37b0 Version Packages (beta) (#308)
Signed-off-by: Nathan Rajlich <n@n8.io>
2025-11-16 00:31:36 -08:00
Nathan Rajlich 23f5c1d781 Make tools optional in DurableAgent (#350)
Made the `tools` parameter optional in the `DurableAgent` class.

### What changed?

- Updated the `DurableAgentOptions` interface to make the `tools` property optional
- Modified the constructor to initialize `this.tools` with an empty object (`{}`) when `options.tools` is not provided
2025-11-15 19:30:35 -08:00
Nathan Rajlich 45b7b41055 Add support for defining model as a step function initializer in DurableAgent (#346)
Added support for defining `model` as a step function initializer in the AI workflow package.

### What changed?

- Modified the `DurableAgent` class to accept either a string model ID or a function that returns a `LanguageModelV2` instance
- Updated the `doStreamStep` function to handle both string model IDs and function initializers
- Added proper error handling for invalid model initialization arguments

### How to test?

Test both initialization methods:

1. Using a string model ID:
```typescript
const agent = new DurableAgent({
  model: 'anthropic/claude-opus',
  // other options
});
```

2. Using a step function initializer:
```typescript
import { xai } from "@ai-sdk/xai"

const agent = new DurableAgent({
  model: async () => {
    "use step";
    return xai("grok-4");
  },
  // other options
});
```

### Why make this change?

This enhancement provides more flexibility in how language models are initialized and used within the workflow. By supporting function initializers, users can now:

- Use custom model instances with specialized configurations
- Implement more complex model initialization logic that wasn't possible with just string identifiers
2025-11-15 19:24:59 -08:00
Vercel Release Bot 70429e499c Version Packages (beta) (#275) 2025-11-11 11:59:23 -08:00
Vercel Release Bot 7bad9d454f Version Packages (beta) (#230) 2025-11-07 16:39:45 -08:00
Vercel Release Bot 7650c393bf Version Packages (beta) (#226) 2025-11-05 10:24:46 -08:00
Vercel Release Bot f368cd34a5 Version Packages (beta) (#206) 2025-11-05 09:40:03 -08:00
Vercel Release Bot cf84adefda Version Packages (beta) (#205) 2025-11-04 12:22:37 -08:00
Vercel Release Bot 79df3799a3 Version Packages (beta) (#193)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-04 11:15:36 -08:00
Jacob Paris 9e1ab0a27d Add preventClose option to prevent closing writable after agent.stream (#198) 2025-11-03 22:21:51 -08:00
Vercel Release Bot 3c111c5ca6 Version Packages (beta) (#174)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-03 12:51:53 -08:00
Pranay Prakash f973954bd3 Switching from MIT to Apache + DCO (#191)
* Switching from MIT to Apache + DCO

* Add DCO github app
2025-11-03 12:42:40 -08:00
Vercel Release Bot 7bf7a3b026 Version Packages (beta) (#141)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-30 17:45:26 -07:00
Nathan Rajlich 20d51f0d7f Add optional retryAfter property to Step interface (#142) 2025-10-30 13:39:00 -07:00
Jacob Paris 577d2121b8 Use instance API endpoint in WorkflowChatTransport (#146) 2025-10-30 11:13:44 -07:00
Vercel Release Bot 297a281ee9 Version Packages (beta) (#105)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-29 18:09:40 -07:00
Nathan Rajlich 9e0f7b0e0d Add DurableAgent and WorkflowChatTransport doc pages (#44)
Co-authored-by: Adrian <me@adriandlam.com>
2025-10-28 23:45:42 -07:00
Vercel Release Bot 7102f19ff3 Version Packages (beta) (#68)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-27 13:19:36 -07:00
Vercel Release Bot 746bc042d7 Version Packages (beta) (#3)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-25 16:43:35 -07:00
Gal Schlezinger 4ca9a3edbd Introducing Workflow DevKit
build durable, resilient, and observable workflows.

Co-authored-by: Nathan Rajlich <n@n8.io>
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: Adrian <me@adriandlam.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Vercel Release Bot <88769842+vercel-release-bot@users.noreply.github.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
Co-authored-by: Gal Schlezinger <gal@spitfire.co.il>
Co-authored-by: Manuel Muñoz Solera <mamuso@mamuso.net>
Co-authored-by: Garrett <garrett.tolbert@vercel.com>
Co-authored-by: Lars Grammel <lars.grammel@gmail.com>
Co-authored-by: Pooya Parsa <pyapar@gmail.com>
Co-authored-by: Tom Dale <tom@tomdale.net>
Co-authored-by: Vishal Yathish <135551666+visyat@users.noreply.github.com>
Co-authored-by: josh <144584931+dancer@users.noreply.github.com>
2025-10-23 12:07:52 +03:00