API as Architecture

Embrace AI with every API.

One contract. Your APIs, services, databases — a design language that embraces both engineers and AI agents.

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 semantic execution infrastructure for AI-native enterprises.

From AI agents at the top to enterprise systems at the bottom — ApiHug is the operating language that connects them all, flanked by security, governance, observability, and collaboration.

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

Proto Semantic

Protobuf is AI-native by design.

ApiHug extends protobuf with a rich semantic layer — routing, validation, persistence, mocking — all declared in your .proto files. Typed fields, pagination, repeated inputs — structured semantics that LLMs understand without hallucinating.

hope.swagger.operation

HTTP routes, methods, pagination — declared on your RPCs. Generates OpenAPI specs, Spring controllers, and client SDKs automatically.

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 database, automatically.

Define your domain model in protobuf. ApiHug generates entities, migrations, and CRUD — schema, code, and API always in sync.

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.

No more hand-wiring layers. One proto contract generates services, database, SDKs, testing, and AI tooling — the same definition powers both human engineers and machine agents.

01

Protobuf Contract

Describe your API in Protocol Buffers — structured, typed, machine-readable.

02

Spring Boot Services

Controllers, DTOs, and service stubs — production-ready, zero boilerplate.

03

Database Schema

Tables, indexes, and migrations — generated from your entity annotations.

04

MCP & Agent Tools

MCP servers and tool schemas so AI agents can invoke your APIs safely.

Agent Native

Embrace the age of AI agents.

In the AI era, your API consumers are agents — not just developers. ApiHug hugs both: giving humans clean contracts and LLMs the structured semantics they need to understand — not guess at — your enterprise.

MCP Server Generation

Auto-generate MCP servers from your API contracts. AI agents discover and invoke services without custom integration.

Tool Schema & Catalog

Every endpoint becomes a typed tool definition with input, output, and pagination — exactly what LLMs need.

Agent Permission Model

RBAC and audit trails keep AI agents operating within safe enterprise boundaries.

Semantic API Contracts

Protobuf eliminates ambiguity. LLMs reason best against structured, typed definitions with clear semantics.

SDK & Language Bindings

Client SDKs for any language from one contract — Java, TypeScript, Python, Go.

Enterprise Governance

Observability, tracing, and compliance built into every generated artifact.

Enterprise Intent Compiler

From business intent to deployed systems. ApiHug hugs both humans and AI agents into a shared, unambiguous contract — the foundation for the entire enterprise lifecycle.

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