Skip to content

Releases: statelyai/agent

v0.0.8

16 Mar 14:51
d851ad5
Compare
Choose a tag to compare

Patch Changes

  • #22 8a2c34b Thanks @davidkpiano! - The createSchemas(…) function has been removed. The defineEvents(…) function should be used instead, as it is a simpler way of defining events and event schemas using Zod:

    import { defineEvents } from "@statelyai/agent";
    import { z } from "zod";
    import { setup } from "xstate";
    
    const events = defineEvents({
      inc: z.object({
        by: z.number().describe("Increment amount"),
      }),
    });
    
    const machine = setup({
      types: {
        events: events.types,
      },
      schema: {
        events: events.schemas,
      },
    }).createMachine({
      // ...
    });

v0.0.7

04 Mar 15:03
3e1d02b
Compare
Choose a tag to compare

Patch Changes

v0.0.6

28 Feb 23:44
009b900
Compare
Choose a tag to compare

Patch Changes

v0.0.5

14 Feb 17:45
eb21e78
Compare
Choose a tag to compare

Patch Changes

  • #9 d8e7b67 Thanks @davidkpiano! - Add adapter.fromTool(…), which creates an actor that chooses agent logic based on a input.

    const actor = adapter.fromTool(() => "Draw me a picture of a donut", {
      // tools
      makeIllustration: {
        description: "Makes an illustration",
        run: async (input) => {
          /* ... */
        },
        inputSchema: {
          /* ... */
        },
      },
      getWeather: {
        description: "Gets the weather",
        run: async (input) => {
          /* ... */
        },
        inputSchema: {
          /* ... */
        },
      },
    });
    
    //...

v0.0.4

03 Feb 14:59
d1e0259
Compare
Choose a tag to compare

Patch Changes

v0.0.3

29 Jan 21:37
c2400bf
Compare
Choose a tag to compare

Patch Changes

  • #1 3dc2880 Thanks @mellson! - Adds a convenient way to run the examples with pnpm example ${exampleName}. If no example name is provided, the script will print the available examples. Also, adds a fun little loading animation to the joke example.