Simple Agent Designer Documentation
Index

Interactive Agent

The Interactive Agent is a chat interface built into the Agent Role Center that lets you converse directly with your default AI agent. You can ask questions, request data lookups, and trigger actions — all through a natural language conversation.

Accessing the Interactive Agent

The Interactive Agent appears as the Agent part on the Agent Based Accounting Role Center. It is available immediately when you open the Role Center — no additional navigation required.

Prerequisites

Before using the Interactive Agent:

  1. At least one agent must be configured with:
    • A valid AI Provider and model
    • The General Agent flag set to Yes
  2. The AI Provider must have a valid endpoint and API key
  3. Optionally, enable Use Tools on the default agent for data access capabilities

How It Works

The Interactive Agent provides a JavaScript-based chat control embedded in the Business Central page:

Starting a Conversation

  1. Open the Agent Role Center
  2. The Agent part loads and initializes with your default agent
  3. Type your question or request in the chat input
  4. Press Enter or click Send

Conversation Flow

  1. You send a message — your text is added to the conversation history
  2. The agent processes it — the message is sent to the AI provider along with conversation history and instructions
  3. The agent responds — the AI response appears in the chat
  4. Tools execute (if needed) — if the AI requests tool calls:
    • A message indicates tools are being used
    • A timer fires automatically to execute the tools
    • Tool results are sent back to the AI
    • The AI continues its response
  5. The conversation continues — you can send follow-up messages that build on the previous context

Uploading Files

File upload is not available in the Role Center Interactive Agent part — the Role Center chat control has no file-drop capability. If you need to share an invoice image, a spreadsheet, or a PDF with the agent in a chat, use the Ad Hoc Agent page instead, which supports drag-and-drop file upload. To attach files to structured processing, use the Upload File action on a workload card.

Interrupting the Agent

While the agent is executing tool calls (indicated by a tool activity message in the chat), you can type a new message to interrupt the current operation. The agent stops tool processing and responds to your new message instead.

Use this when:

  • The agent is taking an unexpected approach
  • You want to redirect the conversation
  • You need to correct information before the agent completes an action

Chat Features

Feature Description
Natural language input Type questions or commands in plain English
Conversation memory The agent remembers previous messages in the session
Automatic tool execution Tools are called and results processed without manual intervention
Real-time responses Responses appear in the chat as they are generated
Saved conversations Chat history is auto-saved and can be resumed later
Interrupt Send a message during tool execution to redirect the agent

What You Can Do

Ask Questions

You: What is the current balance for customer C10000?
Agent: [Uses lookup_data tool to query Customer table]
       Customer C10000 (Contoso Ltd) has a balance of $15,432.50
       with a credit limit of $50,000.00.

Request Analysis

You: Which customers have exceeded their credit limit?
Agent: [Uses lookup_data tool to query Customer table with filter]
       The following customers have exceeded their credit limit:
       - C20050 (Northwind Corp): Balance $62,000 / Limit $50,000
       - C30010 (Alpine Inc): Balance $31,500 / Limit $25,000

Trigger Actions (with tools enabled)

You: Create a journal entry debiting account 6100 for $500
     with description "Office Supplies - February"
Agent: [Uses create_journal_line tool]
       Journal entry created successfully:
       - Account: 6100 (Office Supplies)
       - Amount: $500.00
       - Document No: GJ-001234

Get Advice

You: What GL account should I use for a software subscription payment?
Agent: Based on your chart of accounts, you should use account 6400
       (Software and Subscriptions) for subscription payments.

Saved Conversations and Resuming a Chat

Your chat is no longer lost when you leave the page. After each completed reply round, the conversation is automatically saved to your personal AI Conversations list. Each saved conversation stores a title, the AI provider and model used, and creation/last-active timestamps, and the list is sorted with the most recently active conversation first.

Two actions on the Agent part let you manage saved conversations:

Action What it does
Resume Conversation Opens the AI Conversations list so you can pick a past conversation and reload it into the chat
New Conversation Starts a fresh chat while keeping the current conversation saved for later

Because conversations are auto-saved, navigating away from the Role Center and returning no longer means losing your history — use Resume Conversation to pick up where you left off.

Agent Context

The Interactive Agent has the same context as any other agent processing:

  • Company information
  • Current date
  • System AI setup instructions
  • Agent custom instructions
  • Available tools (if enabled)

It does not have workload-specific context — there is no workload description or workload type instructions. The interactive chat is designed for ad-hoc conversations, not structured workload processing.

Differences from Workload Processing

Aspect Interactive Agent Workload Processing
Trigger User types a message User clicks Process
Context Agent instructions only Agent + Type + Workload instructions
Tracking Visible in Agent Work Full process activity log
Multi-agent No (single agent) Yes (agent cooperation supported)
Files Not supported here — use the Ad Hoc Agent Upload File action on workload card
Documents Can create via tools Full document creation tracking
Interrupt Yes, type a message during tool execution No

For complex, repeatable, or auditable tasks, use workloads. For quick questions and simple actions, use the Interactive Agent.

Tips and Best Practices

  • Choose your default agent wisely — it should be a general-purpose agent capable of answering a wide range of questions
  • Enable tools on the default agent if you want it to access BC data
  • Use clear, specific questions for better results
  • The agent remembers the conversation, so you can ask follow-up questions
  • For complex multi-step operations, consider creating a workload instead
  • If the agent's response is not what you expected, try rephrasing your question
  • Monitor the Agent Work part to see what actions the agent has taken

Troubleshooting

Issue Possible Cause Solution
Chat does not respond No default agent configured Set General Agent = Yes on one agent
"AI Provider error" Invalid API key or endpoint Check AI Provider configuration in Setup
Agent does not use tools Use Tools not enabled Enable Use Tools on the default agent
Incorrect responses Agent instructions are too vague Refine the default agent's instructions
Cannot find an earlier chat Started a different conversation Use Resume Conversation to reload it from the AI Conversations list
Need to upload a file in chat Not supported in the Role Center part Use the Ad Hoc Agent, which supports drag-and-drop file upload