Skip to content
JavaAgentic

Type at least two characters. Try “RAG”, “pgvector” or “tool calling”.

AI Agents for the Enterprise

Deploy AI agents in the enterprise: integrating with SAP, Salesforce and ServiceNow, SSO and identity, audit trails, approval workflows and the governance enterprise agents require.

Advanced4 min readUpdated
On this page

Enterprise AI agents live or die on governance, not AI capability. Integrating with existing identity, respecting each user's permissions, maintaining audit trails, and routing actions through approval — this is where most of the work is, and where consumer-grade agent thinking fails. This tutorial covers the enterprise concerns, building on multi-tenant and human-in-the-loop foundations.

Key Takeaways

  • The hard part is governance: identity, permissions, audit, approval — not the AI.
  • Agents act with the acting user's permissions, never a broad service account.
  • Every action is audit-logged immutably — reasoning, authorizer, data touched.
  • Consequential actions route through existing approval workflows.

Identity: the agent acts as the user

The foundational enterprise principle: an agent operating on behalf of a person has exactly that person's access — no more.

Acting with the user's identity
public AgentResult handle(Request request, AuthenticatedUser user) {
    // The agent's tools use the user's credentials/permissions, so it can never
    // do more than the user could do themselves.
    var tools = toolFactory.forUser(user);   // scoped to the user's access
 
    var agent = agentBuilder
            .defaultSystem(SYSTEM)
            .defaultTools(tools)
            .build();
 
    return agent.handle(request.text());
}

Integrating with enterprise systems

Enterprise systems — SAP, Salesforce, ServiceNow — expose APIs. The agent uses them as tools, with the user's permissions:

An enterprise system as a scoped tool
@Tool("""
        Look up an opportunity in the CRM by account name.
        Returns opportunities the current user is permitted to see.
        """)
String findOpportunity(String accountName) {
    // Calls Salesforce as the authenticated user — their record visibility
    // applies, so the agent cannot surface records the user cannot see.
    return crm.forUser(currentUser()).findOpportunities(accountName);
}

The integration itself is ordinary API work; the discipline is that it runs as the user, inherits the system's own access controls, and is audited.

Audit trails

Enterprises must be able to prove what happened. Every agent action is logged immutably:

Immutable audit logging
public void auditAction(AgentAction action, AuthenticatedUser user) {
    // Who, what, why, when, on whose behalf, touching what data — immutable.
    auditLog.record(new AuditEntry(
            action.id(),
            user.id(),                    // who authorized it
            action.description(),         // what was done
            action.reasoning(),           // why the agent chose it
            action.dataAccessed(),        // what data it touched
            action.approvedBy(),          // who approved, if applicable
            Instant.now()));
}

Approval workflows

Consequential enterprise actions route through the organisation's existing approval processes, not a bespoke agent gate:

public Result requestAction(ProposedAction action, AuthenticatedUser user) {
    if (action.requiresApproval()) {
        // Route into the enterprise's existing workflow — the same approval an
        // employee's action would need. The agent does not invent its own.
        return workflowEngine.submitForApproval(action, user, action.approvers());
    }
    return execute(action, user);
}

Reusing existing approval workflows means the agent's actions are governed the same way human actions are — familiar to approvers, integrated with existing controls. See human-in-the-loop systems.

Data residency and compliance

Enterprises often have strict requirements on where data lives and how AI may process it — covered in multi-tenant architectures and GenAI on the cloud. An enterprise agent must honor these: route to the required region's models, keep sensitive data in-boundary, and respect the organisation's AI usage policies.

The governance checklist

Before an enterprise agent touches production systems:

  • Acts with the authenticated user's permissions, never a broad service account
  • Every action immutably audit-logged with reasoning and authorizer
  • Consequential actions routed through existing approval workflows
  • Scoped access — only the systems and data the task needs
  • Data residency and AI usage policies honored
  • Hard budgets and a kill switch (from productionizing agents)
  • Injection defenses on all untrusted input
  • Tested isolation — an agent for user A cannot access user B's data

The realistic picture

Enterprise AI agents are less about clever AI and more about disciplined integration with identity, audit and governance. The organisations succeeding with them treat the agent as a new kind of user — authenticated, permissioned, audited, and governed by the same controls as any other actor — rather than as a magical autonomous system that sits outside the rules. That framing is what makes them deployable.

Next

Frequently Asked Questions

What makes an enterprise AI agent different from a consumer one?
Governance. An enterprise agent must integrate with existing identity (SSO), respect the permissions of the acting user, maintain a complete audit trail, route consequential actions through approval workflows, and comply with the organisation's policies and regulations. The AI capability is often the easy part; the identity, audit and governance integration is where most of the work is.
How do enterprise agents integrate with systems like SAP or Salesforce?
Through their APIs, exposed to the agent as tools with the acting user's permissions. The agent calls the system's API the same way any integration would, but crucially it acts as the authenticated user with that user's access rights, not with a superuser account — so it can never do more than the person on whose behalf it acts.
Why do enterprise agents need audit trails?
Because enterprises must be able to explain and prove what happened — for compliance, for security investigations, and for accountability. Every agent action, the reasoning behind it, who authorized it and what data it touched must be logged immutably. Without a complete audit trail, an agent that touches business systems is an unacceptable governance risk.
Should an enterprise agent act with its own permissions or the user's?
The acting user's, always. An agent operating on behalf of a person should have exactly that person's access — no more. Giving an agent broad service-account permissions means a prompt injection or error can access anything the service account can, across all users. Scoping the agent to the acting user's permissions contains the blast radius to what that user could already do.

Related tutorials