Metadata-Version: 2.4
Name: baselith-core
Version: 0.8.1
Summary: A Modular Framework for Baselith-Core Orchestration featuring World Models (MCTS), Swarm, and Native MCP.
Author-email: Gippo <baselith.ai@gmail.com>
License-Expression: AGPL-3.0-only
Project-URL: Homepage, https://github.com/baselithcore/baselithcore
Project-URL: Repository, https://github.com/baselithcore/baselithcore
Project-URL: Documentation, https://baselithcore.github.io/baselithcore
Keywords: ai,agents,framework
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp>=3.9.0
Requires-Dist: alembic>=1.13.0
Requires-Dist: anthropic>=0.18.0
Requires-Dist: argon2-cffi>=23.1.0
Requires-Dist: defusedxml==0.7.1
Requires-Dist: email-validator>=2.1.0
Requires-Dist: fastapi==0.115.0
Requires-Dist: fastapi-limiter<0.2.0,>=0.1.6
Requires-Dist: httpx==0.27.0
Requires-Dist: jsonschema>=4.23.0
Requires-Dist: langchain-text-splitters>=1.1.0
Requires-Dist: markdown-it-py==3.0.0
Requires-Dist: networkx>=3.0
Requires-Dist: numpy>=1.24.0
Requires-Dist: ollama==0.6.0
Requires-Dist: openai>=2.2.0
Requires-Dist: opentelemetry-api>=1.21.0
Requires-Dist: opentelemetry-exporter-otlp>=1.21.0
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.42b0
Requires-Dist: opentelemetry-instrumentation-httpx>=0.42b0
Requires-Dist: opentelemetry-instrumentation-redis>=0.42b0
Requires-Dist: opentelemetry-sdk>=1.21.0
Requires-Dist: orjson==3.11.7
Requires-Dist: prometheus-client==0.20.0
Requires-Dist: psycopg[binary,pool]==3.2.1
Requires-Dist: pydantic-settings>=2.0.0
Requires-Dist: PyJWT==2.8.0
Requires-Dist: python-multipart
Requires-Dist: PyYAML>=6.0
Requires-Dist: qdrant-client==1.15.1
Requires-Dist: redis==5.0.7
Requires-Dist: rq>=1.15.0
Requires-Dist: sentry-sdk[fastapi]>=2.0.0
Requires-Dist: sse-starlette>=2.1.0
Requires-Dist: structlog>=24.1.0
Requires-Dist: uvicorn[standard]==0.30.0
Requires-Dist: rich>=13.7.0
Requires-Dist: rich-argparse>=1.4.0
Requires-Dist: argcomplete>=3.2.0
Provides-Extra: browser
Requires-Dist: playwright==1.45.0; extra == "browser"
Provides-Extra: documents
Requires-Dist: pypdf>=6.7.4; extra == "documents"
Requires-Dist: python-docx==1.1.0; extra == "documents"
Requires-Dist: python-pptx==0.6.23; extra == "documents"
Requires-Dist: openpyxl==3.1.5; extra == "documents"
Requires-Dist: xlrd==2.0.1; extra == "documents"
Provides-Extra: ocr
Requires-Dist: pdf2image==1.16.3; extra == "ocr"
Requires-Dist: Pillow==12.1.1; extra == "ocr"
Requires-Dist: pytesseract==0.3.10; extra == "ocr"
Provides-Extra: web
Requires-Dist: beautifulsoup4>=4.14.2; extra == "web"
Requires-Dist: playwright==1.45.0; extra == "web"
Provides-Extra: rag
Requires-Dist: sentence-transformers==2.7.0; extra == "rag"
Provides-Extra: nlp
Requires-Dist: spacy==3.8.0; extra == "nlp"
Provides-Extra: huggingface
Requires-Dist: huggingface-hub>=0.20.0; extra == "huggingface"
Requires-Dist: transformers>=4.36.0; extra == "huggingface"
Requires-Dist: accelerate>=0.25.0; extra == "huggingface"
Provides-Extra: test
Requires-Dist: beautifulsoup4>=4.14.2; extra == "test"
Requires-Dist: pypdf>=6.7.4; extra == "test"
Requires-Dist: pytest>=7.4.0; extra == "test"
Requires-Dist: pytest-cov>=4.1.0; extra == "test"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "test"
Requires-Dist: cryptography>=42.0.0; extra == "test"
Provides-Extra: dev
Requires-Dist: beautifulsoup4>=4.14.2; extra == "dev"
Requires-Dist: pypdf>=6.7.4; extra == "dev"
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: ruff>=0.4.0; extra == "dev"
Requires-Dist: mypy>=1.10.0; extra == "dev"
Requires-Dist: ipython>=8.0.0; extra == "dev"
Requires-Dist: pre-commit>=3.5.0; extra == "dev"
Requires-Dist: types-PyYAML; extra == "dev"
Provides-Extra: adapters
Requires-Dist: langchain>=1.2.0; extra == "adapters"
Requires-Dist: langchain-community>=0.4.0; extra == "adapters"
Requires-Dist: langgraph>=1.0.0; extra == "adapters"
Requires-Dist: langchain-ollama>=1.0.0; extra == "adapters"
Provides-Extra: memory
Requires-Dist: supermemory>=0.1.0; extra == "memory"
Provides-Extra: computer-use
Requires-Dist: mss>=9.0.0; extra == "computer-use"
Requires-Dist: Pillow==12.1.1; extra == "computer-use"
Requires-Dist: pyautogui>=0.9.54; extra == "computer-use"
Dynamic: license-file

    BaselithCore Logo

# BaselithCore

> **The Research-Backed Engine for Production-Grade Agentic AI.**

[![Python 3.12+](https://img.shields.io/badge/python-3.12+-blue.svg?style=for-the-badge&logo=python&logoColor=white)](https://www.python.org/downloads/)
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg?style=for-the-badge)](LICENSE)
[![Code Style: Ruff](https://img.shields.io/badge/code%20style-ruff-000000.svg?style=for-the-badge)](https://github.com/astral-sh/ruff)
[![Checked with mypy](https://img.shields.io/badge/mypy-checked-blue.svg?style=for-the-badge)](http://mypy-lang.org/)
[![Tests: 2105/2105 | 70%](https://img.shields.io/badge/Tests-2105%2F2105_--_70%25-brightgreen.svg?style=for-the-badge)](tests/)
[![PyPI version](https://img.shields.io/pypi/v/baselith-core.svg?style=for-the-badge&logo=pypi&logoColor=white)](https://pypi.org/p/baselith-core/)

[![World Model: MCTS](https://img.shields.io/badge/World_Model-MCTS-teal.svg?style=for-the-badge)](mkdocs-site/docs/core-modules/world-model.md)
[![Swarm Intelligence](https://img.shields.io/badge/Swarm-Intelligence-indigo.svg?style=for-the-badge)](mkdocs-site/docs/core-modules/swarm.md)
[![Agentic Patterns](https://img.shields.io/badge/Patterns-20+_Agentic-orange.svg?style=for-the-badge)](mkdocs-site/docs/architecture/agentic-patterns.md)
[![Native MCP](https://img.shields.io/badge/Native-MCP-blue.svg?style=for-the-badge)](mkdocs-site/docs/core-modules/mcp.md)
[![Docker Ready](https://img.shields.io/badge/docker-ready-blue.svg?style=for-the-badge&logo=docker&logoColor=white)](https://github.com/baselithcore/baselithcore/blob/main/Dockerfile-full)

---

**BaselithCore** is a high-performance orchestration engine designed to transition agentic AI from experimental prototypes to resilient, production-ready infrastructure. Built on a modular architecture, it provides an agnostic foundation for engineering scalable multi-agent systems.

[**Quick Start**](#quick-start) | [**Architecture**](https://docs.baselithcore.xyz/architecture/) | [**Plugin System**](https://docs.baselithcore.xyz/plugins/) | [**API Reference**](https://docs.baselithcore.xyz/api/)

---

## Core Philosophy

BaselithCore is governed by a strict architectural separation:

1. **Sacred Core**: The `core/` directory contains exclusively agnostic logic—orchestration, infrastructure, and utilities. It remains untainted by domain-specific logic.
2. **Plugin-First**: All business logic, external integrations, and specialized capabilities are implemented as **Plugins**, ensuring secondary features never bloat the primary engine.
3. **Agentic by Design**: Native adherence to the Agentic Design Patterns (Memory, Reflection, Tool Use, etc.) is baked into the orchestrator.

### Architecture Overview

```mermaid
graph TD
    subgraph "Sacred Core (Agnostic Engine)"
        A["Core Orchestrator"]
        M["Memory Hierarchy (STM/MTM/LTM)"]
        S["Storage Layer (DB/Vector)"]
        R["Plugin Registry"]
    end

    R --> C["Custom Agent Plugins"]
    R --> D["Capability Extensions"]
    
    A --> M
    M --> S
    A --> F["Flow Handlers"]
    
    R -.->|Inject Handlers| A
    R -.->|Inject Routers| G["API Gateway"]
    
    A --> H["LLM Layer (Anthropic, OpenAI, Ollama, HF)"]
    F --> H
```

---

## Key Capabilities

### Cognitive Orchestration

We manage the complexity of agentic reasoning so you can focus on domain value.

* **Strategic Optimization**: Native **Monte Carlo Tree Search (MCTS)** and **Tree of Thoughts** for advanced decision-making and "What-If" simulations.
* **Swarm Intelligence**: Decentralized **Auction Protocols** for optimal task allocation and resource efficiency across agent collectives.
* **Multilayered Memory**: Research-grade memory hierarchy (STM → MTM → LTM) with intelligent context consolidation.
* **Interoperability**: Built with native **Model Context Protocol (MCP)** support for seamless tool and data integration.

---

##  Quick Start

### 1. Prerequisites

* **Python**: 3.12+
* **Docker**: For Redis, Qdrant, and PostgreSQL infrastructure.
* **Vector/Relational Storage**: Managed via Docker Compose.

### 2. Installation

Install the core engine via pip:

```bash
pip install baselith-core
```

Install optional capabilities only when needed:

```bash
# RAG / embedding / reranking
pip install "baselith-core[rag]"

# Browser automation and JS rendering
pip install "baselith-core[browser,web]"

# Document ingestion and OCR
pip install "baselith-core[documents,ocr,nlp]"

# Hugging Face provider support
pip install "baselith-core[huggingface]"
```

Or clone for extension development:

```bash
git clone https://github.com/baselithcore/baselithcore.git
cd baselith-core
docker compose up -d
```

### 3. Verification

```bash
baselith doctor  # Validate environment and configuration
```

---

## Resources

| Resource                                                                             | Description                                           |
| :----------------------------------------------------------------------------------- | :---------------------------------------------------- |
| [**Official Website**](https://baselithcore.xyz)                                     | The core landing page for the BaselithCore framework. |
| [**Official Documentation**](https://docs.baselithcore.xyz)                          | The official docs for the BaselithCore framework.     |
| [**Architecture**](https://docs.baselithcore.xyz/architecture/overview/)             | Deep dive into the "Sacred Core" and design choices.  |
| [**Plugin Guide**](https://docs.baselithcore.xyz/plugins/architecture/)              | How to extend BaselithCore using the plugin system.   |
| [**Agentic Patterns**](https://docs.baselithcore.xyz/architecture/agentic-patterns/) | Implementation of Agentic Design Patterns.            |
| [**Deployment**](https://docs.baselithcore.xyz/advanced/deployment/)                 | Production-ready deployment strategies.               |

---

## Contributing & License

We welcome contributions that adhere to our code standards. Please review [CONTRIBUTING.md](CONTRIBUTING.md).

BaselithCore is licensed under the **GNU Affero General Public License v3.0 (AGPL v3)**.
See [LICENSE](LICENSE) for full details.

---
Copyright © 2026 BaselithCore Team.
