
6over3/libai
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
ネイティブツールの呼び出しとMCPをフルサポートして、任意のプログラミング言語またはアプリケーションでApple Intelligenceのオンデバイスファウンデーションモデルを埋め込むためのCライブラリ.
概要
任意のプログラミング言語のためのApple Intelligence 任意のプログラミング言語やアプリケーションのためのApple Intelligenceのオンデバイスファウンデーションモデルへのアクセスを提供するCライブラリ。 libai は、C インターフェイスを介して Apple の FoundationModels フレームワークをブリッジし、開発者が C、C++、Python、Rust、Go、または C 結合をサポートする言語に Apple のインテリジェンス機能を組み込むことを可能にします。 ライブラリは、ネットワーク接続や外部API呼び出しを必要としない、デバイス上のAIモデルに直接アクセスできます。 すべての処理は、ユーザーのデバイス上でローカルに行われます。 ライブラリは、ネットワーク接続や外部API呼び出しを必要としない、デバイス上のAIモデルに直接アクセスできます。 すべての処理は、ユーザーのデバイス上でローカルに行われます。 Intel Mac、MacBook、iPhone、iPad、Apple Vision ProなどのApple Siliconデバイスに対応しています。サポートされているプラットフォーム: - iOS 26.0 + - iPadOS 26.0 + - Macの触媒26.0 + - macOS 26.0 +(IntelとAppleのシリコン) - VisionOS 26.
概要(AI 翻訳)
任意のプログラミング言語のためのApple Intelligence
お問い合わせ
任意のプログラミング言語やアプリケーションのためのApple Intelligenceのオンデバイスファウンデーションモデルへのアクセスを提供するCライブラリ。
概要
libai は、C インターフェイスを介して Apple の FoundationModels フレームワークをブリッジし、開発者が C、C++、Python、Rust、Go、または C 結合をサポートする言語に Apple のインテリジェンス機能を組み込むことを可能にします。
ライブラリは、ネットワーク接続や外部API呼び出しを必要としない、デバイス上のAIモデルに直接アクセスできます。 すべての処理は、ユーザーのデバイス上でローカルに行われます。
ライブラリは、ネットワーク接続や外部API呼び出しを必要としない、デバイス上のAIモデルに直接アクセスできます。 すべての処理は、ユーザーのデバイス上でローカルに行われます。 Intel Mac、MacBook、iPhone、iPad、Apple Vision ProなどのApple Siliconデバイスに対応しています。 サポートされているプラットフォーム:
- iOS 26.0以降
- iPadOS 26.0以降
- Macの触媒26.0+
- macOS 26.0+(インテルとアップルシリコン)
- ビジョンOS 26.0+
##特徴
セッション管理に関するライブラリセンター。 アプリケーションは独立した構成と独立したAIセッションを作成します.
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
Apple Intelligence for any programming language
A C library that provides access to Apple Intelligence on-device Foundation models for any programming language or application.
Overview
libai bridges Apple’s FoundationModels framework through a C interface, enabling developers to integrate Apple Intelligence capabilities into applications written in C, C++, Python, Rust, Go, or any language that supports C bindings.
The library provides direct access to on-device AI models without requiring network connectivity or external API calls. All processing occurs locally on the user’s device.
The library provides direct access to on-device AI models without requiring network connectivity or external API calls. All processing occurs locally on the user’s device. It supports Intel Macs, Apple Silicon devices including MacBooks, iPhones, and iPads, as well as Apple Vision Pro. Supported platforms:
- iOS 26.0+
- iPadOS 26.0+
- Mac Catalyst 26.0+
- macOS 26.0+ (Intel and Apple Silicon)
- visionOS 26.0+
Features
The library centers around session management. Applications create isolated AI sessions with independent configurations. Text generation operates in both synchronous and asynchronous modes with streaming callbacks available for real-time interfaces.
Structured response generation ensures AI output conforms to predefined JSON schemas. The library validates responses and provides both text and structured object representations.
Tool integration enables AI models to execute functions and interact with external systems. Applications can register native C callback functions as compile-time tools or utilize external MCP servers for runtime tool integration.
Tool definitions use JSON schemas following the Claude tool format for parameter validation and documentation.
System Requirements: macOS 26.0 or later with Apple Intelligence enabled.
Installation
# Download latest release
curl -L https://github.com/6over3/libai/releases/latest/download/libai.tar.gz | tar xz
# Build from source
git clone https://github.com/6over3/libai.git
cd libai
make
Quick Start
#include "ai.h"
// Initialize library
ai_init();
// Create context and session
ai_context_t *ctx = ai_context_create();
ai_session_id_t session = ai_create_session(ctx, NULL);
// Generate response
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →