FunctionsAgents
Agent Prompts
ai-research-agent / agents/agent-prompts
Generate
AGENT_PROMPTS
const AGENT_PROMPTS: (
| {
after: any;
before: (prompt: any, params: any) => any;
name: string;
template: string;
}
| {
after: (content: any, options: object) => any[];
before?: undefined;
name: string;
template: string;
})[];Defined in: src/agents/agent-prompts.js:12
Agent prompt templates which have in brackets the needed variables and reformat the response in json with a callback.
extractJSONFromLanguageReply()
function extractJSONFromLanguageReply(text: string, key?: string): any[];Defined in: src/agents/agent-prompts.js:331
Extracts and cleans content between XML-style tags and returns a JSON object.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
|
|
| Input text to parse |
|
|
| Tag name to look for |
Returns
any[]
Array of objects containing cleaned content items