The AI ecosystem is currently in a chaotic "pre-HTTP" era.
We are all hand-coding JSON schemas, bespoke MCP servers, and fragile wrappers. It’s a mess of "glue code" that breaks the moment a function signature changes. But as AI moves from simple chat to autonomous action, "glue code" isn't enough. We need a foundation.
Enter apcore — the universal framework for the Cognitive Interface era.
It doesn't just "connect" tools; it redefines how software is perceived and safely invoked by AI, reducing token bloat by 90% and enabling self-healing agents.
The Problem: The "Documentation Gap"
Traditional modules are built for code-to-code interaction. They lack the Intent and Semantic Metadata that AI needs to make autonomous decisions.
When you manually wrap functions for OpenAI or Claude, you create a maintenance nightmare:
Schema Drift: Change a function signature, and your JSON Schema breaks.
Context Blindness: The LLM doesn't know if a tool is "destructive" or "read-only" until it's too late.
Token Bloat: Sending massive documentation for 50 tools wastes context and money.
The Solution: apcore (AI-Perceivable Core)
apcore is not just another wrapper. It’s a universal development framework that enforces a "Schema-First" approach. It defines the Cognitive Interface — a standardized way for AI to discover, understand, and safely invoke code.
[ Application Layer ] Django / Flask / NestJS / Legacy Systems
|
[ Core Layer ] apcore (Registry & Executor)
|
[ Protocol Layer ] /------|------\
MCP A2A OpenAI / Tools
| |
[ AI Layer ] Claude Agents GPT-4o
- The 4 Integration Paths (Zero to Native) apcore is designed for progressive adoption. You don't need to rewrite your app:
Path Invasiveness Use Case
Class-based High New, heavy-duty modules with complex validation.
@module Decorator Low One-line change to existing Python/TS functions.
module() Call Very Low Wrap existing methods without touching source code.
YAML Binding Zero Map legacy or 3rd-party code using apcore-toolkit.
- Progressive Disclosure: Saving your Token Budget apcore uses a Three-Layer Metadata design inspired by Claude's Skill standards. This allows for Progressive Disclosure:
Discovery Phase: AI only reads the description (≤200 chars).
Decision Phase: AI fetches the full documentation and input_schema only for candidate tools. Result: Up to 90% reduction in initial token consumption for large toolsets.
- Self-Healing Agents with ai_guidance Standard errors are for programs. apcore introduces ai_guidance. When a tool fails, the framework doesn't just return a stack trace; it provides a human-readable hint telling the Agent how to fix the error and retry.
The apcore Ecosystem
apcore is the foundation for a suite of specialized adapters:
[apcore-mcp]: Instantly turn your modules into an MCP Server for Claude Desktop or Cursor.
[apcore-a2a]: The future of Agent-to-Agent communication. Expose your logic as a standards-compliant A2A server.
[apcore-toolkit]: The "Migration Engine." Automatically scan your Django/Flask/Express projects and generate apcore bindings.
Enterprise Safety: NIST 2026 Compliance
Security isn't an afterthought. apcore is built to address the 2026 U.S. Federal Government RFI on AI Agent Security:
Default-Deny ACL: Pattern-based access control. api.* can call orchestrator.*, but never executor.db_delete directly.
Human-in-the-Loop (HITL): Modules tagged with requires_approval=True trigger mandatory safety gates.
Auditability: W3C-compliant trace_id propagation tracks the entire "trajectory" of an agent's decisions across your stack.
Quick Start (Python)
from apcore import module
@module(
id="calculator.add",
description="Add two integers",
annotations={"readonly": True}
)
def add(a: int, b: int) -> int:
return a + b
Expose to Claude via MCP in one command:
pip install apcore-mcp
python -m apcore_mcp --extensions-dir ./modules
Conclusion
Building for AI shouldn't mean double the work. With apcore, you build once and invoke via Code, CLI, REST, MCP, or A2A.
Stop writing glue code. Start building the Cognitive Interface.
GitHub: https://github.com/aipartnerup Docs: https://apcore.aipartnerup.com/ SDKs: Available in Python and TypeScript with identical semantics.
Top comments (0)