codeunitCopilot & Agentsofficial - Microsoftderived - from the source, no model text

Codeunit 4312 "Agent Session"

System Application · System.Agents

Across versions

  1. BC23-25not present
  2. BC26added
  3. BC272 procedures changed
  4. BC28-30unchanged

Neighbourhood 9 connected objects and pages

Codeunit 3303 "Payables Agent" (calls, 2 links)Payables AgentCodeunit 4420 "SOA Task Message Reader" (calls, 2 links)SOA Task Message ReaderCodeunit 3311 "PA Billing" (calls)PA BillingCodeunit 4323 "SOA Awareness Notifications" (calls)SOA Awareness NotificationsCodeunit 4360 "Custom Agent Session" (calls)Custom Agent SessionCodeunit 4595 "SOA - KPI Track All" (calls)SOA - KPI Track AllCodeunit 4598 "SOA Instructions" (calls)SOA InstructionsCodeunit 6908 "Expense Event Subscriber" (calls)Expense Event Subscriberhttps://learn.microsoft.com/dynamics365/business-central/dev-itpro/ai/ai-agent-sdk-tasks (Learn pages)https://learn.microsoft.com/…

Open in the neighbourhood explorer

One hop out, from the extracted relations and call graph. Up to 40 shown; the sections below list them all.

System Application · System.Agents · BC26-30 · source at 4e6a307c · facts from BC29

Procedures

  • IsAgentSession(var ActiveAgentMetadataProvider: Enum "Agent Metadata Provider"): Boolean Δ BC27: Checks if the current session is an agent session.
  • GetCurrentSessionAgentTaskId(): BigInteger Δ BC27: Get the agent task ID related to the current session, if any, -1 otherwise.

Called by

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an Object::"Name" argument. Interface dispatch and calls through events are not counted, so the list is not complete.

Documented on Microsoft Learn

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: bcatlas_resolve_node(object_type: "codeunit", object_name: "Agent Session"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.

Evidence 1 sources