Skip to content

AgentDeclaration ​

Type, in @jr2/orchestrator/src/agent.ts. The signature of an export, or a type that it names, names this type. The Authoring surface page lists each export. This type is not an export of @jr2/orchestrator, so a workflow module does not import it by name.

ts
type AgentDeclaration = Omit<AgentDefinition, "model"> & {
  model: string | typeof open;
};

What agent() takes: an AgentDefinition, except that model can also be open.

Fields: each field of AgentDefinition, except model, and these:

  • model: string | typeof open

    The model, as <provider>/<modelId>: for example anthropic/claude-haiku-5-5. Required: there is no default model. The provider must be one that jr2.config.ts can reach.

    Or open, in a Machine that you publish as a package. Then the Instance that registers the Machine binds the model with customize(). One Turn may set another model in the invoke's input.

The docs of Kit version 0.5.1. Each page is also at its .md URL.