Skip to content
providerkit
GitHub

Agents

Give an agent a task:

await assistant.run("List the tasks.");

Set up this offline assistant. It returns two example tasks without calling a live model.

Agents 0.4.3 is an experimental package built on Core. It runs tools, coordinates specialists and records execution so your host can save and resume work. Its API may change before 1.0.

Use an agent when a model should choose the next tool. Use a workflow when your code chooses the steps. Both share child execution, request handling and tree-wide limits.

You decide who may run a tool, approve it or resume saved work. Snapshots contain private input and execution data. Keep them out of browser responses and use React’s server projector for the fields a viewer may see.

The main entry has no database, queue or vendor SDK dependency. Background runs use your existing run service, not an SDK scheduler. A checkpoint or idempotency key alone does not prove that an interrupted external action did not happen.

Core owns provider routing and stream retries. Agents adds explicit policies for execution recovery and tool retries, without silently replaying unknown work.

Use Core ^0.35.1 or ^0.36.0. Finish old runs before upgrading: format-2 snapshots are not accepted by the format-3 runtime. Replace the old single approval decision with the request-keyed host contract. Execution trees can contain agent, workflow and remote nodes; check kind before reading model journals or workflow steps.

Browse the API or run a complete example.