Give the agent its own AMS login, not a CSR's

Most pilots start the same way. Someone on the agency side hands the engineer a login, usually a senior account manager's, because that account already has access to everything the agent will need. The integration works that afternoon. Six months later the account manager leaves, IT disables the account on her last day, and four agents stop at 7am on a Monday. Worse, every activity the agent wrote for six months is stamped with her name, and nobody can separate what she did from what the agent drafted.

This tutorial sets up the other way: the agent gets its own identity in the AMS, scoped to the smallest set of permissions it needs, with credentials it can rotate and an audit trail that distinguishes machine drafts from human work. It is an hour of setup that decides whether your audit trail is defensible later.

You need admin rights in Applied Epic, HawkSoft, or EZLynx, an AWS account for secret storage, and agreement from the agency on one point before you start: the agent's identity is a machine identity, and no person ever logs in as it.

Name it after the job, not the vendor

Create the user as something an auditor reads correctly: svc-coi-agent, svc-renewal-radar. One identity per agent, not one shared "automation" account for all four. When the COI agent starts writing malformed activities, you disable one identity and the renewal work keeps running. Shared machine accounts are the same blast-radius problem as shared passwords.

Give it a real mailbox or an alias you control, not a personal one. Vendor password resets and API notices go there.

Enumerate the permissions from the write path, not the read path

The instinct is to grant read on everything and write on activities. That is backwards for scoping. Write down the agent's actual write path first, because that is the part with consequences, then grant the reads that feed it.

For a COI agent on Applied Epic, the write path is: create an activity, attach a document, update nothing else. Policy data, endorsement forms, holder lists, and contacts are all reads. So the role is: read on accounts, policies, lines, attachments; create on activities and attachments; no update or delete anywhere; no access to accounting, commissions, or employee records.

That last clause matters more than it looks. Agency management systems carry payables, commission splits, and staff compensation in the same database as policy data. An agent that extracts certificate requests has no reason to see any of it, and an E&O or cyber reviewer will ask.

HawkSoft and EZLynx expose coarser permission models than Epic. Where you cannot scope narrowly inside the AMS, scope in your own connector: a thin service layer in front of the AMS API that exposes only the operations the agent is allowed to call, and refuses the rest. The AMS credential then lives in the connector, and the agent never holds it. This is also what makes a later permission review possible, you read one allowlist instead of auditing every code path.

Store the credential where rotation is a config change

Put the credential in AWS Secrets Manager, one secret per agent identity, encrypted with a customer-managed KMS key, with the agent's execution role granted secretsmanager:GetSecretValue on that specific secret ARN. Not a .env file, not a parameter baked into a container image, not a value pasted into a workflow tool's settings page.

import boto3, json
from functools import lru_cache

_sm = boto3.client("secretsmanager")

@lru_cache(maxsize=8)
def _cached(arn: str, version: str) -> dict:
    return json.loads(_sm.get_secret_value(SecretId=arn)["SecretString"])

def ams_credential(arn: str) -> dict:
    # version id changes on rotation, which busts the cache
    meta = _sm.describe_secret(SecretId=arn)
    current = next(v for v, stages in meta["VersionIdsToStages"].items()
                   if "AWSCURRENT" in stages)
    return _cached(arn, current)

The describe_secret call is cheap and keeps a long-running task from pinning a credential that was rotated underneath it. Pair it with a retry: on a 401 from the AMS, clear the cache and fetch once more before failing the task. Rotating a password should never require a deploy.

Set a calendar rotation of 90 days and actually do one during the engagement, while the engineer who built it is still on the project. An untested rotation procedure is not a procedure.

Make the audit trail say which agent, and that a human approved

Every activity the agent writes should answer three questions on its face: which agent wrote it, what run produced it, and who approved the send. We put a fixed footer on the activity note:

Drafted by svc-coi-agent  run 2f7c9a1e  approved by J. Alvarez 2026-02-18 14:22 ET

The run id links back to the trace, which holds the source documents and the model's reasoning. The approver name comes from your approval queue, not from the AMS session, because the AMS session is the machine identity. If you write the approver only in your own system and not in the activity, the agency's own staff will not trust the record, and neither will a claims examiner reading the file three years from now.

Use a dedicated activity code for agent-drafted work. It costs nothing, and it means the agency can run a report of everything the agent touched without a text search.

What this does not solve

A scoped identity does not stop a bad draft. It limits the damage, attributes the work, and survives staff turnover, nothing more. The accuracy work is a silent run against the live book and a human approval gate on every send.

It also does not substitute for the AMS vendor's own API terms. Some integrations require a named integration user or a registered application rather than a regular user login. Read the terms before you create the account, and if the agency's AMS contract is ambiguous, ask the vendor in writing and keep the reply.

Do this on day one of the build. Retrofitting an identity after six months of activities written under a CSR's name means you cannot cleanly answer what the agent did, and that is the one question you will eventually be asked.