Back to Home
About
apcore (AI-Perceivable Core) is a schema-enforced module development framework where every interface is inherently perceivable by AI. It enforces input_schema, output_schema, and description on every module, making interfaces naturally understandable by both humans and AI. The framework supports four development approaches: class-based modules, @module decorator, function call registration, and external YAML binding — allowing progressive integration from new projects to legacy systems. apcore is a language-agnostic specification; any language can implement a conformant SDK.
Features
Schema-Driven: All modules enforce input_schema / output_schema / description
AI-Perceivable: Schema enables AI/LLM perception — a design requirement, not optional
Cross-Language Spec: Language-agnostic protocol, any language can implement
Four Development Approaches: Class-based, @module decorator, function call, YAML binding
ACL Access Control: Controls which modules can call which, default deny
Observability: Built-in tracing (OpenTelemetry), structured logging, metrics
Context Object: Carries trace_id, caller_id, call chain, identity throughout execution
Middleware: Onion model for custom logic (logging, caching, rate limiting, retry)
Three-Layer Schema: Core (required) + Annotation (optional) + Extension (custom)
Progressive Integration: Existing code gains AI-perceivable capability via decorators or YAML
Install
pip install apcoreQuick Start
from apcore import module
@module(description="Add two integers", tags=["math"])
def add(a: int, b: int) -> int:
return a + b
# Schema is auto-inferred from type annotations
# AI can now perceive: input_schema, output_schema, description