Skip to content

researcher ​

Use this agent for syntax, types, control flow, CLI usage, diagnostics, and standard-library APIs. Its built-in tools include the packaged docs and source checks. It can also read the caller's project. For anything outside the language, use researcherAgent from std::agents/researcher, which searches the web and Wikipedia.

This agent has no web or Wikipedia tools, on purpose: an answer about Agency assembled from the open web is usually an answer about some other language.

As an LLM tool it continues the caller's conversation. From code, use a thread block when you want an isolated answer.

Functions ​

buildTools ​

ts
buildTools(): any[]

Return bundled documentation, project lookup, and Agency source-checking tools.

Returns: any[]

(source)

agencyResearcherAgent ​

ts
@guarded(cost: maxCost, time: maxTime, keepDraft: keepDraft)
agencyResearcherAgent(
  question: string,
  context: string = "",
  maxCost: number = $10.00,
  maxTime: number = 10m,
  model: string = "",
  provider: string = "",
  extraTools: any[] = [],
  keepDraft: boolean = true,
  offerSaveDraft: boolean = true,
): Result<string>

Answer a question about the Agency language from the bundled documentation, naming the page each claim came from.

Parameters:

NameTypeDefaultDescription
questionstringThe question about Agency
contextstring""Extra material folded into the prompt, or ""
maxCostnumber$10.00Cost budget in USD.
maxTimenumber10mTime budget in milliseconds.
modelstring""Model override, or "" for the ambient model
providerstring""Provider for the model override, ignored when model is empty.
extraToolsany[][]Extra tools to offer the LLM, appended to the built-in set
keepDraftbooleantrueFalse returns a budget failure even when a draft was saved.
offerSaveDraftbooleantrueFalse keeps saveDraft out of the model's tools, for a caller that never reads the draft.

Returns: Result<string>

Throws: std::guard

(source)