mda dev locally. Then add a search tool, use durable memory, run the agent on a daily schedule, and deploy it to LangSmith.
Managed Deep Agents is in public beta and available on LangSmith Cloud in the US region only.
Build the agent
1
Write the instructions
Replace
instructions.md with the research assistant’s behavior. The instructions reference the tool you add next and the shared durable memory you explicitly enable later in this tutorial:instructions.md
2
Add a search tool
Create a Import the tool into the agent entry and pass it to the definition:For more on authored tools, see Custom tools.
tools/ module with a search tool, then import it into the agent entry. This example returns a placeholder result, so it runs without an external API. Replace the body with a call to your search provider.tools/search.py
agent.py
3
Run the agent locally
Install dependencies and start the local dev server:
uv
mda dev opens the agent in LangSmith Studio. Send a question and confirm the agent calls web_search and answers with the returned snippets.4
Enable and use durable memory
Durable memory is opt-in. Before asking the agent to remember anything, add a memory declaration at the project root:Memory is shared across the deployment and visible to all callers, so do not store personal data or secrets.Restart
memory.py
mda dev so it discovers the new file. In one thread, ask the agent to research a release and to record a reusable project rule, such as “For release research, check the official changelog before secondary sources.” Then create a new thread in Studio and ask how it will research the next release. Confirm that it applies the shared rule even though the new thread has no conversation history.See Memory for details.5
Schedule a daily digest
Add a
schedules/ module so the agent runs on a cron cadence without a user message. This schedule runs every weekday at 8am Pacific:schedules/daily_digest.py
mda deploy reconciles this schedule into a LangSmith cron job after the deployment is live. For thread behavior and constraints, see Schedules.6
Deploy the agent
Deploy the project to LangSmith:On success, the CLI prints the deployment dashboard URL. The deploy syncs the instructions to Context Hub, uploads the compiled project, and reconciles the daily schedule. For deploy flags and troubleshooting, see Deploy an agent and the CLI reference.
7
Inspect the run
Open the printed URL in LangSmith to inspect build status and revisions. Open traces to inspect the agent’s inputs, model calls,
web_search calls, memory reads and writes, and final responses.Next steps
Custom middleware
Add logging, retries, limits, and guardrails around model and tool calls.
Identity
Authenticate callers and use verified identity in tools and middleware.
Memory
Persist shared procedural and project knowledge across threads.
Evals
Author Harbor tasks and compile the managed agent for Harbor.
Sandboxes
Configure isolated filesystem and shell access for agent work.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

