| description | How apcore, an embeddable microframework, governs application capabilities across agent and code entry points. |
|---|
apcore is an embeddable microframework for application capabilities that agents and code can call. It pairs a language-agnostic module standard with a protocol-neutral runtime. Applications can embed an SDK and extend the runtime through interfaces for discovery, middleware, access control, approval, validation, and trace export.
Agents can only use application capabilities reliably when four things remain aligned:
- the input and output contract;
- the behavioral meaning of the operation;
- the rules that decide whether the call may execute; and
- the evidence produced after execution.
Protocol servers can publish tools, but each server still has to implement those runtime rules. Application teams also need the same capability to behave consistently when it is called from direct code, a CLI, an HTTP endpoint, MCP, or A2A.
apcore owns that execution boundary. It defines a capability once, validates the contract, applies ACL and approval policy, runs middleware, executes the implementation, validates the result, and emits traceable outcome data.
Application code and framework endpoints
│
▼
┌───────────────────────────────────────────────┐
│ apcore capability definition and runtime │
│ │
│ schema · annotations · identity · ACL │
│ approval · middleware · execution · audit │
└───────────────────────────────────────────────┘
│
▼
┌──────────┬──────────┬──────────┬──────────────┐
│ MCP │ A2A │ CLI │ HTTP / code │
│ adapter │ adapter │ adapter │ integrations │
└──────────┴──────────┴──────────┴──────────────┘
Higher-level projects build on this execution boundary. apexe uses apcore to govern access to existing CLI tools and HTTP APIs. apflow coordinates distributed tasks and uses the apcore module standard to make capabilities callable by agents.
Every module has a description plus input and output schemas. The standard strategy validates calls against those schemas. This gives callers a machine-readable contract they can test.
Behavioral annotations describe properties such as readonly, destructive, idempotent, requires_approval, and open_world. ACL, identity, approval policy, and call-chain guards turn those properties into enforceable execution decisions.
The standard strategy defines the order for module lookup, governance, validation, middleware and execution. Steps such as approval and middleware act when the call requires them. The pipeline strategy determines which steps are available to an executor.
Trace context, structured errors, events, metrics hooks, and usage exporters make calls inspectable. Deployments choose their storage, retention, and compliance policy; apcore supplies the runtime signals rather than claiming compliance on their behalf.
MCP and A2A define communication surfaces. apcore defines and governs the capability behind a surface.
MCP already supports tool schemas and annotations. apcore does not claim those features are absent. Its value is that the same schema and governance rules can be enforced before a call reaches business logic and reused outside MCP.
The official adapters are independently versioned projects:
| Surface | Project | Role |
|---|---|---|
| MCP | apcore-mcp |
Project registered modules as MCP tools |
| A2A | apcore-a2a |
Project modules as A2A skills and Agent Card metadata |
| CLI | apcore-cli |
Map module schemas to commands and arguments |
| OpenAPI import | apcore-toolkit |
Register selected HTTP operations as proxy modules or export bindings for review |
| HTTP frameworks | fastapi-apcore, django-apcore, flask-apcore, nestjs-apcore, axum-apcore |
Bind framework endpoints and apcore modules |
| Direct code | Core SDK | Register and invoke modules without a transport adapter |
| If you need… | Recommended choice |
|---|---|
| A single standalone MCP server or script with no shared ACL, approval, or audit policy | Use the MCP / protocol SDK directly — apcore adds a layer you do not need yet. |
| The same capability called from code, HTTP, CLI, MCP, or A2A with consistent validation, ACL, approval, and trace evidence | Use apcore to own the execution boundary, and attach only the surface adapters you need. |
The normative protocol is implemented in Python, TypeScript, and Rust. Cross-language consistency means shared protocol behavior and conformance expectations, not identical internal code structure.
Language SDKs and adapters have separate release lifecycles. Refer to package metadata and each adapter's compatibility declaration rather than assuming all ecosystem packages share one version.
The primary adoption path is deliberately narrow:
- start with one existing application capability;
- define its schema and behavioral annotations;
- invoke it through the native SDK with validation, ACL, approval, and trace context;
- expose it through
apcore-mcpor another required surface; and - verify that denied, approved, failed, and successful calls produce the expected evidence.
An existing application can serve workbench views, file previews, and downloads through its HTTP stack. Register operations whose stable contracts benefit from shared governance or reuse. Stable domain queries qualify alongside mutations. Select registered capabilities first, then configure what each surface publishes. See Integrating apcore into Existing Projects.
??? note "Documentation claims discipline (for contributors)"
Project documentation and websites must distinguish among:
- **implemented**: present in released code and covered by the repository's tests;
- **supported**: documented with a maintained compatibility contract;
- **experimental**: available for evaluation without a stability promise; and
- **planned**: a roadmap item, not a current capability.
Do not use maturity claims such as “enterprise-grade” or “production ready” without published adoption evidence and an explicit support policy. Do not describe research documents or adjacent projects as part of the normative apcore contract.
A schema makes a capability contract machine-readable and validatable; it does not guarantee that a model will choose the right tool or recover from an error on its own.
- Protocol specification — normative behavior
- Scope — project boundaries
- Roadmap — current priorities and gates
- Adopters — public adoption evidence
- Language repository package metadata — released SDK versions