Skip to content

feat: info().agent carries the program's name, a description and conversation starters - #986

Merged
kid7st merged 3 commits into
mainfrom
feature/agent-starters-info
Nov 9, 2026
Merged

kid7st merged 3 commits into
mainfrom
feature/agent-starters-info

Conversation

@kid7st

@kid7st kid7st commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #894: author-written conversation starters and the program's name for clients. The avatar from that issue is not included.

Behavior

info() gains an agent group; name stays the instance's name.

{
  name,                                       // the instance's name (one path segment)
  agent: { name, description?, starters? },   // how the agent presents itself
  commands, tools, models, defaultModel
}
  • agent.name is the program's name: package.json's name, else the directory's. It is always present.
  • agent.description is the instance's description, else package.json's description.
  • agent.starters are example first messages. A client may put one in a composer as an editable draft; reading or choosing one never sends anything.

Where each value is written:

package.json fastagent.config.ts fastagent.json
name the program's name removed the instance's name (unchanged)
description the program's description removed optional, replaces it for this instance
starters none defaults.starters optional, overrides the default

starters and description are validated by the instance configuration's JSON Schema (at most 6 starters of at most 200 characters, none blank), so the program's defaults and fastagent.json share one check, and fastagent build publishes it for editors. Sources are recorded like any other value.

fastagent info prints the program's name (when it differs from the instance's), the description and the starters, and --json adds agent with the same three values.

The definition now carries description from package.json, and fastagent build writes it into the generated entry beside name and version.

Breaking changes

No compatibility layer, per the maintenance policy.

  • info().description is now info().agent.description (SPEC.md §3).
  • AgentConfig.name is removed: it changed definition.name but not dist/package.json's name, so the two could disagree. Set the name in package.json.
  • description is no longer a fastagent.config.ts key; both now fail as unknown key.

Verification

npm run lint, npm run typecheck, npm test (195 files, 2387 tests). New tests: in-process and HTTP conformance of info().agent, the package.json to info() wiring with an instance override, the resolved config's sources, and refusals of invalid description and starters.

Known limitations

  • An already built dist/ that sets name in its config still opens, since a built config is not re-checked.
  • No avatar.

…ersation starters

An instance's name was the only name info() reported, and a client had no
author-written starters to offer. info() now has an agent group beside
the instance's name.
@kid7st
kid7st requested a review from Sukitly as a code owner November 9, 2026 03:27
@kid7st kid7st self-assigned this Nov 9, 2026
@github-actions github-actions Bot added the enhancement New feature or request label Nov 9, 2026
@kid7st
kid7st merged commit 21e8f38 into main Nov 9, 2026
11 checks passed
@kid7st
kid7st deleted the feature/agent-starters-info branch November 9, 2026 03:39
kid7st added a commit that referenced this pull request Nov 9, 2026
## Release v0.30.3

Bump `@fastagent-sh/fastagent` from 0.30.2 to 0.30.3.

## Changed

- **`info()` reports how the agent presents itself** (#986, part of
#894). A new `info().agent` holds `name` (the program's:
`package.json`'s `name`, else the directory's), `description` and
`starters` (example first messages a client may offer as editable
drafts; choosing one sends nothing). `info().name` stays the instance's
name. `fastagent info` prints them, and `--json` adds `agent`.
- `starters` is `defaults.starters` in `fastagent.config.ts`; an
instance's `fastagent.json` may set its own `starters` and
`description`. At most 6 starters of at most 200 characters, none blank,
checked by the instance configuration's JSON Schema.
- The description is the instance's `description`, else
`package.json`'s; the definition now carries it and `fastagent build`
writes it into the generated entry.

## Breaking changes

No compatibility layer, as before 1.0.

- `info().description` is now `info().agent.description`, and
`AgentInfo` has a required `agent`. A client of this version against an
older server fails to decode `info`.
- `AgentConfig.name` is removed from `fastagent.config.ts` (it changed
`definition.name` but not `dist/package.json`'s name). Name the program
in `package.json`.
- `description` is no longer a `fastagent.config.ts` key. Both fail as
`unknown key`.

## Verification

`npm run lint`, `npm run typecheck`, `npm pack --dry-run --json`. The
code is the merge commit of #986, whose full gate (`npm test`: 195
files, 2388 passed, 3 skipped) and CI passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant