Metadata-Version: 2.4
Name: usf-agents
Version: 1.0.0.post10
Summary: A lightweight multi-agent orchestration framework with better control, easy to use for complex to simple use cases. Developer friendly with more visibility and supports all models with OpenAI compatible API.
Author: UltraSafe AI Team
License: USF Agents SDK License
Project-URL: Homepage, https://us.inc
Keywords: multi-agent,orchestration,framework,lightweight,agent,developer-friendly,visibility,control,complex-usecase,simple-usecase,all-models,openai-compatible,llm,ai-agent,tool-calling,streaming,usf,planning,UltraSafe,UltraSafe AI,usf-agents
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: openai>=1.0.0
Requires-Dist: aiohttp>=3.8.0
Requires-Dist: PyYAML>=6.0
Dynamic: license-file
Dynamic: requires-python

# USF Agents — Simplify the Complex, Amplify the Intelligent for Enterprise

Orchestrate multiple agents with ease: register agents, integrate tools, define custom instructions, and leverage multiple models.  
Enterprise-grade and production-ready, with full control, deep customization, strong defaults, clear boundaries, and developer-focused APIs.

---

# USF Agents

This is the official documentation for the **USF Agents Python SDK**.

📖 **Docs:** [Quickstart](https://us.inc/docs/quickstart) | [Installation](https://us.inc/docs/start/installation) | [Configuration](https://us.inc/docs/start/configuration) | [Troubleshooting / FAQ](https://us.inc/docs/troubleshooting-faq)

---

## Installation & Requirements

### Requirements
- Python **3.9+**
- USF API key (set as an environment variable)

### Install the SDK

```bash
pip install usf-agents
````

Other package managers:

```bash
# uv
uv add usf-agents

# poetry
poetry add usf-agents

# pdm
pdm add usf-agents
```

### Set Your API Key

```bash
# macOS/Linux
export USF_API_KEY=YOUR_KEY

# Windows PowerShell
$env:USF_API_KEY="YOUR_KEY"

# Windows CMD
set USF_API_KEY=YOUR_KEY
```

### (Optional) Virtual Environment

```bash
python -m venv .venv

# macOS/Linux
source .venv/bin/activate

# Windows PowerShell
.venv\Scripts\Activate.ps1
```

### Verify Installation

```bash
pip show usf-agents
```

Minimal import check:

```bash
python - <<'PY'
try:
    import usf_agents
    print("usf_agents import: OK")
except Exception as e:
    print("Import failed:", e)
PY
```

---

## Quick Sanity Run

Requires your `USF_API_KEY` to be set.

```python
# sanity.py
import os
import asyncio
import nest_asyncio
from usf_agents import ManagerAgent

nest_asyncio.apply()

async def main():
    mgr = ManagerAgent(
        usf_config={
            "api_key": os.getenv("USF_API_KEY"),
            "model": "usf-mini"
        }
    )
    result = await mgr.run("Say 'hello world'", {"mode": "auto"})
    if result.get("status") == "final":
        print("Final:", result.get("content"))
    else:
        print("Pending tool calls:", result.get("tool_calls"))

if __name__ == "__main__":
    asyncio.run(main())
```

Run it:

```bash
python sanity.py
```

---

## Documentation

### Getting Started

* [Quickstart](https://us.inc/docs/quickstart)
* [Installation](https://us.inc/docs/start/installation)
* [Configuration](https://us.inc/docs/start/configuration)
* [Troubleshooting / FAQ](https://us.inc/docs/troubleshooting-faq)

### Tools

* [Overview](https://us.inc/docs/tools/overview)
* [Docstrings](https://us.inc/docs/tools/docstrings)
* [Decorator](https://us.inc/docs/tools/decorator)
* [Explicit Schema](https://us.inc/docs/tools/explicit-schema)
* [Type Mapping](https://us.inc/docs/tools/type-mapping)
* [Registry & Batching](https://us.inc/docs/tools/registry-and-batch-tool-registration)

### Multi-Agent

* [Overview](https://us.inc/docs/multi-agent/overview)
* [Execution Modes](https://us.inc/docs/multi-agent/auto-execution-modes)
* [Context Modes](https://us.inc/docs/multi-agent/context-modes)
* [Manager-driven Delegation](https://us.inc/docs/multi-agent/manager-driven-delegation)
* [Skip Planning (No Tools)](https://us.inc/docs/multi-agent/skip-planning-no-tools)
* [Custom Instruction](https://us.inc/docs/multi-agent/custom-instruction)

### Jupyter Notebook Guides

* [Email Drafting Assistant](https://us.inc/docs/jupyter-notebooks/email-drafting-assistant)
* [Customer Support Triage](https://us.inc/docs/jupyter-notebooks/customer-support-triage)
* [Planner-Worker Delegation](https://us.inc/docs/jupyter-notebooks/planner-worker-delegation)
* [Strict JSON Output](https://us.inc/docs/jupyter-notebooks/strict-json-output)
* [Currency Converter](https://us.inc/docs/jupyter-notebooks/currency-converter)

### FastAPI Apps

* [Email Drafting Assistant](https://us.inc/docs/fastapi-apps/email-drafting-assistant/README)
* [Customer Support Triage](https://us.inc/docs/fastapi-apps/customer-support-triage/README)
* [Planner-Worker Delegation](https://us.inc/docs/fastapi-apps/planner-worker-delegation/README)
* [Strict JSON Output](https://us.inc/docs/fastapi-apps/strict-json-output/README)
* [Currency Converter](https://us.inc/docs/fastapi-apps/currency-converter/README)

---

## License

See [LICENSE](https://agents-docs.us.inc/license).
