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.3-cp310-abi3-win_amd64.whl (18.1 MB view details)

Uploaded CPython 3.10+Windows x86-64

ailoy_py-0.2.3-cp310-abi3-manylinux_2_28_x86_64.whl (17.1 MB view details)

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

ailoy_py-0.2.3-cp310-abi3-macosx_15_0_arm64.whl (12.2 MB view details)

Uploaded CPython 3.10+macOS 15.0+ ARM64

File details

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

File metadata

  • Download URL: ailoy_py-0.2.3-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.3-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 782f73cdbe94ea69249e800fffead7f367b083504d59d0d1f3a15e20a39e073e
MD5 df8312e07194259954376fea8665afc7
BLAKE2b-256 bfbdd7b4be4e5845028cbf626908c41809696f239e8a740dad0ebea07dc19861

See more details on using hashes here.

Provenance

The following attestation bundles were made for ailoy_py-0.2.3-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.3-cp310-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ailoy_py-0.2.3-cp310-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1e440532e53d7f2428b644938b6b0f3f8370e6d026753aa173c1baf16f0e42b6
MD5 b61f174f7c52bfd645416ec910082945
BLAKE2b-256 957693707ff51ee71e6eda7b1a29b75a2c6734579786d234dc01004aa3452a11

See more details on using hashes here.

Provenance

The following attestation bundles were made for ailoy_py-0.2.3-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.3-cp310-abi3-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for ailoy_py-0.2.3-cp310-abi3-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 f0bdba5e45c887ed39a8d1fb7e07017e5ca30e7858b5eb086772d32fe0d8d4cc
MD5 4ae136a66a8a76b1490ec00bd5741467
BLAKE2b-256 01724edb124b15c8ee4f58f4495093e62a7c0eea91bfddb1eeb63e797e970e80

See more details on using hashes here.

Provenance

The following attestation bundles were made for ailoy_py-0.2.3-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