마스트라.getEditor()
그만큼.getEditor()메서드는 Mastra 인스턴스에 구성된 편집기 인스턴스를 검색하는 데 사용됩니다. 편집기는 저장된 Agent, Prompt 블록, MCP 클라이언트, 채점자, 스킬 및 작업 영역을 프로그래밍 방식으로 관리하기 위한 CRUD 네임스페이스를 노출합니다.
사용예사용예에 대한 직접 링크
import { Mastra } from '@mastra/core'
import { MastraEditor } from '@mastra/editor'
const mastra = new Mastra({
editor: new MastraEditor(),
})
const editor = mastra.getEditor()
const agent = await editor?.agent.create({
id: 'support-agent',
name: 'Support Agent',
instructions: 'Help customers with their questions.',
})
매개변수매개변수에 대한 직접 링크
이 메서드는 매개변수를 허용하지 않습니다.
보고보고에 대한 직접 링크
editor:
MastraEditor | undefined
구성된 편집기 인스턴스입니다. 편집기가 구성되지 않았으면 undefined입니다.