AI agents in oil and gas: governing every API call
AI agents in oil and gas now reach production, trading and logistics data. How to scope, log and stop each agent's API calls at a gateway you run yourself.
- ai-agents
- mcp
- governance
- audit
- data-residency
- gcc
AI agents in oil and gas are moving from single tools in the subsurface team to networks of agents that read production, refining, logistics and trading data and feed capital and commercial decisions. Agent platforms now give each agent an identity and permissions, but those permissions live inside the platform. The systems of record need their own control point. Put every agent behind an API gateway you run, give each one its own identity, a fixed set of endpoints, read or draft-only access, limits and a stop switch, and log every call in your own database.
Why are AI agents in oil and gas a leadership question now?
On 2 November 2026, at the opening of ADIPEC in Abu Dhabi, ADNOC signed a multi-year partnership with OpenAI and G42. ADNOC said it would be the first energy company to deploy OpenAI Frontier, a platform for connecting and coordinating AI agents across business operations. The deal value and timeline were not disclosed.
The two first applications show where agents are heading. The first turns field master planning, today a sequence of separate subsurface, facilities and economic studies, into one integrated decision. The second aims to value each barrel while it is still in the ground, with agents connected across production, processing, refining, logistics, sales and trading. According to ADNOC, the system will run on G42's sovereign AI infrastructure in the UAE, and human experts will keep oversight of consequential decisions.
This builds on ENERGYai, the agentic AI that AIQ built with G42 and Microsoft for ADNOC's subsurface work.
Two details matter for everyone else in the sector:
- Agents are reaching commercial systems. In his ADIPEC opening speech, ADNOC chief executive Sultan Al Jaber said shipping and logistics used to be under 5% of the cost of a barrel and are now more than 30%. Agents that weigh logistics and trading decisions need access to the data behind them, and that data is market-sensitive.
- Agents will come from more than one platform. When OpenAI launched Frontier on 5 February 2026, it said each AI coworker gets its own identity with explicit permissions and guardrails, and that Frontier works with agents built in-house, bought from OpenAI or integrated from other vendors. That is a useful control inside the platform. It does not replace a control owned by the team that runs the system being called.
We have no inside knowledge of ADNOC's architecture. We read the announcement as a signal of where energy companies across the GCC are going.
What goes wrong when agents reach energy company APIs?
An energy company's useful data sits behind production data services, maintenance and asset management systems, ERP, logistics and scheduling tools, and energy trading and risk management (ETRM) platforms. Most of those APIs were built for dashboards and batch integrations. Five problems show up when agents arrive.
Shared service accounts. The quickest way to make a pilot work is to hand the agent an existing integration account. The logs then cannot separate the agent from the dashboard, and switching the agent off means breaking the dashboard.
Permissions in one place only. If the only record of what an agent may do is inside the agent platform, the system owner depends on that platform's configuration being right, for every vendor's agents, forever. A misconfigured agent, a prompt injection or a compromised platform account then reaches the system of record directly.
Read and write are not separated. A planning agent needs to read well test results and maintenance history. It should not be able to change a work order, a nomination or a trade. When the same credential can do both, "human oversight of consequential decisions" is a policy statement rather than a technical fact.
Evidence is scattered. Internal audit, the board risk committee and regulators will ask which agent saw which data, and when. If each agent integration writes its own logs, or none, that answer takes weeks.
Stopping an agent is slow. When an agent loops or misbehaves, someone has to find every credential it holds across every system and rotate each one.
The cost is concrete: leaked commercial data, a decision taken on data the agent should not have seen, or a program paused while security rebuilds access.
In plain terms
Treat each AI agent like a contractor on site. It gets its own badge, access to the areas its job needs, and a log of every gate it passes. It can read and propose; people in the existing systems approve. Security can cancel its badge in seconds without affecting anyone else. The API gateway in front of your systems is where that badge, those gates and that log belong, and it should run in your own infrastructure.
How does an API gateway govern AI agents in oil and gas?
Here is how each problem maps to a Zerq capability, using names that exist in the product today.
One identity per agent, whatever platform built it. In Zerq, each API consumer is a client with one or more access profiles. Create one client per agent. Every call carries X-Client-ID and X-Profile-ID plus the profile's credential (a token, JWT, OIDC access token or mTLS client certificate), so request logs attribute each call to one agent. A Frontier agent, an ENERGYai agent and an in-house agent all pass the same checks. See per-profile access control for AI agents for the model.
Only the endpoints the job needs. A client is assigned collections, and the gateway resolves requests only against the client's own active collections. Anything else returns 404 with No API route found for this path. The Gateway MCP applies the same assignment, so its list_collections, list_endpoints and endpoint_details tools only show an agent what its client was given. MCP (Model Context Protocol) is the open standard most AI clients use to discover and call tools.
Read and draft, not approve. Each published endpoint lists its allowed HTTP methods, and the gateway refuses anything else with 405 before a backend or workflow runs. Give the planning agent GET endpoints only. If a maintenance agent should raise a draft work order, publish one POST endpoint that creates a draft, and keep approval endpoints out of every agent's collections. The read-only agent post explains each layer of this boundary.
Limits per agent. A policy attached to the client sets a rate limit and a quota (rate_limit_requests per rate_limit_interval, quota_requests per quota_interval). A runaway agent gets 429 instead of loading a production data service.
A stop switch. Deactivating a client (PUT /api/v1/clients/:id/status, modifier role only) makes the gateway return 401 Client is inactive on its next call, REST or MCP. The change is written to the audit log as toggle_status. The incident response post covers the full containment flow.
Evidence in your own database. Every gateway call, including each execute_endpoint tool call, is stored as a request log in your MongoDB with the method, path, status, client, profile, collection and latency, and MCP traffic is marked with the X-Gateway-Source: mcp header. Configuration changes go to a hash-chained audit log that an auditor can verify. Both can stream to Splunk, an OpenTelemetry (OTLP) collector or a webhook. See observability.
No external control plane. Zerq runs as containers in your data center, private cloud or sovereign cloud tenancy, so agent traffic, logs and configuration stay in-country. See the architecture and security pages.
If you are planning agent access to operational or commercial systems, the AI agents and MCP use case shows the setup in more detail, or talk to us about your environment.
Technical deep dive: one gateway path for every agent
An engineer drawing this would place the agent runtimes on the left: an agent platform, a vendor's subsurface agents and in-house agents. Each calls Zerq over REST or over the Gateway MCP endpoint (/mcp by default, set by MCP_PATH). Zerq checks the client, profile and credential (401), the profile's IP allowlist (403) and allowed methods (405), the client's assigned collections (404), the client's policy (429) and finally the endpoint's own methods (405). Only then is the request forwarded to the backend or workflow. On the right sit the production data service, the maintenance system, logistics scheduling and the ETRM read API.
Step 1: separate read and draft collections
Create collections by job, not by system:
production-read:GETendpoints for daily production, well tests and facility status.commercial-read:GETendpoints for cargo schedules and aggregated forecasts. Leave position and counterparty detail out unless a named agent needs it.maintenance-drafts: onePOSTendpoint that creates a draft work order. Approval stays in the maintenance system, done by people.
Step 2: one client and profile per agent
Create a client for each agent, assign only its collections and attach a policy. For an MCP agent, the profile must allow POST, because MCP over HTTP sends every JSON-RPC message as a POST. The read boundary is then set by the endpoints, which publish only GET:
{
"name": "commercial-agent-mcp",
"active": true,
"authType": "mtls", // none | token | jwt | oidc | mtls
"allowedMethods": ["GET", "POST"], // POST carries MCP messages; endpoints stay GET-only
"allowedIPs": ["10.40.12.0/24"] // the agent runtime's subnet
}
Step 3: what happens when an agent tries to write
The commercial agent tries to change a cargo nomination through the read collection:
{
"jsonrpc": "2.0",
"id": 12,
"method": "tools/call",
"params": {
"name": "execute_endpoint",
"arguments": {
"method": "PUT",
"path": "/commercial-read/cargoes/C-2611-04",
"body": "{\"laycan_start\":\"2026-12-02\"}"
}
}
}
The endpoint publishes only GET, so the tool result carries status 405 and Method PUT not allowed for this endpoint. The request log records it:
{
"method": "PUT",
"path": "/commercial-read/cargoes/C-2611-04",
"status": 405,
"client_id": "6741a0c2e4b0a1d2c3f40b21", // commercial-agent
"profile_id": "6741a0d1e4b0a1d2c3f40b22", // commercial-agent-mcp
"collection": "6741a03fe4b0a1d2c3f40b03", // commercial-read
"request_headers": { "X-Gateway-Source": "mcp" }, // abbreviated
"response_body": "{\"error\":\"Method PUT not allowed for this endpoint\"}",
"latency": 2
}
A path in a collection the agent was not given returns 404, so it cannot learn what else exists.
Step 4: evidence and stopping
- Set
LOG_STREAM_SPLUNK_HEC_URLandLOG_STREAM_SPLUNK_HEC_TOKEN(orLOG_STREAM_OTLP_ENDPOINT, orLOG_STREAM_WEBHOOK_URL) to send request and audit logs to the security operations center (SOC). Bodies stay out of the stream unlessLOG_STREAM_INCLUDE_BODIES=true, which suits commercially sensitive payloads. - Set
REQUEST_LOG_RETENTION_DAYSandAUDIT_LOG_RETENTION_DAYSto your records policy. Zero or unset keeps everything. - Give internal audit the auditor role.
GET /api/v1/audit/verifychecks the audit log's hash chain and reports altered entries and gaps. - Rehearse the stop switch: deactivate a test agent's client, confirm the
401, reactivate it, and find bothtoggle_statusentries in the audit log.
Use-case scenario
Illustrative scenario, not a specific customer deployment.
Before. A GCC energy company ran three agent pilots: a production forecasting agent, a cargo planning agent from a software vendor and an internal maintenance assistant. Each used an existing integration account. One account could also update maintenance orders. Logs sat in three places, and nobody could say in one query what the cargo agent had read in a given week.
What was set up in Zerq. The platform team published production-read, commercial-read and maintenance-drafts as collections in a Zerq deployment inside the company's data center. Each agent got its own client, an mTLS profile limited to its runtime's subnet and a policy of 60 requests per minute. The maintenance assistant was the only client given maintenance-drafts. Request and audit logs streamed to the SOC's Splunk with bodies excluded, and internal audit received the auditor role.
After. Every call is attributed to one agent in one log. Write attempts through read collections return 405 and appear in a weekly review. Draft work orders still need a planner's approval. When the vendor's agent looped during a model update, the SOC deactivated its client in under a minute while the other two agents kept running.
Checklist: are your AI agents governed at the API layer?
- Does every agent have its own identity at the API layer, separate from human users and dashboards?
- Can you list, for each agent, exactly which endpoints it can reach?
- Are approval and trading actions out of reach of every agent credential?
- Does each agent have its own rate limit and quota?
- Can you stop one agent in under a minute without rotating shared credentials?
- Is every agent call logged in a store you control, with agent, endpoint and result?
- Are configuration changes to agent access audited and verifiable by internal audit?
- Do agent traffic and logs stay inside your country and your infrastructure?
- Would agents from a second platform or vendor pass through the same controls?
Limitations
Zerq is not an agent platform. Planning, memory and orchestration stay in Frontier, ENERGYai or your own runtime. The gateway sees the calls an agent makes, not why it made them, so reasoning traces must come from the agent platform. There is no built-in approval queue: human sign-off should stay in the systems of record, as in the scenario above. Zerq governs HTTP APIs and MCP, not industrial protocols such as Modbus or OPC UA, so agents should reach operational technology only through approved data services, never directly. On the MCP side, Zerq's Gateway MCP speaks protocol revision 2024-11-05 and keeps sessions in memory per replica, so multi-replica deployments need sticky sessions.
Summary
AI agents in oil and gas are moving from subsurface analysis into commercial and capital decisions, as ADNOC's November 2026 partnership with OpenAI and G42 shows. Agent platforms now give agents identities and permissions, but the systems of record need a control point their owners run. An API gateway in your own infrastructure gives each agent its own identity, endpoints, write boundary, limits and stop switch, and keeps the evidence in your database. Move your highest-value agent pilot behind the gateway before production.
Sources
- AI News, "Abu Dhabi oil giant ADNOC layers OpenAI's agent platform over its own AI", November 2026: https://www.artificialintelligence-news.com/news/adnoc-openai-frontier-energyai-agents/
- Offshore Magazine, "ADIPEC 2026: ADNOC broadens AI capability", November 2026: https://www.offshore-mag.com/regional-reports/middle-east/news/55416782/adipec-2026-adnoc-broadens-ai-capability
- Gulf News, "ADNOC partners with OpenAI and G42 to revolutionize energy sector with AI at ADIPEC 2026", 2 November 2026: https://gulfnews.com/uae/abu-dhabi/adnoc-partners-with-openai-and-g42-to-revolutionize-energy-sector-with-ai-at-adipec-2026-1.500732521
- OpenAI, "Introducing OpenAI Frontier", 5 February 2026: https://openai.com/index/introducing-openai-frontier/
Zerq is an enterprise API gateway built for regulated industries — one platform for API management, AI agent access, compliance audit, and developer portal, running entirely in your own infrastructure. See how it works or request a demo to walk through your specific requirements.