Skip to main content
This tutorial continues from the quickstart. Use the research-assistant project you created there, with your model, instructions, and a working mda dev setup. mda init may also scaffold files such as identity and sandbox/. Leave those as they are; this tutorial does not change them. This guide replaces the quickstart’s built-in provider search with an authored Tavily search tool, enables durable memory, adds a daily schedule, then deploys.
Managed Deep Agents is in public beta and available on LangSmith Cloud in the US region only.

Extend the agent

1

Add a custom search tool

Built-in provider search is convenient for a first run. Authored tools give you more control: choose the search API, tune parameters, and keep the tool code in your project.
If you followed the steps to use Tavily in the Quickstart, skip to the next step.
Add a Tavily API key to .env:
.env
Install the Tavily client:
Create a custom internet_search tool:
tools/search.py
Replace the provider search tool dict with your authored tool. Keep the model value from the quickstart:
agent.py
Restart mda dev if it is already running. In Studio, ask:
Confirm the agent calls internet_search and returns an answer with citations. For more authored tools, see Custom tools.
2

Update the instructions for memory

Extend instructions.md so the agent knows what shared knowledge to keep. Keep the research behavior and add a memory policy:
instructions.md
3

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.py
Memory is shared across the deployment and visible to all callers, so do not store personal data or secrets.Restart 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.
4

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
If memory is empty on the first fire, the agent still returns open questions.mda deploy reconciles this schedule into a LangSmith cron job after the deployment is live. After you deploy in the next step, you should see:
  • mda deploy finish without schedule errors (do not pass --no-wait, or schedules are not reconciled).
  • A managed cron for this file on the deployment. The schedule name matches the module stem: daily_digest (Python) or daily-digest (TypeScript).
  • No immediate digest run from this cron. The first fire waits until 8:00 America/Los_Angeles on a weekday.
For thread behavior and constraints, see Schedules.
5

Deploy and inspect

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.Open that URL and confirm:
  • The deployment is ready.
  • The daily_digest or daily-digest cron exists.
  • A test chat run shows model calls, internet_search tool calls, and memory reads or writes in the traces.
For deploy flags and troubleshooting, see Deploy an agent and the CLI reference.

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.

Evals

Author Harbor tasks and compile the managed agent for Harbor.