Skip to content

v0.11.0: Clevix Flow adapters

Choose a tag to compare

@eadwinCode eadwinCode released this 29 Oct 10:50
· 24 commits to main since this release
bfbd16e

agentic-kit can now run on Clevix Flow: the queue, the bus and the run streams. Go module github.com/eadwinCode/agentic-kit/packages/go-agentenkit@v0.11.0, npm agentenkit@0.11.0 and use-agentenkit@0.11.0.

Breaking (Go only)

  • Go 1.27 or newer. flow-sdk needs it, so go-agentenkit does too.

The TS packages have no breaking changes.

New: Clevix Flow adapters (#38, both runtimes)

TS: agentenkit/adapters/flow. Go: adapters/clevixflow.

  • FlowQueue (Go: clevixflow.New), the Queue port. Each job is a Flow run that you can watch in the Flow dashboard.
    • A job key is the run's singleton key, so a key that a live run holds throws DuplicateJobError.
    • A delay is a sleep inside the run. Priority becomes Flow's run priority.
    • cancel, find and stats use Flow's runs API. find and stats lag by a few seconds.
  • agentRunFunction (Go: clevixflow.Functions) makes the Flow function that runs the jobs. Serve it with Flow's serve. When Flow gives up on a run, the job goes to handleDeadJob.
  • FlowBus (Go: clevixflow.NewBus), the EventBus port. One Flow realtime channel per thread, and one socket per thread per process. Big events go through the kv.
  • FlowStreams (Go: clevixflow.NewStreams), the RunStreams port, on Flow streams. Appends go in batches, and big items go through the kv. Time to live and grace are capped at Flow's 7 days.

The bus and the streams need a Kv. You can use any mix: for example FlowQueue with the Redis bus.

Needs: Flow SDK v0.7.0 (TS: @clevix/flow, an optional peer dependency, installed from the flow-sdk release), and Flow engine v2.1.1 or newer.

Limit: a Flow stream holds at most 20,000 items, and an append past that fails. Keep segments short.

See Setup: On Clevix Flow and the examples flow-queue-ts and flow-queue-go.

Other

  • A Go web_fetch test that failed about 1 run in 3 is fixed.