Open source · MIT · Internal developer platform

Self-service infrastructure, as APIs.

InfraPI turns the infrastructure products you already run into governed, multi-tenant REST APIs. One URL layout, one token, one RBAC model, an OpenAPI contract enforced on every request — so a portal, a CLI or a pipeline creates what it needs without a ticket.

One consistent surface for every API /apis/{group}/{version}/namespaces/{ns}/{resource} OpenAPI enforced RFC 9457 errors Prometheus · OpenTelemetry

The problem

Platform teams drown in tickets and one-off integrations

Tickets instead of APIs

Teams wait days for a host, a DNS record or a dashboard that a script could create in seconds.

One-off integrations

Every internal API in front of a product is a hand-written client of that product, to keep in step with each of its releases.

Tenancy bolted on

Who may create what, in which team's space, is re-invented in each tool — or left to shared admin credentials.

How it fits together

Composable layers, adopted one at a time

Products

Each one stands alone. Together, they are a platform.

Kayra

v0.14.0

Identity, namespaces and RBAC for your platform.

Who callers are, which namespace they act in, what they may do there, and which APIs each namespace is subscribed to.

tofu-api

v0.12.0 · early

Any OpenTofu provider as a REST API, and as MCP tools for AI agents.

An OpenAPI contract generated from the provider's schemas, MCP tools generated from the contract, rules in one YAML file per provider, no code per resource.

ulgen

v0.5.0 · early

One MCP endpoint for AI agents, in front of every API of the platform.

The APIs found in Kayra's catalog, their tools behind one endpoint after one login, every call made as the caller and checked by its API.

lib

v0.22.0

The Go foundation of every InfraPI service.

URL layout, auth, contract enforcement, RFC 9457 errors, MCP for AI agents, metrics, tracing and Vault, shared by every service.

How it works

From a Terraform provider to a governed API in three steps

  1. 01

    Describe

    Pick the resource types of an OpenTofu provider to expose, and the rules over them, in one YAML file.

    provider:
      source: hashicorp/aws
      version: 6.0.0
      config:
        region: ${AWS_REGION}
    resources:
      aws_instance:
        attributes:
          instance_type:
            enum: [t3.micro, t3.small]
    
  2. 02

    Serve

    One binary for every provider. The OpenAPI contract is generated from the provider's schemas at start.

    systemctl enable --now tofu-api@aws
    # contract at /aws/v1/-/openapi/aws/v1.json
    # Swagger UI at /aws/v1/-/docs
    
  3. 03

    Call

    Any caller gets a plain REST API, checked against the contract, scoped to its namespace — and AI agents the same API over MCP.

    curl -X POST \
      :8080/aws/v1/namespaces/acme/instance \
      -d '{"ami":"ami-0abc…",
           "instance_type":"t3.micro"}'
    # AI agents: MCP at /aws/v1/-/mcp
    

Why InfraPI

Built for platform teams who run their own infrastructure

Composable

Adopt one piece at a time — tofu-api alone in front of one product, Kayra for tenancy and RBAC, ulgen for AI agents, lib for your own services.

Contract-first

Every API serves its OpenAPI contract and rejects any request that does not match it, before a handler runs.

Multi-tenant by design

Each tenant, a team or a customer, owns its namespaces. With tofu-api each namespace runs with its own credentials from Vault, so isolation comes from the credentials.

Plain to operate

Single Go binaries, systemd units, RPM and DEB packages, Prometheus metrics and OpenTelemetry traces. No cluster required.

Open source, MIT licensed

Every InfraPI product is developed in the open. Use it, fork it, open an issue or send a pull request.