---
title: "Codeunit 4300 Agent Task Impl."
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/4300-agent-task-impl/
type: codeunit
id: 4300
name: "Agent Task Impl."
app: "System Application"
namespace: System.Agents
versions: "25-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/4300-agent-task-impl/source/25/ https://jonas-paprotka.de/ref/codeunit/4300-agent-task-impl/source/26/ https://jonas-paprotka.de/ref/codeunit/4300-agent-task-impl/source/27/ https://jonas-paprotka.de/ref/codeunit/4300-agent-task-impl/source/28/ https://jonas-paprotka.de/ref/codeunit/4300-agent-task-impl/source/29/"
checked: 2026-09-20
subject: "Microsoft Dynamics 365 Business Central"
license: "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link."
---

# Codeunit 4300 Agent Task Impl.

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/4300-agent-task-impl/

| | |
| --- | --- |
| App | System Application |
| Namespace | System.Agents |
| Versions | 25-28 |
| Source file | Agent/Interaction/Internal/AgentTaskImpl.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| SetMessageText | (var Record Agent Task Message, Text) | - | public | 25-27 | - | - |
| GetStepsDoneCount | (var Record Agent Task) | Integer | public | 25-28 | - | - |
| GetDetailsForAgentTaskStep | (var Record Agent Task Step) | Text | public | 25 | - | - |
| ShowTaskSteps | (var Record Agent Task) | - | public | 25 | - | - |
| CreateTaskMessage | (Text[250], Text, var Record Agent Task) | - | public | 25 | - | - |
| CreateTaskMessage | (Text[250], Text, Text[2048], var Record Agent Task) | - | public | 25 | - | - |
| CreateUserInterventionTaskStep | (Record Agent Task Step) | - | public | 25 | - | - |
| CreateUserInterventionTaskStep | (Record Agent Task Step, Text) | - | public | 25 | - | - |
| CreateUserInterventionTaskStep | (Record Agent Task Step, Integer) | - | public | 25 | - | - |
| CreateUserInterventionTaskStep | (Record Agent Task Step, Text, Integer) | - | public | 25 | - | - |
| StopTask | (var Record Agent Task, Enum Agent Task Status, Boolean) | - | public | 25-28 | - | - |
| RestartTask | (var Record Agent Task, Boolean) | - | public | 25-28 | - | - |
| TaskExists | (Guid, Text) | Boolean | public | 25-28 | - | - |
| GetDefaultEncoding | () | TextEncoding | public | 25-28 | - | - |
| GetDetailsForAgentTaskLogEntry | (var Record Agent Task Log Entry) | Text | public | 26-28 | - | - |
| ShowTaskLogEntries | (var Record Agent Task) | - | public | 26-28 | - | - |
| CreateTask | (Guid, Text[150], Text[2048], var Record Agent Task) | - | public | 26-27 | - | - |
| AddMessage | (Text[250], Text, Text[2048], var Record Agent Task, Boolean) | Record Agent Task Message | public | 26-28 | - | - |
| CreateUserIntervention | (Record Agent Task Log Entry) | - | public | 26-27 | - | - |
| CreateUserIntervention | (Record Agent Task Log Entry, Text) | - | public | 26-27 | - | - |
| CreateUserIntervention | (Record Agent Task Log Entry, Integer) | - | public | 26-27 | - | - |
| CreateUserIntervention | (Record Agent Task Log Entry, Text, Text) | - | public | 26-27 | - | - |
| CreateUserIntervention | (Record Agent Task Log Entry, Text, Integer) | - | public | 26-27 | - | - |
| GetUserInterventionRequestDetails | (Record Agent Task Log Entry, var DotNet AgentTaskUserInterventionRequest) | - | public | 26-27 | - | - |
| SetTaskStatusToReadyIfPossible | (var Record Agent Task) | - | public | 26-28 | - | - |
| CanAgentTaskBeSetToReady | (var Record Agent Task) | Boolean | public | 26-28 | - | - |
| GetSessionAgentTaskId | () | BigInteger | public | 26 | - | - |
| IsTaskRunning | (var Record Agent Task) | Boolean | public | 27-28 | - | - |
| IsTaskCompleted | (var Record Agent Task) | Boolean | public | 27-28 | - | - |
| IsTaskStopped | (var Record Agent Task) | Boolean | public | 27-28 | - | - |
| TryGetAgentRecordFromTaskId | (Integer, var Record Agent) | Boolean | internal | 27-28 | - | - |
| CreateTask | (Guid, Text[150], Text[2048], Enum Agent Task Billing Context, Code[30], var Record Agent Task) | - | public | 28 | - | - |
| StopTask | (BigInteger, Enum Agent Task Status, Boolean) | - | public | 28 | - | - |
| RestartTask | (BigInteger, Boolean) | - | public | 28 | - | - |
| SetTaskStatusToReadyIfPossible | (BigInteger) | - | public | 28 | - | - |
| CanAgentTaskBeSetToReady | (BigInteger) | Boolean | public | 28 | - | - |
| IsTaskRunning | (BigInteger) | Boolean | public | 28 | - | - |
| IsTaskCompleted | (BigInteger) | Boolean | public | 28 | - | - |
| IsTaskStopped | (BigInteger) | Boolean | public | 28 | - | - |
| GetModelId | (BigInteger) | Code[30] | public | 28 | - | - |
| GetModelName | (BigInteger) | Text[70] | public | 28 | - | - |

## Source

Symbols: Microsoft.SystemApplication.symbols.63ca2fa4-4f03-4f2b-a480-172fef340d3f, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-09-20.
AL source 25: https://github.com/microsoft/BCApps, MIT, releases/25.x at 68d52c129129c83b2e396a473aaa5b2ce61d2eed.
AL source 26: https://github.com/microsoft/BCApps, MIT, releases/26.x at 78c4acf0d64a8eee157ea80164fa8fc2acffc9eb.
AL source 27: https://github.com/microsoft/BCApps, MIT, releases/27.x at 1749020b4c9445a43e4f7f540e89b7fa76ec25fd.
AL source 28: https://github.com/microsoft/BCApps, MIT, releases/28.x at 740f59156b249f8ed7cba2e28423f03ae7b07233.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at a66254c3b8b5bb1cea290dc8f9d097aec4381153.

Jonas Paprotka, 2026-09-20.
