One governed way into your RPG programs.

On most IBM i estates, other systems reach the business logic through queues and through SQL sent straight to the database. Both work. Neither gives you a contract, a version or one place to govern. slay400 puts an API gateway in front of the RPG programs and gives those APIs the same lifecycle as the rest of your APIs.

Queues and direct SQL

Before: integration through queues and direct SQL Four kinds of consumer reach IBM i in two ways. Some put messages on queues that RPG programs read. Others run SQL over JDBC straight against the Db2 for i tables, which goes around the RPG programs and their business rules. IBM iWeb shopPartner systemsInternal appsReports and batchQueuesdata queues, MQDirect SQLJDBC on Db2 for iRPG programsbusiness rulesDb2 for itablesgoes around the programs

Scroll to see the full diagram.

  • The interface is a layout. Message formats and table columns are the contract, and they are documented wherever someone last wrote them down.

  • Rules can be skipped. SQL that writes to the tables does not run the validations in your RPG programs.

  • Consumers know your schema. Changing a column means finding everyone who reads it first.

  • Credentials spread. Each consumer holds its own database profile.

  • Async by convention. Correlation, retries and error handling are solved again for every queue.

  • Change is hard to see. No version tells a consumer what changed, or you who is affected.

An API gateway in front of the programs

After: one governed gateway in front of the RPG programs Every consumer, including AI agents, calls the slay400 gateway. The gateway offers REST, asynchronous request-reply, events and MCP tools, and calls the RPG programs, which remain the only code that touches the Db2 for i tables. Below, the delivery flow: PCML and overlay in Git, a pull request that validates, compares and tests, and a versioned bundle that the gateway loads without a restart. IBM islay400 gatewayversioned API contractsRESTAsync request-reply *Events (Pub/Sub) *MCP tools ** Enterprise and SaaSWeb shopPartner systemsInternal appsAI agentsRPG programsbusiness rulesDb2 for itablesprogramcallHow a change gets thereGitPCML + overlayPull requestvalidate, compare, mock testsVersioned bundleloaded without a restart

Scroll to see the full diagram.

  • One front door. Consumers call an API. The RPG program stays the only code that touches the data.

  • A contract for every program. An OpenAPI document generated from the PCML your compiler emits and a small reviewed overlay.

  • Sync and async, one pattern. REST for request and response. Asynchronous request-reply and events over Pub/Sub, described with AsyncAPI (Enterprise and SaaS).

  • Change is governed. Every change is a pull request: validated, compared with the released version, and refused if it breaks consumers without a new major version.

  • A delivery flow like your other APIs. Contracts in Git, checks in the pipeline, a mock backend for tests without an IBM i, versioned bundles loaded without a restart.

  • Credentials in one place. Consumers hold no IBM i profile. The gateway resolves credentials per tenant and environment; authentication and claims come with Enterprise.

  • Ready for AI agents. The same contract generates MCP tools, so an agent calls only what you have reviewed (Enterprise and SaaS).

What changes for the architecture

What changes for the architecture
ConcernBeforeAfter
InterfaceMessage layouts and table columnsVersioned OpenAPI and AsyncAPI contracts
CouplingConsumers depend on the database schemaConsumers depend on the API; the schema stays private
Business rulesCan be skipped by direct SQLAlways run: every call goes through the program
Change controlBy agreement between teamsPull request with breaking-change detection
AsyncA convention per queueRequest-reply and events as standard patterns (Enterprise and SaaS)
CredentialsA database profile per consumerHeld by the gateway, per tenant and environment
TestingNeeds an IBM iMock backend in the pipeline
AI agentsNot possible safelyMCP tools from the same contract (Enterprise and SaaS)

What you keep

  • Your RPG programs. They are called as they are. Nothing is rewritten or wrapped by hand.

  • Your database. Db2 for i stays where it is, behind the programs.

  • Your pace. Queues and existing integrations keep running while you move consumers one at a time.

slay400 is in early development. The generator comes first, the gateway follows. This page describes the design the project is building towards.