Skip to main content

agent-prompts

ai-research-agent / agents/agent-prompts

Generate

getAgentPrompts()

function getAgentPrompts(agentName, options?): () => object

Agent Prompts

  1. summarize-bullets:
    • article
  2. summarize:
    • article
  3. suggest-followups:
    • chat_history
    • article
  4. answer:
    • chat_history
    • query
  5. query-resolution:
    • chat_history
    • query
  6. knowledge-graph-nodes:
    • query
    • article
  7. summary-longtext:
    • article
    • sections

Returns an object with agent prompts based on the provided agent name and options Uses regex to detect any variables in %7Bbrackets%7D in the prompts and replace them with values from the options object Values inside brackets must be the matching variable name

Parameters

ParameterTypeDescription

agentName

string

The name of the agent to generate prompts for.

options?

Object

An options object that can contain the following properties:

  • context: An object containing context variables to be used when generating the prompts.

Returns

Function

An object with agent prompts.

Returns

object

NameType
promptstring
variablesNotProvided[]

Author

ai-research-agent (2024)

Example

var prompt = getAgentPrompts("summarize-bullets", {article})