Back to The Perch

Developer series, part 5

When you can't change the code

The first four parts assumed you could open the agent's source and wrap a call. Plenty of agents don't let you. Here's how to cover the rest, and what you actually set up for each one.

Start from what you can reach

Before you configure anything, ask what you're able to change about the agent. That answer usually picks the path for you.

  • You own the code. Use the SDK or your framework's adapter, like parts 1 to 4. When you have this option, take it.
  • Someone built it in Copilot Studio. The check goes in the service that owns the business action the agent calls.
  • It works through a browser, or it speaks MCP. It asks the VeriProof MCP server before each action, and your harness only commits what comes back allowed.
  • All you can change is an endpoint. Point its model, MCP or A2A traffic at the Agent Gateway, and each call is checked as it passes.

If you have a choice, go with the path closest to the work. A check that sits beside the refund API can read the current order. One that only sees a model request knows what the request says and nothing more.

Whichever you pick, the decision goes to the same reviewers and lands in the same decision history as the ones your SDK code makes. A reviewer or auditor follows every refund the same way, however the agent was built.

Copilot Studio agents still need a developer

Copilot Studio is very good at letting people outside engineering build agents, and they will. Your part sits behind the agent, in the system the agent changes. If a maker's agent can issue refunds, the refund service is where the check lives.

The Copilot Studio quickstart splits the work by role. The developer's share looks like this:

  • Add the SDK check to the service that owns the action. It re-reads the current record, checks the rules, runs the action once and keeps the receipt from the target system. It's the same idea as part 1, wrapped around the write in that service.
  • Expose that one action to the maker. A REST API tool or a custom connector is the usual route, and an agent flow works when existing Power Platform connections can do the read and the write. Use User authentication so the action runs as the signed-in person, with their access.
  • Remove every other way to make the same write. If the agent has a second tool that can change the record, it has a way around your check.
  • Test one request VeriProof stops and one it allows. Confirm the record only changes for the allowed one, then open the evidence link each one returns.

The maker still owns the instructions and the conversation. The refund amount comes from your system, though, so the model can't invent it.

If the agent only needs to read VeriProof evidence, that's a simpler connection: the maker adds the VeriProof MCP server in Copilot Studio, and there's no code for you to host.

Browser agents and MCP clients

An agent filling in a supplier portal has no function call you can wrap. Instead, it talks to the VeriProof MCP server, which uses the signed-in person's VeriProof access and nothing more. You copy the address from More tools → Agent tools → Connect, and the client handles the OAuth sign-in with PKCE.

Five tools carry an action from start to finish:

get_computer_use_requirements  what this application expects
begin_governed_session         open the session
evaluate_computer_action       check the next action before it runs
record_computer_action         record what happened
complete_governed_session      close the session out

Despite the names, they work whether the agent acts through an API, a browser, or both. You declare the approved channels for the application in Config, and the session records the channel the agent really used, so reviewers can compare.

For browser work, your harness owns navigation and credentials. The TypeScript Playwright harness is the tested reference. At the moments your capture policy names, mask the page, upload the screenshot to POST /v1/ingest/upload with purpose=computer_screen_capture, bind it to the evaluated action, and pass the returned attachmentId to record_computer_action. MCP never sees the image bytes.

Two things are worth building in from day one. The result from evaluate_computer_action is the agent's own report, so if you want evidence that the action really ran, put a registered connector where the action executes. And after the action, check the outcome against the system of record. Treat a success page in the browser as context, and take the result from the order system.

When the check wants a person, pause at a saved checkpoint and resume the way part 2 described: reject approvals for state that's changed, and reuse the same idempotency key on every retry.

The gateway, when all you control is an endpoint

Some vendor agents expose one setting that matters here: the base URL for their model calls. The Agent Gateway is a container you run beside the agent.

In the application's Config > Gateway, Gateway mode has three settings. Edge is for SDK agents that want policy decisions close by, while the agent calls its provider directly. Firewall is the one for this post: the agent sends model requests through the gateway's proxy. Combined runs both on one service. One gateway can serve multiple applications in the same environment.

On the host, the gateway uses your application's SDK key and ingest URL, plus the provider key. That provider key lives in a file on the gateway host, and the agent never sees it:

EdgeRuntime__ServerUrl=https://YOUR_INGEST_SERVER
EdgeRuntime__ApplicationKeyFile=/run/secrets/application
EdgeRuntime__Mode=Firewall
EdgeRuntime__ProviderCredentials__openai__TenantId=YOUR_TENANT_ID
EdgeRuntime__ProviderCredentials__openai__ApplicationId=YOUR_APPLICATION_ID
EdgeRuntime__ProviderCredentials__openai__SecretFile=/run/secrets/openai

The portal only stores the binding name, openai here. On the agent side, set the model client's base URL to the gateway, like http://127.0.0.1:7080/v1, and use the last segment of your VeriProof SDK key as its bearer token. The gateway setup guide walks through a test request against the openai-responses-text-json-v1 profile:

{
  "model": "YOUR_APPROVED_MODEL_ID",
  "input": "Reply with the word ready.",
  "max_output_tokens": 128,
  "store": false,
  "stream": false
}

That profile takes text in and returns text. Tools, structured output, media and streaming aren't accepted, so strip extra client options. Turn off automatic retries too, because the gateway makes one upstream attempt per request and a timeout can still mean the provider did the work.

A policy check before the model call can stop the request from being sent. A check after the call can withhold the output. Either way, your client gets an error.code it can act on, like proxy_model_not_approved or proxy_policy_denied.

Keeping model traffic inside the lines

Each model route has a list of Approved model identifiers, and a request has to use one of them exactly. You also set size limits, an output token ceiling, concurrency and a timeout for the route.

Model controls go further, with daily request, token and spending limits for the workloads allowed to use each route. Agent routes connect the gateway to an approved agent in another application over A2A: you review its agent card, pick the skills it may use, and set limits for the connection. Both need your deployment's operator to switch them on first, and the model controls and agent connections pages cover that step.

For a person in the loop, turn on Pause for human review for a model route and choose a Request data class. The paused request waits for a decision through the application's human review setup, the same one your SDK reviews use.

Saving these settings takes application and governance configuration access, and a production change may need an approval first. Plan on pairing with your governance engineer for this part.

Earlier and later in the series

Part 4 covered the Enforce adapters for frameworks like LangGraph and Semantic Kernel, and where their coverage ends. Next, part 6 gets into testing code with a check in it: the SDK test harness, offline rehearsal, Shadow mode and CI.

For setup detail, keep the Copilot Studio guide, the computer-use guide, the MCP server guide and the gateway install guide open.

Cover the agents you didn't write

Try these paths with Developer, free for 60 days, or watch an agent at work before you set anything up.