Metadata-Version: 2.4
Name: mobileops-managed-agent
Version: 0.2.2
Summary: Server-side SDK for the MobileOPS Managed Agent API.
Project-URL: Homepage, https://github.com/InnoMindX/deepagent/tree/main/managed-agent-sdk/python
Project-URL: Repository, https://github.com/InnoMindX/deepagent
Project-URL: Issues, https://github.com/InnoMindX/deepagent/issues
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.27.0
Requires-Dist: langgraph-sdk<0.5.0,>=0.4.2
Requires-Dist: jsonschema<5.0.0,>=4.26.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"

# MobileOPS Managed Agent Python SDK

Server-side Python SDK for the MobileOPS Managed Agent API.

The SDK exposes three surfaces:

- `client.agent` wraps the LangGraph runtime client and exposes the supported Assistant CRUD methods at `client.agent.assistants`.
- `client.files` exposes MobileOPS Sandbox Workspace file routes.
- `client.resources` manages Context Hub resources, versions, and latest-version files.

Assistant create and update retain LangGraph's ordinary arguments, while
persisted configuration is exposed through product fields. Pass
`response_schema` to persist a Draft 2020-12 object schema, read the Run's
validated result from final state `structured_response`, and pass
`response_schema=None` on update to clear it.

Note: the Agent Server freezes the Assistant config into each Thread at
creation, and that frozen copy takes precedence over the Assistant's current
config on later Runs. Setting, changing, or clearing `response_schema`
therefore only affects Runs started on **new** Threads; existing Threads keep
the schema captured at their creation.

```py
from mobileops_managed_agent import MobileOpsManagedAgentClient

client = MobileOpsManagedAgentClient(api_url=api_url, api_key=api_key)

thread = await client.agent.threads.create()
await client.agent.runs.create(thread["thread_id"], assistant_id, input=input)

skill = await client.resources.create("skills", zip_bytes)  # slug inferred
assistant = await client.agent.assistants.create(
    name="Operations agent",
    skills=[{
        "ref": skill["ref"],  # e.g. incident-response@sha256-…
        "target_path": "/workspace/skills",  # zip already contains {slug}/
    }],
)

await client.resources.versions.create("skills", skill["slug"], next_zip_bytes)
await client.resources.files.list("skills", skill["slug"])
await client.files.list(thread["thread_id"], "/workspace")
```

Keep MobileOPS Managed Agent API keys in server-side code only.
