Skip to main content

A lightweight library for building AI applications

Project description

ailoy-py

Ailoy is a lightweight library for building AI applications — such as agent systems or RAG pipelines — with ease. It is designed to enable AI features effortlessly, one can just import and use.

See our documentation for more details.

Install

pip install ailoy-py

Quickstart

Asynchronous version (recommended)

import asyncio

import ailoy as ai


async def main():
    # Create Qwen3-0.6B local LangModel
    model = await ai.LangModel.new_local("Qwen/Qwen3-0.6B")

    # Create an agent using this model
    agent = ai.Agent(model)

    # Ask a prompt and iterate over agent's responses
    async for resp in agent.run("What is your name?"):
        print(resp)


if __name__ == "__main__":
    asyncio.run(main())

Synchronous version

import ailoy as ai


def main():
    # Create Qwen3-0.6B LocalLanguageModel
    model = ai.LangModel.new_local_sync("Qwen/Qwen3-0.6B")

    # Create an agent using this model
    agent = ai.Agent(model)

    # Ask a prompt and iterate over agent's responses
    for resp in agent.run_sync("What is your name?"):
        print(resp)


if __name__ == "__main__":
    main()

Building from source

Prerequisites

  • Rust >= 1.88
  • Python >= 3.10
  • C/C++ compiler (recommended versions are below)
    • GCC >= 13
    • LLVM Clang >= 17
    • Apple Clang >= 15
    • MSVC >= 19.29
  • CMake >= 3.28.0
  • Git
  • OpenMP (required to build Faiss)
  • BLAS (required to build Faiss)
  • LAPACK (required to build Faiss)
  • Vulkan SDK (on Windows and Linux)

[!WARNING] To build binding, you must change the crate type to cdylib in Cargo.toml.

[lib]
crate-type = ["dylib"] # <- Change this to ["cdylib"]

Setup development environment

pip install maturin

# This generates `_core.cpython-3xx-darwin.so` under `ailoy/`
maturin develop

Generate wheel

maturin build --out ./dist

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

ailoy_py-0.2.4-cp310-abi3-win_amd64.whl (18.1 MB view details)

Uploaded CPython 3.10+Windows x86-64

ailoy_py-0.2.4-cp310-abi3-manylinux_2_28_x86_64.whl (18.2 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ x86-64

ailoy_py-0.2.4-cp310-abi3-macosx_15_0_arm64.whl (13.0 MB view details)

Uploaded CPython 3.10+macOS 15.0+ ARM64

File details

Details for the file ailoy_py-0.2.4-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: ailoy_py-0.2.4-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 18.1 MB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ailoy_py-0.2.4-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 5ad01b9c0bf2831e606a6408ed6a664754a7c170329bcb8c4fc315c12e35e5fc
MD5 32a81e6bf313144a1134fe1bb9a5743d
BLAKE2b-256 67dbb211368962c0ff3df9d90c264441d867d09dc42f8b15ee12802cd95a6ee6

See more details on using hashes here.

Provenance

The following attestation bundles were made for ailoy_py-0.2.4-cp310-abi3-win_amd64.whl:

Publisher: build_python_windows.yaml on brekkylab/ailoy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ailoy_py-0.2.4-cp310-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ailoy_py-0.2.4-cp310-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6bd1cdd2950a3e5e2e5a6924c984384009e7e22a7164264b39b8870be2f9ee65
MD5 1293fe1074eff5fe1f95811ad8b143ea
BLAKE2b-256 ef2899ebdcfaa84442f4b899ff2d01d5025088315397a4cd5ec2205c0b2c2e22

See more details on using hashes here.

Provenance

The following attestation bundles were made for ailoy_py-0.2.4-cp310-abi3-manylinux_2_28_x86_64.whl:

Publisher: build_python_linux.yaml on brekkylab/ailoy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ailoy_py-0.2.4-cp310-abi3-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for ailoy_py-0.2.4-cp310-abi3-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 7ba071f098a22a6267a7330a9aaac59ad4ab5df290d920b93649f68e12910d46
MD5 ac8622d178146a3e55a05b54522881b4
BLAKE2b-256 47a0e8e5d6f4bfb00b7fd1efbab4e119ca94887539a208e98b33fc09c623c37a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ailoy_py-0.2.4-cp310-abi3-macosx_15_0_arm64.whl:

Publisher: build_python_macos.yaml on brekkylab/ailoy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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