Managed Deep Agents 퀵스타트
Managed Deep Agents 퀵스타트
mda CLI로 첫 번째 Managed Deep Agent를 만들고 배포할 수 있어요.
첫 번째 Managed Deep Agent를 만들고 배포해 보세요: 프로젝트를 스캐폴딩하고, 모델과 지시사항을 구성하고, 검색을 추가한 다음, LangSmith Studio에서 테스트하고, mda CLI로 배포합니다. Managed Deep Agents는 Deep Agents 하네스와 호스팅 런타임을 제공합니다.
이 퀵스타트 이후 튜토리얼은 같은 프로젝트에 영구 메모리와 일일 스케줄을 추가합니다.
Managed Deep Agents는 공개 베타 상태이며 LangSmith Cloud의 미국 지역에서만 사용할 수 있어요.
출처: 문서
본문
사전 요구사항 (Prerequisites)
따라 하려면 다음이 필요합니다:
- Node.js와 npm.
- 선택한 모델 공급자의 API 키.
managed-deep-agents 스킬 추가하기
managed-deep-agents 스킬은 코딩 에이전트가 mda CLI로 Managed Deep Agent를 빌드, 테스트, 배포하는 과정을 안내합니다. 현재 프로젝트에 추가하려면 실행하세요:
npx skills add langchain-ai/langchain-skills --skill managed-deep-agents --yes
또는 이 프롬프트를 코딩 에이전트에 붙여넣으세요:
<Prompt description="Build a Managed Deep Agent with the quickstart" icon="sparkles" actions={["copy"]}> Create and deploy a Managed Deep Agent in this working directory by following the Managed Deep Agents quickstart.
Step 1: Read the guide
Fetch and follow https://docs.langchain.com/langsmith/managed-deep-agents-quickstart.md as the source of truth for CLI commands, project layout, and deployment steps. Prefer the Python or TypeScript path that matches this project.
Step 2: Install the skill
If the managed-deep-agents skill is not already available, install it:
npx skills add langchain-ai/langchain-skills --skill managed-deep-agents --yes
Use that skill for the rest of the workflow when it is available.
Step 3: Prerequisites and secrets
Confirm the user has LangSmith access and any required model or search credentials. If a required API key is missing, ask them to set it in the shell or a .env file, then wait. Do not invent, hardcode, or commit secrets.
Step 4: Scaffold, configure, test, and deploy
Follow the quickstart steps in order: initialize the project with mda, configure the model and instructions, add search as shown on the page, test in LangSmith Studio, and deploy with the mda CLI. Stop and ask when a dashboard action or credential can only be completed by the user in the LangSmith UI.
Rules
- Stay scoped to the quickstart. Do not add unrelated products or rewrite the generated project layout unless the guide requires it.
- Prefer the
mdaCLI and themanaged-deep-agentsskill over inventing a custom deployment path. - Ask rather than guess when a secret, plan-tier limit, or UI-only step is unclear.
에이전트 생성 및 배포하기 (Create and deploy an agent)
프로젝트 설정하기 (Set up the project)
프로젝트를 만들고 디렉터리를 엽니다:
npx managed-deepagents init research-assistant
cd research-assistant
pnpm dlx managed-deepagents init research-assistant
cd research-assistant
bunx managed-deepagents init research-assistant
cd research-assistant
이제 에이전트를 위한 모든 스캐폴딩이 준비되었습니다.
키 추가하기 (Add your keys)
모델 공급자 API 키를 .env에 추가합니다:
OPENAI_API_KEY=<OPENAI_API_KEY>
# ANTHROPIC_API_KEY=<ANTHROPIC_API_KEY>
# GOOGLE_API_KEY=<GOOGLE_API_KEY>
이 퀵스타트는 기본적으로 OpenAI를 사용합니다. 다음 단계에서 Google 또는 Anthropic을 선택하면 해당 공급자의 API 키를 대신 설정하세요. mda deploy는 공급자 키를 배포에 추가합니다. 다른 채팅 공급자도 사용할 수 있습니다.
.env파일을 버전 관리에 커밋하지 마세요. 여기에는 비밀번호가 포함되어 있습니다.
LangSmith 설정하기 (Set up LangSmith)
Managed Deep Agents는 LangSmith에서 실행됩니다. LangSmith API 키는 mda dev로 로컬 개발을 인증하고, mda deploy로 에이전트를 배포하며, LangSmith Studio에서 에이전트를 열어 채팅하고 트레이스를 검사합니다.
아직 계정이 없다면 LangSmith에 가입하세요.
LangSmith API 키를 만들려면 설정(Settings)을 열고 API 키(API Keys) 로 이동한 다음 API 키 생성(Create API Key) 을 클릭합니다. 자세한 내용은 계정 및 API 키 생성을 참고하세요.
LangSmith API 키를 .env에 추가합니다:
LANGSMITH_API_KEY=<LANGSMITH_API_KEY>
지시사항 편집하기 (Edit the instructions)
instructions.md를 열고 에이전트가 어떻게 동작해야 하는지 설명합니다:
# Research assistant
You are a careful research assistant. Use internet search to find sources,
keep notes, and return concise answers with citations.
배포하면 Managed Deep Agents는 이 지시사항을 LangSmith Context Hub에 동기화하며, 에이전트를 재배포하지 않고도 업데이트할 수 있습니다.
모델 및 검색 구성하기 (Configure your model and search)
이제 모델과 내장 웹 검색 도구를 설정합니다. Google, OpenAI, Anthropic은 추가 패키지나 API 키 없이 서버 측 검색을 제공합니다. 모델과 일치하는 공급자 도구 딕셔너리를 전달하세요:
agent.ts를 엽니다:
import { defineDeepAgent } from "managed-deepagents";
// OpenAI의 내장 웹 검색 — 추가 설치나 API 키 불필요
export const agent = defineDeepAgent({
name: "research-assistant",
model: "openai:gpt-5.5",
tools: [{ type: "web_search_preview" }],
});
import { defineDeepAgent } from "managed-deepagents";
// Google의 내장 검색 — 추가 설치나 API 키 불필요
export const agent = defineDeepAgent({
name: "research-assistant",
model: "google-genai:gemini-3.6-flash",
tools: [{ google_search: {} }],
});
import { defineDeepAgent } from "managed-deepagents";
// Anthropic의 내장 웹 검색 — 추가 설치나 API 키 불필요
export const agent = defineDeepAgent({
name: "research-assistant",
model: "anthropic:claude-sonnet-4-6",
tools: [{ type: "web_search_20250305", name: "web_search" }],
});
에이전트 이름은 기본 배포 이름이기도 합니다. 모델 개념과 공급자 옵션은 Models을 참고하세요.
TAVILY_API_KEY=<TAVILY_API_KEY>
Tavily 클라이언트를 설치합니다:
npm install @langchain/tavily
pnpm add @langchain/tavily
bun add @langchain/tavily
커스텀 internet_search 도구를 만듭니다:
import { TavilySearch } from "@langchain/tavily";
import { tool } from "langchain";
import { z } from "zod";
export const internetSearch = tool(
async ({ query, maxResults = 5, topic = "general" }) => {
const tavilySearch = new TavilySearch({
maxResults,
tavilyApiKey: proces...KEY,
topic,
});
return tavilySearch._call({ query });
},
{
name: "internet_search",
description: "Search the internet for relevant sources.",
schema: z.object({
query: z.string().describe("The search query."),
maxResults: z.number().optional().default(5),
topic: z.enum(["general", "news", "finance"]).optional().default("general"),
}),
},
);
도구를 가져와 에이전트에 추가합니다:
import { defineDeepAgent } from "managed-deepagents";
import { internetSearch } from "./tools/search";
export const agent = defineDeepAgent({
name: "research-assistant",
model: "openai:gpt-5.5",
tools: [internetSearch],
});
더 많은 작성 도구는 Custom tools를 참고하세요.
로컬에서 실행하기 (Run locally)
프로젝트 의존성을 설치하고 에이전트를 시작합니다:
npm install
npx mda dev
pnpm install
pnpm exec mda dev
bun install
bunx mda dev
mda dev는 .env에서 API 키를 로드하고, 로컬 Agent Server를 시작하며, LangSmith Studio에서 에이전트를 엽니다.
Studio에서 다음을 보내세요:
What were the main announcements from the latest LangChain release?
에이전트가 웹 검색 도구를 호출한 다음 출처를 인용하는 간결한 답변을 반환하는 것을 볼 수 있어야 합니다. 트레이스에 검색이 나타나지 않으면 공급자 도구 딕셔너리가 agent.py 또는 agent.ts에 설정한 모델과 일치하는지 확인하세요.
자세한 내용은 LangSmith Studio로 로컬 개발을 참고하세요.
에이전트 배포하기 (Deploy the agent)
다음을 실행해 프로젝트를 배포합니다:
npx mda deploy
pnpm exec mda deploy
bunx mda deploy
Managed Deep Agents는 프로젝트를 패키징하고 LangSmith Agent Server에서 호스팅 배포로 실행합니다. 배포가 끝나면 CLI가 배포 대시보드 URL을 출력합니다.
해당 URL을 엽니다. 배포가 준비 상태인 것을 볼 수 있어야 합니다. 이전 단계와 같은 연구 질문을 보내고 호스팅 에이전트가 검색 도구 호출과 함께 답변을 반환하는지 확인하세요. 배포 옵션과 비밀번호 처리는 Managed Deep Agent 배포를 참고하세요. 실행 후 에이전트의 실행을 검사하려면 LangSmith observability를 사용하세요.
다음 단계 (Next steps)
- 튜토리얼 — 커스텀 Tavily 검색 도구, 영구 메모리, 일일 스케줄을 추가하세요.
- 커스텀 도구 — 프로젝트에서 작성한 LangChain 도구를 추가하세요.
- 연결 — 에이전트로 또는 호출자로 외부 서비스에 인증하세요.
더 알아보기 (Learn more)
- 이 문서들을 사용하기 — MCP를 통해 Claude, VSCode 등에 연결하여 실시간 답변을 받아 보세요.
- GitHub에서 이 페이지 편집 또는 이슈 등록