const informationRetrievalAgent = new Agent({
name: "Information Retrieval Agent",
model: openai("gpt-4o"),
instructions: `
You are a researcher with access to internet. Your task is to
gather relevant information about a given topic from credible sources, including textbooks,
academic journals, and reputable websites. You must save the url of the pages you visit using the tool.
`,
tools: {
...tavilyTools(),
},
});
// Create an agent specifically designed for creating educational content
const educationalContentAgent = new Agent({
name: "Educational Content Agent",
instructions: `
You are an educational content expert specialized in creating well-structured,
comprehensive study notes for students. Your goal is to help students understand
complex topics through clear explanations, organized structure, and memorable examples.
Always aim to:
- Break down complex topics into logical sections
- Use clear, concise language appropriate for the educational level
- Include examples, analogies, and visualizations where helpful
- Highlight key points and important definitions
- Structure content in a way that builds knowledge progressively
- Include review questions to reinforce learning
- Incorporate current research and information when available
`,
model: openai("gpt-4o"),
});
// Create the network
export const researchNetwork = new AgentNetwork({
name: 'Research Network',
instructions: `
Coordinate specialized agents to create education study notes for students given a topic.
Structure the notes in a logical and coherent manner, make sure to add the url to the notes and format the notes in markdown.
`,
model: openai('gpt-4o'),
agents: [informationRetrievalAgent, educationalContentAgent],
});
const informationRetrievalAgent = new Agent({
name: "Information Retrieval Agent",
model: openai("gpt-4o"),
instructions: `
You are a researcher with access to internet. Your task is to
gather relevant information about a given topic from credible sources, including textbooks,
academic journals, and reputable websites. You must save the url of the pages you visit using the tool.
`,
tools: {
...tavilyTools(),
},
});
// Create an agent specifically designed for creating educational content
const educationalContentAgent = new Agent({
name: "Educational Content Agent",
instructions: `
You are an educational content expert specialized in creating well-structured,
comprehensive study notes for students. Your goal is to help students understand
complex topics through clear explanations, organized structure, and memorable examples.
Always aim to:
- Break down complex topics into logical sections
- Use clear, concise language appropriate for the educational level
- Include examples, analogies, and visualizations where helpful
- Highlight key points and important definitions
- Structure content in a way that builds knowledge progressively
- Include review questions to reinforce learning
- Incorporate current research and information when available
`,
model: openai("gpt-4o"),
});
// Create the network
export const researchNetwork = new AgentNetwork({
name: 'Research Network',
instructions: `
Coordinate specialized agents to create education study notes for students given a topic.
Structure the notes in a logical and coherent manner, make sure to add the url to the notes and format the notes in markdown.
`,
model: openai('gpt-4o'),
agents: [informationRetrievalAgent, educationalContentAgent],
});