# Managed Deep Agents - Quickstart

## Executive summary

This quickstart guides users through scaffolding, configuring, testing, and deploying a Managed Deep Agent (MDA). The process involves using the MDA CLI to initialize a project structure, setting up API keys for model providers (e.g., OpenAI), defining agent instructions (`instructions.mmd`), and integrating tools like web search. Testing is done locally via `MDA dev` in LangSmith Studio before deploying the final version to the production environment.

## Key takeaways

- Project Scaffolding: Use `uv tool install managed deep agents` followed by `MDA innit <project-name>` to scaffold the agent project. This creates necessary files like `agent.py`, `instructions.mmd`, and populates environment variables.
- Agent Configuration: The agent's behavior is defined in `instructions.mmd`. Model selection (OpenAI, Google, Anthropic) and tool definitions (e.g., web search) are configured within the project files.
- Local Development Cycle: To test locally, run `uv sync` to install dependencies, followed by `MDA dev`. This spins up a local LangSmith Studio environment for iteration and testing.
- Production Deployment: Deployment requires a paid Langsmith account. The process syncs context to the Context Hub—a centralized location for instructions and skills that can be edited via UI without redeployment.

## Technical details

- Prerequisites & Setup: Requires Python, UV tool, a LangSmith API key, and an API key for the chosen model provider (e.g., OpenAI).
- CLI Commands: Installation: `uv tool install managed deep agents`. Initialization: `MDA innit <project-name>`. Local Dev Server: `MDA dev`.
- Agent Definition Files: Core agent logic resides in `agent.py`. Instructions are managed and edited in the markdown file `instructions.mmd`.
- Context Management: The Context Hub is a LangSmith feature that stores instructions and skills, allowing for runtime modification of agent context without requiring a full redeployment.

## Practical implications

- The structured workflow provides a clear path for integrating complex LLM agents into production systems.
- Build engineers can leverage the MDA CLI and Context Hub to manage agent configuration (instructions, tools) as code or via centralized UI controls, improving deployment consistency.
- The separation between local development (`MDA dev`) and production deployment ensures rapid iteration without impacting live services.

## Topics

AI Agents, LLM Orchestration, Build Automation, Deployment Pipelines, LangChain Frameworks, LangChain, LangSmith Studio, Managed Deep Agents (MDA) CLI

Source: https://www.youtube.com/watch?v=L54dR9qMKzc
