# IBM i Integration

CoderFlow enables AI agents to work directly with enterprise IBM i systems. Agents can compile RPG, COBOL, and CL programs, interact with 5250 terminal sessions, query DB2 databases, and test Rich Display applications—all autonomously.

## What Agents Can Do

With IBM i integration, agents can:

- **Compile programs**: Build RPG, COBOL, CL, DDS display files, and other IBM i objects using native compilers
- **Query databases**: Execute SQL against DB2 to understand data structures and verify results
- **Test applications**: Operate 5250 terminal sessions and Rich Display interfaces to verify functionality
- **Modernize code**: Convert legacy RPG to modern formats, verified by Profound Automated Testing

This enables the same AI-assisted development workflows available for modern platforms—but for IBM i applications that most AI tools cannot handle.

## Database Access (RAS)

Remote Access Server (RAS) provides high-performance database connectivity between containers and IBM i systems. Agents use RAS to:

- Execute SQL queries against DB2 databases
- Discover table schemas and data structures
- Verify that changes produce expected results

RAS offers better performance than traditional JDBC/ODBC connections over network distances. Agents interact with it automatically through the SQL tool—no manual connection management required.

## Compiling with codermake

`codermake` is the build system agents use to compile IBM i programs. It runs in containers and uses SSH to invoke native IBM i compilers on remote systems.

When an agent modifies source code, it runs `codermake` to compile. The tool handles RPG, COBOL, CL, display files, and database files—with automatic dependency tracking to rebuild only what's changed.

Each task gets its own IBM i library, so agents can work on the same codebase simultaneously without interfering with each other. Experimental changes stay isolated from the shared environment.

## Interactive Testing

Agents can operate interactive applications for testing:

**5250 Terminal Sessions**
- Connect to IBM i applications via 5250
- Navigate screens, enter data, press function keys
- Verify application behavior matches expectations

**Rich Display Sessions**
- Test modern Profound UI interfaces in a browser context
- Interact with Rich Display File applications
- Capture screen states for verification

Interactive sessions let agents test applications the way users would. All sessions are automatically recorded and appear in the task's visualizations.

## Configuration

IBM i integration requires administrator setup:

- RAS service running on the IBM i system
- SSH access for compilation
- Profound UI for interactive session testing (optional but recommended)

See **Environments** in the Administration section for configuration details.
