Metadata-Version: 2.4
Name: managed-deepagents
Version: 0.1.3.dev14
Summary: Managed Deep Agents — the define_deep_agent authoring interface plus the CLI that compiles and deploys a code-first Deep Agent repository to a managed LangGraph runtime.
Author: LangChain
License: MIT
Project-URL: Homepage, https://github.com/langchain-ai/managed-deepagents-sdk
Project-URL: Repository, https://github.com/langchain-ai/managed-deepagents-sdk
Keywords: langchain,langgraph,deepagents,agents,cli
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"

<!-- markdownlint-disable MD033 MD041 -->

<div align="center">
  <a href="https://www.langchain.com/langsmith-managed-deep-agents-waitlist">
    <img alt="Managed Deep Agents logo" src="https://raw.githubusercontent.com/langchain-ai/managed-deepagents-sdk/main/.github/assets/logo.png" width="70%">
  </a>
</div>

<div align="center">
  <h3>Python authoring package and CLI launcher for Managed Deep Agents.</h3>
</div>

> [!IMPORTANT]
> **Active development / private beta.** Managed Deep Agents is in active
> development and currently in private beta. The PyPI package API and managed
> runtime contract may change. [Join the
> waitlist](https://www.langchain.com/langsmith-managed-deep-agents-waitlist)
> for access and updates.

`managed-deepagents` is the PyPI package for authoring Managed Deep Agents in
Python. It includes:

- `define_deep_agent`, the Python authoring contract for managed agents.
- `mda`, the CLI used to build and deploy your agent to LangSmith.
- `managed_deepagents.runtime`, the runtime helper used by generated managed
  entry modules.

## Install

```bash
pip install managed-deepagents
```

> [!NOTE]
> **Private beta: dev releases only.** We currently publish only PEP 440
> pre-release (dev) versions and no stable version yet. pip skips pre-releases
> by default, so install with `--pre`:
>
> ```bash
> pip install --pre managed-deepagents
> ```

This package requires Python 3.9 or newer. Each platform wheel bundles the
prebuilt `mda` binary for its OS and CPU architecture and exposes it through the
`mda` console script.

## Define an Agent

Create an `agent.py` that defines an `agent`:

```python
from pathlib import Path

from managed_deepagents import define_deep_agent

instructions = Path("instructions.md").read_text()

agent = define_deep_agent(
    model="openai:gpt-5.5",
    system_prompt=instructions,
    tools=[query_db],
)
```

`define_deep_agent` accepts the `create_deep_agent` keyword surface minus the
managed keys: `backend`, `store`, and `checkpointer`. Those are provided by the
managed runtime when your agent is deployed.

## Project Shape

```text
my-agent/
  agent.py
  instructions.md
  tools/
  middleware/
  skills/
```

The CLI copies your project files into the managed build and generates the entry
module that connects your definition to the hosted runtime.

## CLI

Build locally:

```bash
mda build ./my-agent
```

Deploy to LangSmith:

```bash
mda deploy ./my-agent
```

The generated build is written to `<root>/.mda/build` by default.
