Metadata-Version: 2.4
Name: upsonic
Version: 0.72.0a1770821888
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: 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: chroma
Requires-Dist: chromadb>=1.0.20; (python_version < '3.14') and extra == 'chroma'
Provides-Extra: csv-loader
Requires-Dist: aiofiles>=24.1.0; extra == 'csv-loader'
Provides-Extra: custom-tools
Requires-Dist: slack-sdk>=3.38.0; extra == 'custom-tools'
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: 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: 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: 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'
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: pdf2image>=1.17.0; extra == 'ocr'
Requires-Dist: pillow>=11.3.0; 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: 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: 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: 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 src="https://github.com/user-attachments/assets/fbe7219f-55bc-4748-ac4a-dd2fb2b8d9e5" width="600" />

# Upsonic

**Production-Ready AI Agent Framework with Safety First**

[![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)

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

</div>

---

## Overview

Upsonic is an open-source AI agent development framework that makes building production-ready agents simple, safe, and scalable. Whether you're building your first agent or orchestrating complex multi-agent systems, Upsonic provides everything you need in one unified framework.

Built by the community, for the community. We listen to what you need and prioritize features based on real-world use cases. Currently, we're focused on **Safety Engine** and **OCR capabilities**, two critical features for production workloads.

## What Can You Build?

Upsonic is used by fintech companies, banks, and developers worldwide to build production-grade AI agents for:

- **Document Analysis**: Extract, process, and understand documents with advanced OCR and NLP
- **Customer Service Automation**: Build intelligent chatbots with memory and context awareness
- **Financial Analysis**: Create agents that analyze market data, generate reports, and provide insights
- **Compliance Monitoring**: Ensure all AI operations follow safety policies and regulatory requirements
- **Research & Data Gathering**: Automate research workflows with multi-agent collaboration
- **Multi-Agent Workflows**: Orchestrate complex tasks across specialized agent teams

## Quick Start

### Installation

Install Upsonic using uv:

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

### Basic Agent

Create your first agent in just a few lines of code:

```python
from upsonic import Agent, Task

agent = Agent(model="openai/gpt-4o", name="Stock Analyst Agent")

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

agent.print_do(task)
```

### Agent with Tools

Enhance your agent with tools for real-world tasks:

```python
from upsonic import Agent, Task
from upsonic.tools.common_tools import YFinanceTools

agent = Agent(model="openai/gpt-4o", name="Stock Analyst Agent")

task = Task(
    description="Give me a summary about tesla stock with tesla car models",
    tools=[YFinanceTools()]
)

agent.print_do(task)
```

### Agent with Memory

Add memory to make your agent remember past conversations:

```python
from upsonic import Agent, Task
from upsonic.storage import Memory, InMemoryStorage

memory = Memory(
    storage=InMemoryStorage(),
    session_id="session_001",
    full_session_memory=True
)

agent = Agent(model="openai/gpt-4o", memory=memory)

task1 = Task(description="My name is John")
agent.print_do(task1)

task2 = Task(description="What is my name?")
agent.print_do(task2)  # Agent remembers: "Your name is John"
```

**Ready for more?** Check out the [Quickstart Guide](https://docs.upsonic.ai/get-started/quickstart) for additional examples including Knowledge Base and Team workflows.

## Key Features

- **Safety Engine**: Built-in policy engine to ensure your agents follow company guidelines and compliance requirements
- **OCR Support**: Unified interface for local and cloud OCR providers with document processing capabilities
- **Memory Management**: Give your agents context and long-term memory with flexible storage backends
- **Multi-Agent Teams**: Build collaborative agent systems with sequential and parallel execution modes
- **Tool Integration**: Extensive tool support including MCP, custom tools, and human-in-the-loop workflows
- **Production Ready**: Designed for enterprise deployment with comprehensive monitoring and metrics

## Core Capabilities

### Safety Engine

Safety isn't an afterthought in Upsonic. It's built into the core. Create reusable policies, attach them to any agent, and ensure compliance across your entire system. The Safety Engine is LLM-agnostic and production-ready from day one.

Key capabilities include:
- Pre-built policies for common safety requirements (PII blocking, content filtering, etc.)
- Custom policy creation for your specific compliance needs
- Real-time monitoring and enforcement
- Detailed audit logs for compliance reporting

**Example:**

```python
from upsonic import Agent, Task
from upsonic.safety_engine.policies.pii_policies import PIIBlockPolicy

agent = Agent(
    model="openai/gpt-4o-mini",
    agent_policy=PIIBlockPolicy,
)

task = Task(
    description="Create a realistic customer profile with name Alice, email alice@example.com, phone number 1234567890, and address 123 Main St, Anytown, USA"
)

result = agent.do(task)
print(result)
```

Learn more: [Safety Engine Documentation](https://docs.upsonic.ai/concepts/safety-engine/overview)

### OCR and Document Processing

Upsonic provides a unified interface for working with multiple OCR providers, both local and cloud-based. This eliminates the complexity of integrating different OCR services and allows you to switch providers without changing your code.

Supported providers include:
- Cloud providers (Google Vision, AWS Textract, Azure Computer Vision)
- Local providers (Tesseract, EasyOCR, PaddleOCR)
- Specialized document processors (DocTR, Surya)

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

## Upsonic AgentOS

AgentOS is an optional deployment and management platform that takes your agents from development to production. It provides enterprise-grade infrastructure for deploying, monitoring, and scaling your AI agents.

**Key Features:**

- **Kubernetes-based FastAPI Runtime**: Deploy your agents as isolated, scalable microservices with enterprise-grade reliability
- **Comprehensive Metrics Dashboard**: Track every agent transaction, LLM costs, token usage, and performance metrics for complete visibility
- **Self-Hosted Deployment**: Deploy the entire AgentOS platform on your own infrastructure with full control over your data and operations
- **One-Click Deployment**: Go from code to production with automated deployment pipelines

<img width="3024" height="1590" alt="AgentOS Dashboard" src="https://github.com/user-attachments/assets/42fceaca-2dec-4496-ab67-4b9067caca42" />

## Your Complete AI Agent Infrastructure

Together, the Upsonic Framework and AgentOS provide everything a financial institution needs to build, deploy, and manage production-grade AI agents. From development to deployment, from local testing to enterprise-scale operations, from single agents to complex multi-agent systems, Upsonic delivers the complete infrastructure for your AI agent initiatives.

Whether you're a fintech startup building your first intelligent automation or an established bank deploying agents across multiple business units, Upsonic provides the end-to-end tooling to bring your AI agent vision to life safely, efficiently, and at scale.

## 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

- **[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 guidelines and code of conduct before submitting pull requests.

---

**Learn more at [upsonic.ai](https://upsonic.ai)**
