Metadata-Version: 2.4
Name: fabricatio-core
Version: 0.1.3.dev0
Requires-Dist: asyncio>=3.4.3
Requires-Dist: asyncstdlib>=3.13.0
Requires-Dist: json-repair>=0.39.1
Requires-Dist: litellm>=1.60.0
Requires-Dist: loguru>=0.7.3
Requires-Dist: more-itertools>=10.6.0
Requires-Dist: pydantic>=2.10.6
Requires-Dist: pymitter>=1.0.0
Requires-Dist: rich>=13.9.4
Requires-Dist: ujson>=5.10.0
License-File: LICENSE
Summary: A foundational Python library providing core components for building LLM-driven applications using an event-based agent structure.
Author-email: Whth <zettainspector@foxmail.com>
Requires-Python: >=3.12, <3.14
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/Whth/fabricatio
Project-URL: Repository, https://github.com/Whth/fabricatio
Project-URL: Issues, https://github.com/Whth/fabricatio/issues

# `fabricatio-core`

A foundational Python library providing core components for building LLM-driven applications using an event-based agent
structure.

## 📦 Installation

This package is part of the `fabricatio` monorepo and is available as a single package:

```bash
pip install fabricatio
```

## 🔍 Overview

Provides essential tools for:

- Event-based architecture patterns
- Role-based agent execution framework
- Task scheduling and management
- File system operations and content detection
- Logging and diagnostics
- Template rendering and configuration handling
- Type-safe data models for common entities
- Asynchronous execution utilities

Built on a hybrid Rust/Python foundation for performance-critical operations.

## 🧩 Key Features

- **Event System**: Reactive architecture with event emitters and listeners
- **Role Framework**: Agent roles with workflow dispatching capabilities
- **Task Engine**: Status-aware task management with dependencies
- **Toolbox System**: Callable tool registry with rich metadata
- **Type Models**: Pydantic-based models for consistent data structures
- **File Utilities**: Smart file operations with content type detection
- **Template Engine**: Handlebars-based template rendering system
- **Language Tools**: Language detection and text processing utilities

## 📁 Structure

```
fabricatio-core/
├── capabilities/     - Core capability definitions
├── decorators.py     - Common function decorators
├── emitter.py        - Event emission and handling
├── fs/               - File system operations
├── journal.py        - Logging infrastructure
├── models/           - Core data models
│   ├── action.py     - Action base classes
│   ├── generic.py    - Base traits (Named, Described, etc.)
│   ├── role.py       - Role definitions
│   ├── task.py       - Task abstractions
│   └── tool.py       - Tool interfaces
├── parser.py         - Text parsing utilities
├── rust.pyi          - Rust extension interfaces
├── utils.py          - General utility functions
└── __init__.py       - Package entry point
```

## 📄 License

MIT – see [LICENSE](LICENSE)

GitHub: [github.com/Whth/fabricatio](https://github.com/Whth/fabricatio)
