API as Architecture

One contract for APIs, systems, and agents.

Define APIs, services, databases, and AI tools from one protobuf contract. ApiHug keeps engineers and agents on the same system model.

Quick start
$ iex (irm 'https://raw.githubusercontent.com/apihug/apihug.github.io/main/helper/apihug-install.ps1')
order.proto
Define your API contract in protobuf
syntax = "proto3";service OrderService {  rpc Place ()    returns () {                    };    }}
OrderController.java
ApiHug generates your API controller
@RestControllerpublic class OrderController {  @PostMapping("/order/place")  public     place() {    // Generated by ApiHug  }}

The Blueprint

The operating language between AI and enterprise systems.

Single contract. Shared runtime. Security, governance, observability, and collaboration across the stack.

ApiHug Architecture Blueprint - Semantic Execution Infrastructure for AI-Native Enterprises

Proto Semantic

Protobuf with execution semantics.

ApiHug extends protobuf with routing, validation, persistence, mocking, and versioning. Structured semantics stay in the contract, where engineers and LLMs can use them reliably.

hope.swagger.operation

Routes, methods, and pagination declared on RPCs. Generates OpenAPI, Spring controllers, and client SDKs.

service OrderService {  // Service-level config  option (hope.swagger.svc) = {    path: "/order";    description: "Order Service";  }  rpc Place (PlaceOrderRequest)    returns (OrderPlacedResponse) {    option (hope.swagger.operation) = {      post: "/place";      description: "place a new order";    };  }  rpc Query (QueryOrderRequest)    returns (OrderView) {    option (hope.swagger.operation) = {      get: "/query";      pageable: true;    };  }}
hope.swaggerAPI & OpenAPI routing
hope.persistenceDomain entities & Liquibase
hope.constantEnum constants & errors
hope.mock40+ nature type generators
hope.domainViews & query objects
hope.versionAPI versioning strategy

Entity Design

From proto to persistence, automatically.

Define entity structure in protobuf. ApiHug generates entities, migrations, and CRUD so schema, code, and API stay aligned.

message Movie {  string name = 1 [(hope.persistence.column) = {    name: "NAME",    description: "Name of the movie",    type: VARCHAR, length: { value: 64 }  }];  string description = 2 [(hope.persistence.column) = {    name: "DESCRIPTION",    type: VARCHAR, length: { value: 255 }  }];  MovieLevel level = 3 [(hope.persistence.column) = {    enum_type: STRING,    type: VARCHAR, length: { value: 16 }  }];  option (hope.persistence.table) = {    name: "MOVIE",    wires: [IDENTIFIABLE, AUDITABLE]  };}

Enterprise Factory

One definition. Everything generated.

One proto contract generates services, database artifacts, SDKs, tests, and AI tooling. The same definition serves engineers, clients, and agents.

01

Protobuf Contract

Describe the API in Protocol Buffers: structured, typed, and machine-readable.

02

Spring Boot Services

Controllers, DTOs, and service stubs generated with minimal manual wiring.

03

Database Schema

Tables, indexes, and migrations generated from entity metadata.

04

MCP & Agent Tools

MCP servers and typed tools so agents can call your APIs safely.

Agent Native

Make your APIs ready for AI agents.

Agents are now API consumers. ApiHug gives them typed tools, governed access, and the same contract model your engineers already use.

MCP Server Generation

Generate MCP servers from API contracts so agents can discover and invoke services without custom glue.

Tool Schema & Catalog

Turn endpoints into typed tools with clear inputs, outputs, and pagination.

Agent Permission Model

Apply RBAC and audit trails so agent actions stay within enterprise boundaries.

Semantic API Contracts

Use structured protobuf contracts that reduce ambiguity for both humans and LLMs.

SDK & Language Bindings

Generate client bindings from one contract for Java, TypeScript, Python, and Go.

Enterprise Governance

Carry observability, tracing, and compliance through generated artifacts.

Enterprise Intent Compiler

From business intent to deployed systems. ApiHug gives humans and AI agents one unambiguous contract across the delivery lifecycle.

Explore MCP
Copyright © 2026 ApiHug·AI-native Enterprise Architecture Factory