6L

6over3/libai

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

34 stars 6 forks 품질 43 트렌드 12MIT

Apple Intelligence on-device Foundation 모델을 기본 도구 호출 및 MCP에 대한 전체 지원으로 프로그래밍 언어 또는 응용 프로그램에 포함하기위한 C 라이브러리.

개요

모든 프로그래밍 언어에 대한 Apple Intelligence Apple Intelligence on-device Foundation 모델에 액세스 할 수있는 C 라이브러리. libai Bridges Apple의 FoundationModels Framework를 통해 C 인터페이스를 통해 개발자가 C, C++, Python, Rust, Go, 또는 C 바인딩을 지원하는 언어에 Apple Intelligence 기능을 통합할 수 있습니다. 라이브러리는 네트워크 연결 또는 외부 API 호출을 요구하지 않고 on-device AI 모델에 직접 액세스를 제공합니다. 모든 처리는 사용자의 장치에 현지으로 발생합니다. 라이브러리는 네트워크 연결 또는 외부 API 호출을 요구하지 않고 on-device AI 모델에 직접 액세스를 제공합니다. 모든 처리는 사용자의 장치에 현지으로 발생합니다. 그것은 지원 인텔 맥, 맥북, 아이폰, 및 아이 패드, 뿐만 아니라 애플 비전 프로. 지원 플랫폼: - iOS 26.0+ - iPadOS 26.0+ - Mac Catalyst 26.0+ - macOS 26.0+ (인텔 및 애플 실리콘) - VisionOS 26.

개요(AI 번역)

모든 프로그래밍 언어에 대한 Apple Intelligence


Apple Intelligence on-device Foundation 모델에 액세스 할 수있는 C 라이브러리.

개요

libai Bridges Apple의 FoundationModels Framework를 통해 C 인터페이스를 통해 개발자가 C, C++, Python, Rust, Go, 또는 C 바인딩을 지원하는 언어에 Apple Intelligence 기능을 통합할 수 있습니다.

라이브러리는 네트워크 연결 또는 외부 API 호출을 요구하지 않고 on-device AI 모델에 직접 액세스를 제공합니다. 모든 처리는 사용자의 장치에 현지으로 발생합니다.

라이브러리는 네트워크 연결 또는 외부 API 호출을 요구하지 않고 on-device AI 모델에 직접 액세스를 제공합니다. 모든 처리는 사용자의 장치에 현지으로 발생합니다. 그것은 지원 인텔 맥, 맥북, 아이폰, 및 아이 패드, 뿐만 아니라 애플 비전 프로. 지원되는 플랫폼:

  • 아이폰 OS 26.0+
  • 아이 패드 26.0+
  • 맥 촉매 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
GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →