---
name: iblai-connect-aveva-pi
description: "Read and write AVEVA PI System data through the PI Web API and expose it to an ibl.ai agent as an MCP tool. Use when the user asks an agent to work with AVEVA PI System data, or to set up an AVEVA PI System MCP connection on ibl.ai."
metadata:
  kind: guide
---

# AVEVA PI System connector for AI agents

> A starting point maintained on ibl.ai at https://ibl.ai/developer/connectors/aveva-pi — not part of the iblai/base repository. Checked against AVEVA's documentation on October 20, 2026; test it against your own AVEVA PI System setup before you rely on it.

The AVEVA PI System (formerly OSIsoft PI) stores time-series process data from plant sensors and control systems in the Data Archive, with asset context, attributes and event frames in PI Asset Framework (AF).

## Auth & conventions

- **API:** PI Web API (REST). A RESTful access layer over HTTPS with read and write access to PI points, Data Archive time series, AF databases, elements, attributes and event frames. Stream methods return recorded, interpolated, plot and summary values.
- **Base URL:** https://{server}/piwebapi/
- **Access:** Issued by your administrator. PI Web API is installed and configured by the customer's PI administrator, who chooses the authentication methods and limits, and can switch the whole service to read-only mode.
- **Auth:** Kerberos; Basic; Bearer (OpenID Connect via AVEVA Identity Manager); Anonymous. Kerberos is the only method enabled by default. Basic sends Windows credentials on each request; Bearer needs AVEVA Identity Manager; AVEVA discourages Anonymous. Bearer and Kerberos are mutually exclusive.
- **Limits:** Default rate limit is 1,000 requests per second per client IP (RateLimitMaxRequests / RateLimitDuration), then HTTP 429. MaxReturnedItemsPerCall defaults to 150,000 items.
- Keep AVEVA PI System credentials in environment variables or the ibl.ai credential store. Never print a token in chat and never commit one to a file.
- Destructive or outward-facing calls are marked **Confirm with the user first** — do.

## Reads

- **Time-series streams** — Recorded, interpolated, plot and summary values for PI points and AF attributes through /streams and /streamsets.
- **AF elements and attributes** — Asset databases, element hierarchies, attributes and templates, addressed by WebID.
- **Event frames** — Event frames in an AF database, such as batches or downtime events.
- **Attribute values** — Current values of attributes that do not reference time series, via /attributes/{webId}/value.

## Writes

- **Write time-series values** — Write values to PI points and AF attributes through stream methods, unless DisableWrites is set.
- **Create or update AF objects** — Create and update elements, attributes and event frames.
- **Delete AF objects** — Delete resources such as elements or event frames. **Confirm with the user first.**

## Expose it to an ibl.ai agent (MCP)

AVEVA did not publish an MCP server of its own when this skill was checked. Host a small MCP server that wraps the calls above, then register it below.

First install the ibl.ai platform skills and connect your organization (writes `IBLAI_ORG`, `IBLAI_USERNAME` and `IBLAI_API_KEY` to `.env`):

```bash
npx skills add iblai/base --all
# then, in your coding agent:
/iblai-api-login
```

Every call below sends `Authorization: Api-Token $IBLAI_API_KEY`.

1. **Register the server** — `POST https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mcp-servers/` with `name`, `url`, `transport` (`sse` | `websocket` | `streamable_http`) and `auth_type` (`none` | `token` | `oauth2`). Capture the returned `id`.
   - For an API key or service credential use `auth_type=token` with `auth_scope=platform` for one key across the organization, or scope it to a single agent for one key per agent.
2. **Create the connection** — `POST https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mcp-server-connections/` with `server`, `scope` (`platform` | `mentor` | `user`), `auth_type`, and either `credentials` + `authorization_scheme` or a `connected_service` id for OAuth. Credentials are masked on read; never send a masked value back.
3. **Enable it on the agent** — `GET https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mentors/{agent_id}/settings/`, add `mcp-tool` to `tool_slugs` and the server id to `mcp_servers`, then `PATCH` the full lists back. They are replaced, not merged.

Full reference: https://ibl.ai/developer/platform/mcp/mcp-connections and the `/iblai-api-agent-mcp` skill.

## Example prompts

- "What was the average temperature on reactor R-101 over the last 8 hours?"
- "List the downtime event frames for packaging line 2 yesterday"
- "Show the attributes of the Boiler 3 element and their current values"
- "Compare hourly flow on FT-2201 between this week and last week"

## Guardrails

- Process data reveals proprietary recipes, yields and plant operations, and historians in critical infrastructure fall under OT security programs; prefer read-only access for agents.
- Request the narrowest AVEVA PI System scopes or role the task needs, and prefer a read-only credential for agents that only answer questions.
- Return the fields the user asked for, not whole records; do not paste personal data into chat that the user did not request.
- Before any write, show the user exactly what will change and wait for a yes.
- Respect the documented limits above: page through results and back off on rate-limit responses instead of retrying in a loop.

## References

- PI Web API Reference: Getting Started: https://docs.aveva.com/bundle/pi-web-api-reference/page/help/getting-started.html
- PI Web API authentication methods: https://docs.aveva.com/bundle/pi-web-api/page/1023024.html
- Restrictions on request data rate: https://docs.aveva.com/bundle/pi-web-api/page/1023029.html
- This connector on ibl.ai: https://ibl.ai/developer/connectors/aveva-pi
- ibl.ai MCP server connections: https://ibl.ai/developer/platform/mcp/mcp-connections
