> ## Documentation Index
> Fetch the complete documentation index at: https://ibm-d95bab6e.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Development Overview

> Build specialized AI agents for IBM i systems using the MCP server and custom toolsets.

AI agents provide intelligent automation and assistance for IBM i system administration through natural language interfaces. The IBM i MCP server enables you to build **specialized agents** that focus on specific domains (performance monitoring, system discovery, security auditing) rather than monolithic agents attempting all tasks.

***

## Architecture Overview

The IBM i MCP server provides the foundation for building specialized agents. Agents connect to the MCP server, which exposes IBM i capabilities through SQL-based tools organized into **toolsets**. This architecture enables you to build focused agents that only see the tools they need.

```mermaid theme={null}
graph TB
    subgraph agents["AI Agent Layer"]
        direction TB
        agent["🤖 AI Agent<br/><small>Agno/LangChain/LangGraph</small>"]
        nl["💬 Natural language interface"]
        memory["🧠 Persistent memory & context"]
    end

    subgraph filtering["FilteredMCPTools Layer"]
        direction TB
        filter["🔍 FilteredMCPTools"]
        annotations["📝 Annotation-based filtering"]
        toolsets["📦 Toolset selection<br/><small>performance, discovery, browse, search</small>"]
    end

    subgraph mcp["IBM i MCP Server"]
        direction TB
        register["📋 Register SQL tools from YAML"]
        validate["✓ Validate parameters & security"]
        format["📊 Format responses for AI"]
    end

    subgraph ibmi["IBM i System"]
        direction TB
        db2["✓ Db2 for i"]
        qsys2["✓ QSYS2 Services"]
        security["✓ Security Model"]
        sprocs["✓ Stored Procedures"]
    end

    agents -->|Uses| filtering
    filtering -->|HTTP/MCP Protocol| mcp
    mcp -->|SQL Queries| ibmi

    style agents fill:#e3f2fd,stroke:#1976d2,stroke-width:3px,color:#000
    style filtering fill:#fff3e0,stroke:#f57c00,stroke-width:3px,color:#000
    style mcp fill:#f3e5f5,stroke:#7b1fa2,stroke-width:3px,color:#000
    style ibmi fill:#e8f5e9,stroke:#388e3c,stroke-width:3px,color:#000

    style agent fill:#bbdefb,stroke:#1976d2,stroke-width:2px,color:#000
    style nl fill:#bbdefb,stroke:#1976d2,stroke-width:2px,color:#000
    style memory fill:#bbdefb,stroke:#1976d2,stroke-width:2px,color:#000

    style filter fill:#ffe0b2,stroke:#f57c00,stroke-width:2px,color:#000
    style annotations fill:#ffe0b2,stroke:#f57c00,stroke-width:2px,color:#000
    style toolsets fill:#ffe0b2,stroke:#f57c00,stroke-width:2px,color:#000

    style register fill:#e1bee7,stroke:#7b1fa2,stroke-width:2px,color:#000
    style validate fill:#e1bee7,stroke:#7b1fa2,stroke-width:2px,color:#000
    style format fill:#e1bee7,stroke:#7b1fa2,stroke-width:2px,color:#000

    style db2 fill:#c8e6c9,stroke:#388e3c,stroke-width:2px,color:#000
    style qsys2 fill:#c8e6c9,stroke:#388e3c,stroke-width:2px,color:#000
    style security fill:#c8e6c9,stroke:#388e3c,stroke-width:2px,color:#000
    style sprocs fill:#c8e6c9,stroke:#388e3c,stroke-width:2px,color:#000
```

### Three-Layer Design

> [card] AI Agent Layer
>
> **Your specialized agent** with natural language understanding, persistent memory, and domain-specific knowledge

> [card] Toolset Filtering
>
> **FilteredMCPTools** provides selective tool access based on annotations (toolsets, read-only, etc.)

> [card] IBM i MCP Server
>
> **SQL tools as MCP tools** registered from YAML, validated, and formatted for AI consumption

***

## Building Specialized Agents with Toolsets

**Toolsets** are collections of related SQL tools that enable focused agent capabilities. Instead of giving an agent access to all 50+ tools, you configure it to use only the toolset(s) it needs.

### Example Toolsets

| Toolset | Purpose | When to Use |
| - | - | - |
| **performance** | System performance monitoring | Agents that track CPU, memory, active jobs, and resource utilization |
| **sysadmin\_discovery** | High-level service discovery | Agents that explore available QSYS2 services and capabilities |
| **sysadmin\_browse** | Detailed service exploration | Agents that dive deep into specific schemas and service categories |
| **sysadmin\_search** | Targeted service search | Agents that find specific services by name or keyword |

> [!NOTE]
>
> **Why Toolsets?** Specialized agents are more reliable, performant, and secure than monolithic agents. A performance monitoring agent doesn't need access to security audit tools. A discovery agent doesn't need write operations. Toolsets enforce this separation.

### Creating Custom Toolsets

You define toolsets in your YAML tool configuration:

```yaml theme={null}
# tools/custom-tools.yaml
toolsets:
  security_audit:
    tools:
      - get_failed_logins
      - list_object_authorities
      - check_password_expiry

  database_health:
    tools:
      - table_sizes
      - index_status
      - query_performance
```

Your agent framework can then filter to these custom toolsets when connecting to the MCP server.

> [card] [Build Custom Toolsets →](https://ibm-d95bab6e.mintlify.site/sql-tools/toolsets.md)
>
> Learn how to define toolsets in YAML and use them with agents

***

## Agent Development Approach

Building an agent for IBM i follows this high-level process:

**1. Define Agent Purpose**

What specific IBM i domain will this agent handle? Performance? Security? Discovery?

**2. Select or Create Toolsets**

Use existing toolsets or define custom ones in YAML based on your agent's needs

**3. Configure Tool Filtering**

Connect your agent framework to the MCP server with toolset filters

**4. Write Agent Instructions**

Guide the agent on how to interpret user questions and use tools effectively

**5. Test and Deploy**

Verify the agent's reliability and deploy as a standalone service

> [!TIP]
>
> **Multi-Agent Architecture**: IBM i's traditional separation of concerns translates well to specialized agents. Rather than one agent for "IBM i administration," build separate agents for performance monitoring, security auditing, database management, etc. Each agent becomes an expert in its domain.

***

## Framework Options

Pre-built integrations are available for popular agent frameworks:

> [card] [Agno Framework](https://github.com/IBM/ibmi-mcp-server/tree/main/agents/frameworks/agno)
>
> Python agents with AgentOS, persistent memory, and evaluation tools

> [card] [Google ADK](https://github.com/IBM/ibmi-mcp-server/tree/main/agents/frameworks/google_adk)
>
> Google Agent Development Kit with Google AI and Vertex AI support

> [card] [LangChain](https://github.com/IBM/ibmi-mcp-server/tree/main/agents/frameworks/langchain)
>
> LangGraph-based agents with state management and workflows

Each integration includes example specialized agents demonstrating toolset filtering and domain-focused architectures.

***

## Next Steps

> [card] [SQL Tools Building](https://ibm-d95bab6e.mintlify.site/sql-tools/building-tools)
>
> Understand how to create SQL tools and organize them into toolsets

> [card] [Toolsets Guide](https://ibm-d95bab6e.mintlify.site/sql-tools/toolsets.md)
>
> Learn how to define and use toolsets for specialized agents

> [card] [Agno Framework Guide](https://github.com/IBM/ibmi-mcp-server/tree/main/agents/frameworks/agno)
>
> Start building agents with the recommended Agno framework

> [card] [Example Agents](https://github.com/IBM/ibmi-mcp-server/tree/main/agents)
>
> Explore pre-built specialized agents for performance, discovery, and more

> [!NOTE]
>
> **Architecture Philosophy**: The IBM i MCP server encourages **specialized agents** that handle specific domains rather than monolithic agents attempting all tasks. This separation of concerns aligns with IBM i's traditional design philosophy and provides better performance, security, and maintainability.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.