> Discover all available pages from the documentation index: https://mastra.zisheng.pro/ko/llms.txt # AgentNetwork에서 다음으로 마이그레이션`.network()` 현재`v0.20.0`\~을 위한`@mastra/core`, 다음 변경 사항이 적용됩니다. ## AI SDK v4에서 v5로 업그레이드 - 모든 Model 제공자 패키지를 메이저 버전으로 업그레이드하세요. > **노트:** 이렇게 하면 이제 모든 Model이 v5 Model이 됩니다. ## Memory가 필요합니다 - 이제 Agent 네트워크가 제대로 작동하려면 Memory가 필요합니다. > **노트:** Agent에 대한 Memory를 구성해야 합니다. ## 마이그레이션 경로 `AgentNetwork` 프리미티브를 사용 중이라면 `AgentNetwork`를 `Agent`로 교체할 수 있습니다. 전에: ```typescript import { AgentNetwork } from '@mastra/core/network' const agent = new AgentNetwork({ name: 'agent-network', agents: [agent1, agent2], tools: { tool1, tool2 }, model: 'openai/gpt-5.6-sol', instructions: 'You are a network agent that can help users with a variety of tasks.', }) await agent.stream('Find me the weather in Tokyo.') ``` 후에: ```typescript import { Agent } from '@mastra/core/agent' import { Memory } from '@mastra/memory' const memory = new Memory() const agent = new Agent({ id: 'agent-network', name: 'agent-network', agents: { agent1, agent2 }, tools: { tool1, tool2 }, model: 'openai/gpt-5.6-sol', instructions: 'You are a network agent that can help users with a variety of tasks.', memory, }) await agent.network('Find me the weather in Tokyo.') ``` `NewAgentNetwork` 프리미티브를 사용 중이라면 `NewAgentNetwork`를 `Agent`로 교체할 수 있습니다. 전에: ```typescript import { NewAgentNetwork } from '@mastra/core/network/vnext' const agent = new NewAgentNetwork({ id: 'agent-network', name: 'agent-network', agents: { agent1, agent2 }, workflows: { workflow1 }, tools: { tool1, tool2 }, model: 'openai/gpt-5.6-sol', instructions: 'You are a network agent that can help users with a variety of tasks.', }) await agent.loop('Find me the weather in Tokyo.') ``` 후에: ```typescript import { Agent } from '@mastra/core/agent' import { Memory } from '@mastra/memory' const memory = new Memory() const agent = new Agent({ id: 'agent-network', name: 'agent-network', agents: { agent1, agent2 }, workflows: { workflow1 }, tools: { tool1, tool2 }, model: 'openai/gpt-5.6-sol', instructions: 'You are a network agent that can help users with a variety of tasks.', memory, }) await agent.network('Find me the weather in Tokyo.') ```