Back to Home
About
apcore (AI-Perceivable Core) is a schema-enforced module development framework providing a unified standard for AI-native capabilities. It ensures every interface is inherently perceivable by AI through enforced schemas, behavioral annotations, and rich intent metadata. The framework features a robust 10-step execution pipeline with integrated pattern-based ACL, a phase-based Approval System for human-in-the-loop enforcement, and a streaming execution protocol for long-running tasks. Built with enterprise-grade observability (OpenTelemetry, structured logging), apcore enables cross-language consistency between Python and TypeScript implementations.
Features
Schema-Driven: Mandatory input_schema, output_schema, and description
Approval System: Runtime human-in-the-loop enforcement of sensitive operations
Streaming Protocol: Standardized model for real-time and long-running outputs
AI Intent Metadata: Semantic hints like x-when-to-use and x-common-mistakes
Behavioral Annotations: readonly, destructive, idempotent, and open_world support
Execution Pipeline: 10-step pipeline with validation, ACL, and middleware
Observability: Built-in OpenTelemetry tracing, structured logging, and metrics
Cross-Language SDKs: Identical API and behavior across Python and TypeScript
Context Propagation: Unified trace_id and identity flow across the entire chain
Middleware (Onion Model): Composable hooks for logging, caching, and recovery
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