Metadata-Version: 2.4
Name: upsonic
Version: 0.76.3a1777551730
Summary: Agent Framework For Fintech
Author-email: Onur ULUSOY <onur@upsonic.co>, Dogan Keskin <dogan@upsonic.co>
License-File: LICENCE
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Requires-Dist: aiohttp>=3.13.3
Requires-Dist: anyio>=4.10.0
Requires-Dist: cloudpickle>=3.1.2
Requires-Dist: fastmcp>=2.14.5
Requires-Dist: genai-prices>=0.0.38
Requires-Dist: griffe>=1.14.0
Requires-Dist: httpx>=0.28.1
Requires-Dist: mcp[cli]>=1.26.0
Requires-Dist: nest-asyncio>=1.6.0
Requires-Dist: openai>=2.2.0
Requires-Dist: protobuf<6.0.0,>=5.27.2
Requires-Dist: psutil==6.1.1
Requires-Dist: pydantic-core>=2.27.2
Requires-Dist: pydantic>=2.10.5
Requires-Dist: python-dotenv>=1.0.1
Requires-Dist: requests>=2.32.5
Requires-Dist: rich>=13.9.4
Requires-Dist: sentry-sdk[opentelemetry]>=2.35.0
Requires-Dist: toml>=0.10.2
Requires-Dist: typing-extensions>=4.15.0
Requires-Dist: typing-inspection>=0.4.1
Requires-Dist: uv>=0.5.20
Requires-Dist: uvicorn>=0.34.0
Provides-Extra: apify-tool
Requires-Dist: apify-client>=1.8.1; extra == 'apify-tool'
Provides-Extra: asqav
Requires-Dist: asqav>=0.2.21; extra == 'asqav'
Provides-Extra: chroma
Requires-Dist: chromadb>=1.0.20; (python_version < '3.14') and extra == 'chroma'
Provides-Extra: crawlee-browser
Requires-Dist: crawlee[playwright]>=1.4.0; extra == 'crawlee-browser'
Provides-Extra: csv-loader
Requires-Dist: aiofiles>=24.1.0; extra == 'csv-loader'
Provides-Extra: custom-tools
Requires-Dist: apify-client>=1.8.1; extra == 'custom-tools'
Requires-Dist: crawlee[beautifulsoup]>=1.4.0; extra == 'custom-tools'
Requires-Dist: firecrawl-py>=4.14.1; extra == 'custom-tools'
Requires-Dist: slack-sdk>=3.38.0; extra == 'custom-tools'
Provides-Extra: discord-interface
Requires-Dist: fastapi>=0.128.0; extra == 'discord-interface'
Requires-Dist: websockets>=12.0; extra == 'discord-interface'
Provides-Extra: docling-loader
Requires-Dist: docling>=2.55.1; extra == 'docling-loader'
Provides-Extra: docx-loader
Requires-Dist: python-docx>=1.2.0; extra == 'docx-loader'
Provides-Extra: embeddings
Requires-Dist: aiohttp>=3.13.3; extra == 'embeddings'
Requires-Dist: anthropic>=0.69.0; extra == 'embeddings'
Requires-Dist: azure-core>=1.35.1; extra == 'embeddings'
Requires-Dist: azure-identity>=1.25.0; extra == 'embeddings'
Requires-Dist: boto3>=1.40.45; extra == 'embeddings'
Requires-Dist: botocore>=1.40.45; extra == 'embeddings'
Requires-Dist: fastembed>=0.7.3; (python_version < '3.14') and extra == 'embeddings'
Requires-Dist: google-auth>=2.40.3; extra == 'embeddings'
Requires-Dist: google-genai>=1.41.0; extra == 'embeddings'
Requires-Dist: huggingface-hub>=0.34.4; extra == 'embeddings'
Requires-Dist: numpy>=2.2.6; extra == 'embeddings'
Requires-Dist: onnxruntime>=1.22.1; (python_version < '3.14') and extra == 'embeddings'
Requires-Dist: openai>=2.1.0; extra == 'embeddings'
Requires-Dist: requests>=2.32.5; extra == 'embeddings'
Requires-Dist: torch>=2.8.0; extra == 'embeddings'
Requires-Dist: transformers>=4.57.0; extra == 'embeddings'
Provides-Extra: faiss
Requires-Dist: faiss-cpu>=1.12.0; extra == 'faiss'
Requires-Dist: numpy>=2.2.6; extra == 'faiss'
Provides-Extra: gmail-interface
Requires-Dist: fastapi; extra == 'gmail-interface'
Requires-Dist: google-api-python-client; extra == 'gmail-interface'
Requires-Dist: google-auth-httplib2; extra == 'gmail-interface'
Requires-Dist: google-auth-oauthlib; extra == 'gmail-interface'
Provides-Extra: gmail-tool
Requires-Dist: google-api-python-client>=2.188.0; extra == 'gmail-tool'
Requires-Dist: google-auth-httplib2>=0.3.0; extra == 'gmail-tool'
Requires-Dist: google-auth-oauthlib>=1.2.4; extra == 'gmail-tool'
Provides-Extra: html-loader
Requires-Dist: aiohttp>=3.13.3; extra == 'html-loader'
Requires-Dist: beautifulsoup4>=4.14.2; extra == 'html-loader'
Requires-Dist: requests>=2.32.5; extra == 'html-loader'
Provides-Extra: json-loader
Requires-Dist: jq>=1.10.0; extra == 'json-loader'
Provides-Extra: langfuse
Requires-Dist: opentelemetry-api>=1.39.1; extra == 'langfuse'
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.39.1; extra == 'langfuse'
Requires-Dist: opentelemetry-sdk>=1.39.1; extra == 'langfuse'
Provides-Extra: loaders
Requires-Dist: aiofiles>=24.1.0; extra == 'loaders'
Requires-Dist: aiohttp>=3.13.3; extra == 'loaders'
Requires-Dist: beautifulsoup4>=4.14.2; extra == 'loaders'
Requires-Dist: docling>=2.55.1; extra == 'loaders'
Requires-Dist: jq>=1.10.0; extra == 'loaders'
Requires-Dist: lxml>=4.9.1; extra == 'loaders'
Requires-Dist: markdown-it-py>=4.0.0; extra == 'loaders'
Requires-Dist: pdfplumber>=0.11.7; extra == 'loaders'
Requires-Dist: pillow>=11.3.0; extra == 'loaders'
Requires-Dist: pymupdf>=1.26.4; extra == 'loaders'
Requires-Dist: pypdf>=6.1.1; extra == 'loaders'
Requires-Dist: python-docx>=1.2.0; extra == 'loaders'
Requires-Dist: python-frontmatter>=1.1.0; extra == 'loaders'
Requires-Dist: pyyaml>=6.0.2; extra == 'loaders'
Requires-Dist: rapidocr-onnxruntime>=1.4.4; (python_version < '3.13') and extra == 'loaders'
Requires-Dist: requests>=2.32.5; extra == 'loaders'
Provides-Extra: mail-interface
Requires-Dist: fastapi>=0.128.0; extra == 'mail-interface'
Provides-Extra: markdown-loader
Requires-Dist: markdown-it-py>=4.0.0; extra == 'markdown-loader'
Requires-Dist: python-frontmatter>=1.1.0; extra == 'markdown-loader'
Provides-Extra: mem0-storage
Requires-Dist: mem0ai>=0.1.116; extra == 'mem0-storage'
Provides-Extra: milvus
Requires-Dist: pymilvus>=2.6.1; extra == 'milvus'
Provides-Extra: models
Requires-Dist: anthropic>=0.69.0; extra == 'models'
Requires-Dist: anyio>=4.10.0; extra == 'models'
Requires-Dist: azure-core>=1.35.1; extra == 'models'
Requires-Dist: azure-identity>=1.25.0; extra == 'models'
Requires-Dist: boto3>=1.40.45; extra == 'models'
Requires-Dist: botocore>=1.40.45; extra == 'models'
Requires-Dist: cohere>=5.18.0; extra == 'models'
Requires-Dist: google-auth>=2.40.3; extra == 'models'
Requires-Dist: google-genai>=1.41.0; extra == 'models'
Requires-Dist: groq>=0.32.0; extra == 'models'
Requires-Dist: httpx>=0.28.1; extra == 'models'
Requires-Dist: mistralai>=1.9.11; extra == 'models'
Requires-Dist: mypy-boto3-bedrock-runtime>=1.40.41; extra == 'models'
Requires-Dist: openai>=2.1.0; extra == 'models'
Requires-Dist: outlines>=1.2.9; extra == 'models'
Requires-Dist: xai-sdk>=1.4.0; extra == 'models'
Provides-Extra: mongo-storage
Requires-Dist: motor>=3.7.1; extra == 'mongo-storage'
Requires-Dist: pymongo>=4.9.0; extra == 'mongo-storage'
Provides-Extra: ocr
Requires-Dist: easyocr>=1.7.2; extra == 'ocr'
Requires-Dist: paddleocr>=2.10.0; extra == 'ocr'
Requires-Dist: pillow>=11.3.0; extra == 'ocr'
Requires-Dist: pymupdf>=1.26.4; extra == 'ocr'
Requires-Dist: pytesseract>=0.3.13; extra == 'ocr'
Requires-Dist: rapidocr-onnxruntime>=1.4.4; (python_version < '3.13') and extra == 'ocr'
Provides-Extra: otel
Requires-Dist: opentelemetry-api>=1.39.1; extra == 'otel'
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc>=1.39.1; extra == 'otel'
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.39.1; extra == 'otel'
Requires-Dist: opentelemetry-sdk>=1.39.1; extra == 'otel'
Provides-Extra: pdf-loader
Requires-Dist: pypdf>=6.1.1; extra == 'pdf-loader'
Requires-Dist: rapidocr-onnxruntime>=1.4.4; (python_version < '3.13') and extra == 'pdf-loader'
Provides-Extra: pdfplumber-loader
Requires-Dist: pdfplumber>=0.11.7; extra == 'pdfplumber-loader'
Requires-Dist: rapidocr-onnxruntime>=1.4.4; (python_version < '3.13') and extra == 'pdfplumber-loader'
Provides-Extra: pgvector
Requires-Dist: pgvector>=0.4.1; extra == 'pgvector'
Requires-Dist: psycopg>=3.2.9; extra == 'pgvector'
Requires-Dist: sqlalchemy>=2.0.44; extra == 'pgvector'
Provides-Extra: pinecone
Requires-Dist: pinecone-text>=0.11.0; (python_version < '3.14') and extra == 'pinecone'
Requires-Dist: pinecone>=7.3.0; extra == 'pinecone'
Provides-Extra: postgres-storage
Requires-Dist: asyncpg>=0.30.0; extra == 'postgres-storage'
Requires-Dist: greenlet>=3.2.3; extra == 'postgres-storage'
Requires-Dist: psycopg2-binary>=2.9.10; extra == 'postgres-storage'
Requires-Dist: psycopg[binary]>=3.2.9; extra == 'postgres-storage'
Requires-Dist: sqlalchemy>=2.0.42; extra == 'postgres-storage'
Provides-Extra: pymupdf-loader
Requires-Dist: pymupdf>=1.26.4; extra == 'pymupdf-loader'
Requires-Dist: rapidocr-onnxruntime>=1.4.4; (python_version < '3.13') and extra == 'pymupdf-loader'
Provides-Extra: qdrant
Requires-Dist: qdrant-client>=1.12.1; extra == 'qdrant'
Provides-Extra: redis-storage
Requires-Dist: redis>=5.2.1; extra == 'redis-storage'
Provides-Extra: safety-engine
Requires-Dist: detoxify>=0.5.2; extra == 'safety-engine'
Provides-Extra: slack-interface
Requires-Dist: fastapi>=0.128.0; extra == 'slack-interface'
Requires-Dist: slack-sdk>=3.39.0; extra == 'slack-interface'
Provides-Extra: sqlite-storage
Requires-Dist: aiosqlite>=0.21.0; extra == 'sqlite-storage'
Requires-Dist: greenlet>=3.2.3; extra == 'sqlite-storage'
Requires-Dist: sqlalchemy>=2.0.42; extra == 'sqlite-storage'
Provides-Extra: storage
Requires-Dist: aiosqlite>=0.21.0; extra == 'storage'
Requires-Dist: asyncpg>=0.30.0; extra == 'storage'
Requires-Dist: greenlet>=3.2.3; extra == 'storage'
Requires-Dist: mem0ai>=0.1.116; extra == 'storage'
Requires-Dist: motor>=3.7.1; extra == 'storage'
Requires-Dist: psycopg2-binary>=2.9.10; extra == 'storage'
Requires-Dist: psycopg[binary]>=3.2.9; extra == 'storage'
Requires-Dist: pymongo>=4.9.0; extra == 'storage'
Requires-Dist: redis>=5.2.1; extra == 'storage'
Requires-Dist: sqlalchemy>=2.0.42; extra == 'storage'
Provides-Extra: supermemory
Requires-Dist: supermemory>=3.25.0; extra == 'supermemory'
Provides-Extra: text-loader
Requires-Dist: aiofiles>=24.1.0; extra == 'text-loader'
Provides-Extra: tools
Requires-Dist: beautifulsoup4>=4.14.2; extra == 'tools'
Requires-Dist: ddgs>=9.10.0; extra == 'tools'
Requires-Dist: genai-prices>=0.0.29; extra == 'tools'
Requires-Dist: pandas>=2.3.2; extra == 'tools'
Requires-Dist: tavily-python>=0.7.12; extra == 'tools'
Requires-Dist: yfinance>=0.2.66; extra == 'tools'
Provides-Extra: vectordb
Requires-Dist: chromadb>=1.0.20; (python_version < '3.14') and extra == 'vectordb'
Requires-Dist: faiss-cpu>=1.12.0; extra == 'vectordb'
Requires-Dist: pgvector>=0.4.1; extra == 'vectordb'
Requires-Dist: pinecone-text>=0.11.0; (python_version < '3.14') and extra == 'vectordb'
Requires-Dist: pinecone>=7.3.0; extra == 'vectordb'
Requires-Dist: psycopg>=3.2.9; extra == 'vectordb'
Requires-Dist: pymilvus[milvus-lite]>=2.6.1; extra == 'vectordb'
Requires-Dist: qdrant-client>=1.12.1; extra == 'vectordb'
Requires-Dist: reportlab>=4.1.0; extra == 'vectordb'
Requires-Dist: scikit-learn>=1.4.0; extra == 'vectordb'
Requires-Dist: scipy>=1.13.0; extra == 'vectordb'
Requires-Dist: sqlalchemy>=2.0.44; extra == 'vectordb'
Requires-Dist: supermemory>=3.25.0; extra == 'vectordb'
Requires-Dist: weaviate-client>=4.16.9; extra == 'vectordb'
Provides-Extra: weaviate
Requires-Dist: weaviate-client>=4.16.9; extra == 'weaviate'
Provides-Extra: web
Requires-Dist: celery>=5.5.3; extra == 'web'
Requires-Dist: fastapi; extra == 'web'
Requires-Dist: python-multipart>=0.0.20; extra == 'web'
Requires-Dist: uvicorn>=0.35.0; extra == 'web'
Provides-Extra: xml-loader
Requires-Dist: lxml>=4.9.1; extra == 'xml-loader'
Provides-Extra: yaml-loader
Requires-Dist: jq>=1.10.0; extra == 'yaml-loader'
Requires-Dist: pyyaml>=6.0.2; extra == 'yaml-loader'
Description-Content-Type: text/markdown

<div align="center">

<img width="947" alt="Upsonic_README" src="https://github.com/user-attachments/assets/acb3f413-e4fe-44a6-9aff-40d4e9031188" />

# Upsonic

**Build Autonomous AI Agents in Python**

[![PyPI version](https://badge.fury.io/py/upsonic.svg)](https://badge.fury.io/py/upsonic)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENCE)
[![Python Version](https://img.shields.io/pypi/pyversions/upsonic.svg)](https://pypi.org/project/upsonic/)
[![GitHub stars](https://img.shields.io/github/stars/Upsonic/Upsonic.svg?style=social&label=Star)](https://github.com/Upsonic/Upsonic)
[![GitHub issues](https://img.shields.io/github/issues/Upsonic/Upsonic.svg)](https://github.com/Upsonic/Upsonic/issues)
[![Documentation](https://img.shields.io/badge/docs-upsonic.ai-brightgreen.svg)](https://docs.upsonic.ai)
[![Discord](https://img.shields.io/badge/Discord-Join%20Community-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/pmYDMSQHqY)

[Documentation](https://docs.upsonic.ai) • [Quickstart](https://docs.upsonic.ai/get-started/quickstart) • [Examples](https://docs.upsonic.ai/examples) • [Discord](https://discord.gg/pmYDMSQHqY)

</div>

---

## Overview

Upsonic is a Python framework for building autonomous agents like OpenClaw and Claude Cowork, as well as more traditional agent systems.

## Quick Start

### Installation

```bash
uv pip install upsonic
# pip install upsonic
```

### IDE Integration

Add Upsonic docs as a source in your coding tools:

**Cursor:** Settings → Indexing & Docs → Add `https://docs.upsonic.ai/llms-full.txt`

Also works with VSCode, Windsurf, and similar tools.

---

## Create Autonomous Agent

### Build Your Own

```python
from upsonic import AutonomousAgent, Task

agent = AutonomousAgent(
    model="anthropic/claude-sonnet-4-5",
    workspace="/path/to/logs"
)

task = Task("Analyze server logs and detect anomaly patterns")

agent.print_do(task)
```

All file and shell operations are restricted to `workspace`. Path traversal and dangerous commands are blocked.

### Use Our Prebuilt Ones

Prebuilt autonomous agents are ready-to-run agents built by the Upsonic community, each packaging a skill, system prompt, and first message so you can go from install to running in seconds. The collection is [open to contributions](https://github.com/Upsonic/Upsonic/tree/master/prebuilt_autonomous_agents), bring your agent and open a PR.

Learn more: [Prebuilt Autonomous Agents](https://docs.upsonic.ai/concepts/prebuilt-autonomous-agents/overview)

> **Next steps:** Connect a [Sandbox Provider (E2B)](https://docs.upsonic.ai/concepts/autonomous-agent/overview) for isolated cloud execution environments.

---

## Create Traditional Agent

```python
from upsonic import Agent, Task

agent = Agent(model="anthropic/claude-sonnet-4-5", name="Stock Analyst Agent")

task = Task(description="Analyze the current market trends")

agent.print_do(task)
```

### Add Custom Tools

```python
from upsonic import Agent, Task
from upsonic.tools import tool

@tool
def sum_tool(a: float, b: float) -> float:
    """
    Add two numbers together.

    Args:
        a: First number
        b: Second number

    Returns:
        The sum of a and b
    """
    return a + b

task = Task(
    description="Calculate 15 + 27",
    tools=[sum_tool]
)

agent = Agent(model="anthropic/claude-sonnet-4-5", name="Calculator Agent")

result = agent.print_do(task)
```

> **Next steps:** Integrate [MCP Tools](https://docs.upsonic.ai/concepts/tools/mcp-tools/overview) to connect your agents to thousands of external data sources and services.

---

## OCR and Document Processing

Upsonic provides a unified OCR interface with a layered pipeline: Layer 0 handles document preparation (PDF to image conversion, preprocessing), Layer 1 runs the OCR engine.

```bash
uv pip install "upsonic[ocr]"
```

```python
from upsonic.ocr import OCR
from upsonic.ocr.layer_1.engines import EasyOCREngine

engine = EasyOCREngine(languages=["en"])
ocr = OCR(layer_1_ocr_engine=engine)

text = ocr.get_text("invoice.pdf")
print(text)
```

Supported engines: EasyOCR, RapidOCR, Tesseract, PaddleOCR, DeepSeek OCR, DeepSeek via Ollama.

Learn more: [OCR Documentation](https://docs.upsonic.ai/concepts/ocr/overview)

---

## Check Our Videos

<table>
  <tr>
    <td align="center">
      <a href="https://www.youtube.com/watch?v=GOYko0KfBtg">
        <img src="https://img.youtube.com/vi/GOYko0KfBtg/maxresdefault.jpg" width="400" alt="Upsonic Demo Video 1"/>
      </a>
    </td>
    <td align="center">
      <a href="https://www.youtube.com/watch?v=ulUEFIolesQ">
        <img src="https://img.youtube.com/vi/ulUEFIolesQ/maxresdefault.jpg" width="400" alt="Upsonic Demo Video 2"/>
      </a>
    </td>
  </tr>
</table>

---

## Documentation and Resources

- **[Documentation](https://docs.upsonic.ai)** - Complete guides and API reference
- **[Quickstart Guide](https://docs.upsonic.ai/get-started/quickstart)** - Get started in 5 minutes
- **[Examples](https://docs.upsonic.ai/examples)** - Real-world examples and use cases
- **[API Reference](https://docs.upsonic.ai/reference)** - Detailed API documentation

## Community and Support

> **💬 [Join our Discord community!](https://discord.gg/pmYDMSQHqY)** — Ask questions, share what you're building, get help from the team, and connect with other developers using Upsonic.

- **[Discord](https://discord.gg/pmYDMSQHqY)** - Chat with the community and get real-time support
- **[Issue Tracker](https://github.com/Upsonic/Upsonic/issues)** - Report bugs and request features
- **[Changelog](https://docs.upsonic.ai/changelog)** - See what's new in each release

## License

Upsonic is released under the MIT License. See [LICENCE](LICENCE) for details.

## Contributing

We welcome contributions from the community! Please read our [Contributing Guide](CONTRIBUTING.md) and code of conduct before submitting pull requests.