Skip to content

v0.22.0

Choose a tag to compare

@kid7st kid7st released this 28 Sep 02:04
d5bc7b4

An agent is now a fastagent/ folder you add to a project, and it inherits the machine it runs on. The unit of scheduled work is a routine. Deployments keep their workspace across restarts and releases, and they carry the whole value file. The session control plane is a pure control plane over one data plane, and nothing fastagent serves holds a credential of its own. Underneath: pi 0.87 and a move of the runtime onto Effect.

Upgrading from 0.21

Most agents need four edits. Do them in this order:

  1. Layout (#532, #615): the definition lives in a subdirectory (./fastagent/), and the workspace is always its parent. If your fastagent.config.* sits at a repository root, move the definition into ./fastagent/. Otherwise the repository's parent becomes the workspace.
  2. Config file (#530): only fastagent.config.ts is read. Rename a .js/.mjs config.
  3. Routines (#584): rename schedules/ → routines/ and defineSchedule({ cron, prompt }) → defineRoutine({ prompt, cron }). http.trigger → http.run, POST /trigger → POST /run.
  4. Deployments: re-run fastagent deploy <host> --force once. Artifacts generated by 0.21 no longer match, and --run refuses to deploy from them until they are regenerated.

Breaking

Placement and config

  • The workspace is always the agent directory's parent (#615). init always scaffolds into a subdirectory; --flat, --agent-dir . and --minimal are gone (#532).
  • One config filename, fastagent.config.ts (#530). Unknown keys fail at load. Keys removed in this release: http.host (#609; the bind address is --bind only), deploy.secrets (#611), selfSchedule (#612).
  • --auth-path is gone from the CLI; use FASTAGENT_AUTH_PATH (#527). --sessions-dir / FASTAGENT_SESSIONS_DIR and chat --session are gone: sessions live at <state root>/sessions and move with FASTAGENT_STATE_DIR (#561).
  • dev binds 127.0.0.1 by default; start still binds all interfaces (#519).

Routines and wake-ups

  • Routines replace schedules (see Upgrading). A routine without a cron is reachable by name only: POST /run, fastagent routine run (#584). fastagent schedule is replaced by fastagent routine list|run|history.
  • wake / unwake are mounted on every serve; selfSchedule is removed (#612).

Channels

  • The GitHub channel is removed: the @fastagent-sh/fastagent/github subpath, githubChannel, fastagent add github (#610).
  • Telegram's default session id is now telegram:<chat> (or telegram:<chat>:<thread>) (#614). Existing Telegram conversations start a new session; history recorded under the bare chat id is not picked up.

Serving and the control plane (#569)

  • POST /invoke is always served unless http.invoke: false (or --no-invoke for one run); a channel declaring that path fails the boot. Writes to /invoke and /control/* require content-type: application/json.
  • POST /control/invoke is gone (connectAgent drives POST /invoke). FASTAGENT_CONTROL_TOKEN is no longer read, and RemoteEndpointOptions.token is gone: add, refresh or sign a gateway credential through fetchFn. Nothing fastagent serves authenticates; put a gateway in front of a public port.
  • fastagent attach is removed (#556).

Deploy

  • deploy --run carries the whole value file (.secrets/.env), and only that file: the shell running deploy is no longer a source (#524, #611). A declared secret with no value stops --run before its first side effect.
  • The deployed model comes from FASTAGENT_MODEL in the value file, or else config.model. deploy --model is gone (#520).
  • Deployments keep the workspace (including uncommitted work), state and credentials across restarts and releases. A release replaces only the definition directory (#496).

API

  • MountableAgent takes one http?: HttpSurface ({ cors?, invoke?, run? }) instead of corsOrigins / serveInvoke / serveRun (#635).
  • createPiAgentFromDir returns auth: { path, fallback? } instead of authPath / fallbackAuthPath. fallbackAuthPath is removed from CreatePiAgentOptions, CreatePiAgentFromDefinitionOptions and CreatePiModelsOptions: a named authPath is an instruction and gets no second layer (#637).
  • ABORTED_CODE and SESSION_BUSY_CODE are exported as values (#591).
  • A package.json that does not parse now fails deploy, start and add with the file named, instead of reading as empty (#642).

New

  • An agent inherits its machine (#597, #629): skills, prompt templates and pi engine settings come from the box as well as the definition, and ~/.fastagent/models.json layers under the agent's own models.json. deploy warns when the model depends on the machine's file, which does not ship.
  • Serving runs the definition's extensions/, one instance per session (#617).
  • Global credentials: an agent reads a provider its own auth.json lacks from ~/.fastagent/.secrets/auth.json (fastagent login -g) (#525).
  • Declared secrets (#507): defineTool / defineChannel / defineRoutine({ secrets }) declare what the code needs and receive the values. dev / start refuse to boot without them, and deploy carries them.
  • fastagent destroy agentcore (#588) removes everything deploy agentcore created, including what lives outside the stack.
  • POST /run runs a declared routine by name, so an external clock can drive a scale-to-zero box (#574, #584).
  • Stopping the running turn from a chat channel (/stop) without publishing /control/* (#541).
  • Session control (#626–#630, #638): state().usage (context usage), entries() names the entry a context_edit targets, pending prompt texts in queue_changed, availableModelsFromDir for a model picker, and a public login entry point a GUI can drive.
  • Tool-argument sampling constrained to the author's schema (#577). fastagent tool reports how much of a result the model would receive (#516).
  • deploy.agentcore.idleTimeoutSeconds (#512).

Fixes

  • deploy railway --run waits until the new volume is attached to the service before deploying, and never mistakes another service's volume for its own. Before this, the first deployment booted without its volume and start refused to run (#646).
  • A long connection outranks a cron as the reason a box must stay up, so generated Fly/Railway plans no longer suggest scaling to zero under a long-connection channel (#640).
  • The L2 opener (createPiAgentFromDefinition) reads credentials through the same layers as the CLI; under FASTAGENT_SECRETS_DIR it no longer falls back to the user-global file (#636).
  • The cron slot claim is atomic across processes; a fire killed mid-turn is recorded as interrupted (#535, #539, #549).
  • Chat channels recover an answer that was generated but never delivered (#536), and drop rate-limited preview frames instead of parking the turn (#501).
  • Startup refuses an agent whose declared tool or routine cannot load (#540).
  • deploy refuses a literal apiKey that would ship inside the image (#523), and requires readiness before a webhook points at Fly or Railway (#518).
  • pi 0.87: compaction admission, dangling tool calls and image handling follow pi's own behavior instead of a local copy (#622–#624).

Full list: v0.21.1...v0.22.0