Skip to main content

Aibaba AI Core library for building AI Agents

Project description

🍎️ Aibaba AI Core Foundation

Downloads License: MIT

Installation

pip install aibaba-ai-core

Overview

Aibaba AI Core provides fundamental building blocks that serve as the foundation for the entire Aibaba AI ecosystem.

These foundational components are intentionally kept minimal and modular. They include essential abstractions for various components such as language models, document processing, embedding systems, vector databases, retrieval mechanisms, and more.

By establishing these standard interfaces, any provider can implement them and seamlessly integrate with the broader Aibaba AI ecosystem.

For comprehensive documentation, visit the API reference.

1️⃣ Primary Interface: Runnables

Runnables form the backbone of Aibaba AI Core. This interface is implemented by most components, providing:

  • Unified execution methods (invoke, batch, stream, etc.)
  • Built-in support for error handling, fallbacks, schemas, and runtime configuration
  • Integration with Aibaba AI Build for deployment

Learn more in the runnable documentation. Key components implementing this interface include: LLMs, Chat Models, Prompts, Retrievers, Tools, and Output Parsers.

Two approaches to using Aibaba AI Core:

  1. Direct (Imperative): Straight function calls like model.invoke(...)

  2. Compositional (Declarative): Using Aibaba AI Expression Language (LCEL)

  3. Hybrid: Combine both approaches by including custom functions within LCEL sequences

Capability Direct Method Compositional Method
Code Style Standard Python LCEL
Tracing ✅ – Built-in ✅ – Built-in
Parallel ✅ – Via threads/coroutines ✅ – Automatic
Streaming ✅ – Through yield ✅ – Automatic
Async ✅ – Using async/await ✅ – Automatic

⚡️ Understanding LCEL

Aibaba AI Expression Language (LCEL) is a declarative approach for combining Aibaba AI Core components into sequences or directed acyclic graphs (DAGs), addressing common LLM integration patterns.

LCEL sequences are automatically optimized for execution, featuring parallel processing, streaming capabilities, tracing, and asynchronous operations.

Explore more in the LCEL documentation.

For complex workflows requiring cycles or recursion, consider LangGraph.

📕 Version Management

Current version: 0.1.x

As the foundational layer of Aibaba AI, we maintain strict version control with advance notifications of changes. The aibaba-ai-core.beta module is exempt from this policy to allow rapid innovation.

Version increment guidelines:

Minor versions (0.x.0):

  • Breaking changes to public APIs outside aibaba-ai-core.beta

Patch versions (0.0.x):

  • Bug fixes
  • Feature additions
  • Internal interface changes
  • aibaba-ai-core.beta modifications

💁 Community Participation

We actively encourage contributions to this open-source project, whether through new features, infrastructure improvements, or documentation enhancements.

See our Contributing Guide for details.

⛰️ Benefits of Aibaba AI Core

As the foundation for the entire Aibaba AI ecosystem, building on Aibaba AI Core offers several advantages:

  • Independent Components: Built around provider-agnostic, standalone abstractions
  • Reliable API: Committed to stable versioning with clear communication about changes
  • Production-Ready: Extensively tested and widely deployed across the LLM ecosystem
  • Open Development: Active community participation and contribution-friendly environment

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aibaba_ai_core-0.3.30.tar.gz (332.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aibaba_ai_core-0.3.30-py3-none-any.whl (412.2 kB view details)

Uploaded Python 3

File details

Details for the file aibaba_ai_core-0.3.30.tar.gz.

File metadata

  • Download URL: aibaba_ai_core-0.3.30.tar.gz
  • Upload date:
  • Size: 332.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/5.15.167.4-microsoft-standard-WSL2

File hashes

Hashes for aibaba_ai_core-0.3.30.tar.gz
Algorithm Hash digest
SHA256 857df93d66823c6b88b57713074bfc0593a8e80e92f92cba706e50195d2a82bb
MD5 d1856e5733e1a6cff1e0cee6d1653d9a
BLAKE2b-256 474260b2cbbc341f3f2a56f5af5c963007b678d9bafc85e5f3b55631edc60076

See more details on using hashes here.

File details

Details for the file aibaba_ai_core-0.3.30-py3-none-any.whl.

File metadata

  • Download URL: aibaba_ai_core-0.3.30-py3-none-any.whl
  • Upload date:
  • Size: 412.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/5.15.167.4-microsoft-standard-WSL2

File hashes

Hashes for aibaba_ai_core-0.3.30-py3-none-any.whl
Algorithm Hash digest
SHA256 d00dee5ea7d2797957f58442dc484645e1f818f99df5e2575b3fe0bfe114fd2a
MD5 770eb7fcd83785c7453bbd2dfb415f13
BLAKE2b-256 36a73aaa05c1b93b831305088dcd746a6a97360c3645250a634c9edda74f5a87

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page