Metadata-Version: 2.4
Name: digmind-sdk
Version: 0.1.0
Summary: DigMind Function Tool SDK for Python
Author: DigMind Team
License: MIT
Project-URL: Homepage, https://digmind.ai
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.28.0
Requires-Dist: pydantic>=2.0.0

# DigMind SDK

**DigMind SDK** is the official Python library for developing **Function Tools** and orchestrating agent workflows within the [DigMind Platform](https://digmind.ai).

## Installation

```bash
pip install digmind-sdk
```

## Creating a Function Tool

Function Tools allow you to construct composite tools locally using Python and connect them securely to DigMind's execution engine via the `ToolBridge`.

### Usage Example

```python
from pydantic import BaseModel
from digmind_sdk import FunctionToolContext, tool_model

# 1. Define the Pydantic schema and bind it to a platform Tool Reference
@tool_model("rss.list_feeds")
class ListFeeds(BaseModel):
    source_ids: list[str]

# 2. Implement the entry point function
def run(ctx: FunctionToolContext) -> dict:
    # Safely call the platform tools via context
    ctx.progress(0.1, "Fetching RSS feeds...")
    feeds = ctx.call(ListFeeds(source_ids=["tech-blog"]))
    
    # Process results locally...
    ctx.progress(1.0, "Complete!")
    return {"status": "success", "data": feeds}
```

## Features

- **Pydantic Validation**: Ensure type-safety immediately before making network requests.
- **Progress Tracking**: Send real-time partial completion updates back to the DigMind web UI.
- **Parallel Dispatch**: Run multiple tool calls simultaneously (`ctx.parallel_call`) to drastically reduce overall execution latency.

## Requirements

- Python 3.11+
- You must connect this SDK running instance to a valid DigMind platform context (normally provided automatically when executed dynamically within DigMind Sandbox environments).
