Nembl
Developer Guide
AI Agents

AI Agents

AI agents are first-class entities in Nembl that operate alongside users in the entity hierarchy. They triage requests, assist with service intake, execute workflow phases, and automate routine decisions -- all governed by the policy engine.

Agent Types

Nembl provides three agent types, each designed for a specific role in the request lifecycle.

Queue Intake Agent

Attached to a team or service inbox. Manages the intake decision: accept, reject, route, and prioritize incoming items.

CapabilityDescription
Auto-accept/rejectAccept or reject requests based on acceptance criteria and capacity
PrioritizationRecommend or set priority and urgency for pending items
ReorderingReorder items in the queue based on business rules
RoutingRoute items to another team or service queue

Service Assist Agent

Attached to a service or offering. Helps users fill out request forms and provides guidance during submission.

CapabilityDescription
Form suggestionsPre-fill form fields based on context
ValidationCheck that required inputs are complete before submission
RecommendationsSuggest the appropriate offering based on the user's description
Data preparationResearch and prepare supporting data for the request

Workflow Phase Agent

Attached to a specific phase in a workflow. Executes actions during workflow processing.

CapabilityDescription
Data analysisAnalyze request data and produce summaries or recommendations
Code changesPropose pull requests for review (software development)
Status updatesDraft updates for stakeholders and B2B partners
Task decompositionBreak a request into subtasks and suggest assignments
Autonomous executionComplete phase actions without human intervention

Configuring an Agent

Basic Configuration

  1. Navigate to the entity where the agent will operate (team, service, or workflow phase).
  2. Click Configure Agent (or Inbox Settings > Enable Agent for queue agents).
  3. Set the agent type and basic parameters:
{
  "enabled": true,
  "type": "queue_intake",
  "model": "claude-sonnet",
  "autonomyLevel": "suggest",
  "tools": ["accept_request", "reject_request", "set_priority", "route_to_queue"]
}

Agent Tools

Each agent type has access to a specific set of tools. Enable only the tools the agent needs:

Queue Intake Tools:

  • accept_request -- accept a request into the queue
  • reject_request -- reject a request with a reason
  • set_priority -- set or change request priority
  • route_to_queue -- forward the request to another queue
  • add_comment -- add a comment to the request

Service Assist Tools:

  • suggest_fields -- recommend form field values
  • validate_inputs -- check required fields
  • recommend_offering -- suggest the best offering

Workflow Phase Tools:

  • update_request -- modify request data
  • create_tasks -- decompose into subtasks
  • assign_task -- assign a task to a user
  • send_notification -- notify stakeholders
  • call_connector -- invoke an external connector

Autonomy Levels

Autonomy levels control how much independence an agent has when taking actions.

LevelBehaviorUse Case
suggestAgent recommends actions but takes no action. A human must review and confirm.New agents, high-stakes decisions, initial setup
act_with_approvalAgent takes action but flags it for human review. Actions can be reversed within a review window.Established agents, moderate-risk actions
fully_autonomousAgent acts immediately without human intervention. Actions are logged for audit.Proven agents, low-risk repetitive tasks

Setting Autonomy Per Action

You can set different autonomy levels for different tools within the same agent:

{
  "autonomyLevel": "act_with_approval",
  "toolOverrides": {
    "reject_request": "suggest",
    "set_priority": "fully_autonomous"
  }
}

In this example, the agent can auto-set priority but must get approval before rejecting a request.

Prompt Layers

Nembl uses a hierarchical prompt system that layers instructions from multiple levels of the entity hierarchy.

Prompt Hierarchy

Company prompt    → "We are a B2B SaaS company. Always be professional."

Organization prompt → "Engineering standards: reference our coding guidelines."

Team prompt        → "Frontend team: focus on UI/UX quality and accessibility."

Agent prompt       → "You triage incoming feature requests. Prioritize by impact."

Each level adds context. The agent receives all layers, with the most specific (agent-level) prompt taking precedence when instructions conflict.

Configuring Prompts

  1. Open the agent configuration.
  2. In the Prompt section, enter the agent-specific instructions.
  3. Parent prompts (company, organization, team) are inherited automatically.
  4. Click Save.

Domain Knowledge

Agents can be provided with domain-specific knowledge to improve their decisions.

Knowledge Sources

  • Company documentation -- uploaded documents that describe your processes, products, and standards.
  • Service descriptions -- the agent's attached service and offering descriptions.
  • Historical data -- past requests, resolutions, and patterns (provided as context).
  • External resources -- URLs or documents referenced in the agent's prompt.

Adding Knowledge

  1. Open the agent configuration.
  2. Navigate to the Knowledge tab.
  3. Upload documents or paste reference material.
  4. The agent includes this knowledge in its context when making decisions.

Monitoring Agent Behavior

Activity Log

Every action an agent takes is recorded in the audit log:

  • What action was taken (accept, reject, prioritize, etc.)
  • The reasoning the agent provided
  • Whether a human approved or overrode the action
  • The timestamp and affected resource

Performance Metrics

Track agent effectiveness from the agent's dashboard:

  • Actions taken -- count of actions by type
  • Accuracy -- percentage of suggestions that humans accepted (for suggest mode)
  • Override rate -- how often humans reverse agent decisions (for act_with_approval mode)
  • Processing time -- average time to evaluate and act on an item

Best Practices

  • Start at "suggest" autonomy. Let the agent recommend actions for a few weeks while your team evaluates its judgment.
  • Promote gradually. Move to act_with_approval after the agent demonstrates reliable behavior, then fully_autonomous for low-risk tasks.
  • Write specific prompts. Generic prompts produce generic results. Include your team's specific criteria, terminology, and priorities.
  • Review the activity log weekly. Check for unexpected decisions and refine the agent's prompt accordingly.
  • Use policy guardrails. Even fully autonomous agents are subject to the policy engine. Use Deny policies to create hard boundaries.
  • Limit tool access. Only enable the tools the agent actually needs. A queue intake agent does not need create_tasks.