Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

Agents

The Agents tab in DioS lets you hire an agent, start a run, and approve its actions before they happen. One template is available, Code reviewer. It reads a GitHub pull request (PR), posts one review comment, and sends a notice to Microsoft Teams.

Prerequisites​

  • An administrator has set up the agent platform on your DataDios server. It is off by default.
    • AGENT_PLATFORM_ENABLED=true turns it on. While it is off, DioS has no Agents tab.
    • AGENT_DISPATCH_MODE=queued sends runs to the run queue, and the agent runtime must be running to pick them up. If no runtime picks up a run, it fails with accept_timeout.
    • ASK_DIOS_AGENT_ENABLED=true lets the Ask DioS dock answer through an agent named Dios (see Answer through your Dios agent). It is off by default, and it works only while AGENT_PLATFORM_ENABLED is on too.
  • A GitHub data source that you own. The agent reads the diff and posts its review through it.
  • A Microsoft Teams data source that you own. The agent sends its notice through its webhook.
  • An OpenAI Model data source that you own. The agent's model calls use its key. Other Gen AI sources show as not supported yet.
  • Optional: a source to search, for example one that holds your coding standards. It needs its Search index turned on (see Search index). The hire screen lists the sources you can search.

The wizard lists only data sources you own.

Hire an agent​

  1. In DioS, click the Agents tab.
  2. Click Hire agent.
  3. Complete each step, then click Continue. DioS checks the step before it moves on.
  4. On the Review step, click Hire agent. The agent's page opens.

The wizard has nine steps:

StepWhat it sets
TemplateThe starting point. Pick Code reviewer. It fills in the role, description, actions, modes and budget. The agent's prompt starts as the matching prompt in your Command Registry. You can change the rest in later steps.
IdentityName (2 to 120 characters, unique among your agents), Role, and an optional Description.
ChannelsMicrosoft Teams data source (required). Pick one of your own Microsoft Teams data sources. The agent sends its notice through it. If you have none, add one first.
ScopeThe data sources the agent may use. Code reviewer needs one GitHub source. Under Knowledge (optional), pick corpora it searches for your team's conventions.
PermissionsA mode for each action. See Action modes.
Model & budgetModel data source, Model, and a budget: Budget in (Tokens or USD), Period and Limit. The budget is stored but not enforced. Runs don't stop when they pass it.
PersonaThe prompt the agent follows. Pick one from your Command Registry, or write it yourself. See The Persona step.
TriggerOptional. How people start the agent from outside DataDios. No trigger is the default. See The Trigger step.
ReviewA summary of every step. Click Edit on a section to change it. If a write action is set to Auto, a warning says what the agent does without asking first.

The Persona step​

The agent follows a prompt from your Command Registry. The template starts you on its own prompt, at the newest version. A pill shows the prompt's key, its version (for example v3) and its name. Click the pill to show or hide the prompt text.

  • Change opens Choose a prompt. Search by key or name, pick a version, then click Use this prompt. A different prompt drops any edit you made to the old one.
  • Edit the text in the box to change it for this agent only. The pill then reads edited. The Command Registry is never written to. Click Revert to v3 (your version number) to go back to the registry's text. The text can't be empty and is limited to 20,000 characters (the counter shows the limit).
  • Write the persona yourself instead swaps the pill for an Instructions box. It starts with the text now in force. To go back, click Use a Command Registry prompt.

A picked version is frozen on the agent. A later change in the Command Registry doesn't reach the agent until you pick the prompt again. If the Command Registry can't be read, the step says "Couldn't load your Command Registry prompts." with a Retry button.

If the hire is refused, the wizard shows why:

  • The prompt or its version is gone from your Command Registry. The wizard takes you back to Persona. Pick another prompt or version, or write the persona yourself.
  • The prompt needs actions that are off. In Permissions, set the actions the prompt uses to Auto or Awaits approval, then hire again.

The Trigger step​

A trigger lets people start the agent from outside DataDios. This step is optional. No trigger is selected by default: people start the agent from DataDios only, and you can add a trigger later from the agent's page. The other choices are the kinds of trigger your server offers. If the list can't load, the step says so and you can skip it.

Microsoft Teams needs a Microsoft Teams data source of yours that has bot settings (client ID, tenant ID and client secret). If you have none, the step says so and offers Add data source. Pick the source, and optionally set Who may start the agent, Who may approve and Open runs at once. See Trigger settings. Continue stays blocked until the kind's required fields are filled.

When you click Hire agent on the Review step, DataDios adds the trigger with the agent. A dialog titled Microsoft Teams trigger added shows the Messaging URL once. Click Copy, paste it as the messaging endpoint of your Azure Bot, then click I've saved it. If you close it without copying, open the agent's Triggers tab and click Rotate URL to get a new one. If the agent was hired but the trigger wasn't added, a message says so. Use Add trigger on the Triggers tab.

Where the Teams notice goes​

The agent sends its notice through the Microsoft Teams data source you pick in Channels. That source's webhook decides which chat or channel the notice lands in, so point the webhook at the chat or channel you want. A source with no webhook gets no notices from runs started in DioS. DioS also adds the source to the agent's data scope. On the agent's page, the Overview tab shows it as Notify channel, in the form Teams · <source name>. Agents hired earlier show the channel name or id they were hired with.

If you own no Microsoft Teams data source, the step says "Add a Microsoft Teams data source first" and offers Add data source. It opens in a new tab, and your answers stay in the wizard. Continue stays blocked until you pick a source.

Action modes​

Each action has one of three modes:

ModeWhat it does
AutoThe agent uses the action right away.
Awaits approvalThe run stops at the action until someone approves or rejects it. See Approve or reject a held action.
DisabledThe agent can't use the action. If it tries, the call is refused.

Human required shows in the list but can't be selected.

Code reviewer sets Post a review comment (the post_review tool) to Awaits approval. So by default, the agent holds its review until you approve it. Its other actions are Auto: Read a PR diff, Search team knowledge and Notify the Teams channel. Because of the last one, the Review step warns that the agent will message the Teams channel without asking first.

Put the agent on duty​

A new agent is hired off duty.

  • On duty: the agent accepts runs.
  • Off duty: the agent refuses new runs.

To change it, use the switch on the agent's card on the Agents page. You can also open the agent's page and click Actions, then Put on duty or Take off duty.

Edit an agent​

The agent's owner can change its Scope, Permissions and Persona after hiring. Open the agent and click Edit, change what you need, then click Save. Nobody else can edit the agent.

Each save creates a new version, including a save from the Overview tab. The agent uses the new version for runs that start after the save. A run that has already started keeps the version it started on. An edit doesn't change whether the agent is on duty, and it doesn't change a Teams trigger's URL.

On the Persona tab you pick a prompt, edit its text for this agent, Revert the edit, or write the persona yourself, as in The Persona step. Save keeps the version you picked. It doesn't read newer text from the Command Registry.

If someone else saves the same agent at the same moment, your save writes nothing. Reload the page and save again.

See the versions​

The Overview tab lists the agent's versions, newest first. Each row shows what changed, when it was saved and who saved it. Older versions load when you ask for them.

  • What changed names the settings that differ from the version before, including the agent's name, description and notify channel. The first version reads Hired. A version saved with nothing changed reads Saved with no changes.
  • Who saved it is blank for a version saved before DioS recorded this.

Start a review​

You can also start a review from Microsoft Teams. See Start an agent from Microsoft Teams.

  1. On the Agents page, click the agent's name.
  2. Click Actions, then Review a PR….
  3. In Repository, enter the repository as owner/name.
  4. In PR number, enter the pull request number.
  5. Click Start review. If the agent is off duty, click Put on duty and start instead.

The run page opens. It shows a timeline of the run, the PR, what the agent read, the review comment, and the notices it sent.

If the agent's saved settings can't run, the dialog says "Couldn't start the review: This agent's saved settings can't run. Hire it again." Trying again doesn't help. Hire the agent again.

Check the Teams notice​

The Sent by this run card on the run page shows each notice with a badge:

BadgeWhat it means
SendingThe agent is still sending the message.
SentTeams confirmed it delivered the message.
Accepted by TeamsTeams took the message but didn't confirm it delivered it. It's grey.
Not sentThe message was not sent. It's red.

See an agent's runs​

Open an agent and choose Runs to see every run it has done, newest first, 25 to a page. Each row shows:

  • Pull request: the repository and PR number. A question from the Ask DioS dock (when ASK_DIOS_AGENT_ENABLED is on) shows task instead. Select it to open the run page.
  • Status: the run's status, as in How a run ends.
  • Started: when the run started.
  • Duration: how long it took.
  • Failure reason: why it failed, for a failed run only.

Use the page buttons under the table to see older runs. They show only when the agent has more than 25 runs. A new agent shows "No runs yet" until you start one from the Actions menu or, for an agent named Dios on a server with ASK_DIOS_AGENT_ENABLED on, ask a question in the Ask DioS dock.

Triggers​

A trigger lets people start the agent from outside DataDios. For a Microsoft Teams bot, someone messages it, and the agent runs and replies in the same thread. To set up the Azure Bot itself, follow Start an agent from Microsoft Teams.

Open the agent and click the Triggers tab. The tab is there even if the agent has no saved version. Only the agent's owner can see it.

  • No trigger yet: the tab says "No triggers yet" and shows Add trigger.
  • Loading fails: the tab says "Couldn't load the triggers." with a Retry button. If the agent platform is off on the server, it says so instead.
  • A trigger exists: a Microsoft Teams card shows its state, Accepting messages or Not accepting messages, and these fields.
FieldWhat it shows
Data sourceThe Microsoft Teams data source the bot is registered on.
Who may start it"Anyone in the chat", or the people listed. A trigger that was saved with nobody shows "Nobody".
Who may approve"Anyone but the requester", or the people listed, or "Only in DataDios".
Open runs at onceHow many runs may be open together.
AddedWhen the trigger was added.

An agent can have one trigger of each kind. Add trigger lists the kinds your server offers that the agent doesn't have yet. When there are none left, the button is hidden. If the kinds can't load, the tab says "Couldn't load the kinds of trigger you can add." with a Retry button.

Add a Teams trigger​

  1. Click Add trigger. With more than one kind on offer, pick the Kind.
  2. Pick the Teams data source. It is the one that holds your Azure Bot's tenant ID, client ID and client secret. The list shows only sources you own.
  3. Optional: fill in Who may start the agent, Who may approve and Open runs at once. See Settings for the rules.
  4. Click Add trigger.

The dialog then shows the Messaging URL. Click Copy and paste it as the messaging endpoint of your Azure Bot. DataDios shows this URL once. Treat it like a password. If you close the dialog without copying it, rotate the URL to get a new one.

If the add fails, the dialog shows the reason and stays open. Check the list before you try again, since the trigger may have been added. If the server has no Teams trigger setup, it says so. Ask your administrator.

Trigger settings​

Click Settings on the card. You can change:

  • Accepting messages: a switch. Off means the bot stops starting runs.
  • Who may start the agent and Who may approve: one person per line. Name each person by Microsoft Entra object ID, the GUID in the Azure portal under Users. Up to 100 people per list. Each list has its own choice. Who may start the agent: Anyone in the chat or Specific people. Nobody shows only on a trigger that was saved that way. Who may approve: Anyone but the requester, Specific people, or Only in DataDios, where approvals happen only on the agent's page. Specific people needs at least one person. The Trigger step in the hire wizard has the same choices.
  • Open runs at once: a whole number from 1 to 100. Messages past this many open runs get a "busy, try again later" reply.

Click Save settings. A value that isn't valid shows an error under its field.

Rotate the URL​

Click Rotate URL, then confirm. The old URL stops working at once, so the bot can't reach the agent until you paste the new URL into your Azure Bot. The dialog shows the new URL once, with Copy. If the rotate fails, try again to get a fresh URL.

Remove a trigger​

Click Remove, then Remove trigger. Messages to its URL stop reaching the agent. Runs already started carry on. You can add a trigger again later. It gets a new URL.

Find an agent​

The Agents page shows 25 agents at a time, newest first. Use the page buttons under the cards to see the rest.

Approve or reject a held action​

When the agent reaches an action set to Awaits approval, the run shows Waiting for approval. An Approval needed card appears on the run page and on the Approvals page.

The card shows:

  • Posts to: the repository and PR the review goes to, with a link to GitHub. A red warning appears if this isn't the PR the run was started for.
  • Why: the reason the agent gave.
  • What it wants to post: the review text the agent will send. Values with credential-like names are masked. On the Approvals page a long preview is cut short. Click Show all to read all of it.
  • The expiry time and a countdown.

To decide:

  1. Optional: enter a reason. DioS records it with your decision. On the run page the reason box is already open. On the Approvals page, click Add a reason first.
  2. Click Approve or Reject.
DecisionResult
ApproveThe agent goes on with the call and posts the review.
RejectNothing is posted. The run fails with reason approval_rejected.
No decision in timeThe request expires. Nothing is posted. The run fails with reason approval_expired.

A request stays open for up to 5 hours. While it waits, the run does not hold one of the agent's run slots.

Who can decide depends on where the run started. For a run started from Microsoft Teams, anyone in the channel except the person who asked can decide on the approval card in the thread. You, as the agent's owner, can also decide on this page, and that updates the card. See Start an agent from Microsoft Teams. For a run started in DioS, the person who started it decides on this page. DataDios sends that run's notices as plain text to the notify channel's webhook, with a link to this page, and no card.

An agent posts at most one review per PR. If it already reviewed this PR, approving doesn't post again: the run shows Not posted (already_reviewed). To review the PR again, hire another agent.

Find the Approvals page​

In DioS, click the Agents tab, then click Approvals. The page lists every held action from your agents, oldest first, because the oldest expires soonest. It shows up to 100 at a time. Click Open the run to see the full run. When an agent's card shows runs Awaiting approval, click the count to see only that agent's requests. You can also open the agent, and on its Overview tab click Approved calls in the Approvals row. That opens the Approvals page on the Approved tab for that agent.

See approvals already decided​

The Approvals page has four tabs: Pending, Approved, Rejected and Expired. Pending is the queue described above, oldest first. The other three are a read-only history with the newest decisions first. Each tab shows a page of rows at a time, with page buttons under the table.

Each row shows:

  • Agent and call: the agent, the action, and a short summary of the call.
  • Outcome: Approved, Rejected or Expired.
  • Decided by: the person's name followed by "in Teams" (for example "Meena Rao in Teams"), or "a Teams user" when Teams gave no name, in DataDios when you decided on this page, or no one for an expired request. A reason shows below it when one was given.
  • Decided, or Expired on the Expired tab: when it happened.
  • Open the run: opens the run.

If a tab has no rows, it says "No approved approvals", "No rejected approvals" or "No expired approvals". If loading fails, it says "Couldn't load approvals." with a Retry button. When you reach the page from an agent's card, the tabs show only that agent's approvals.

How a run ends​

While a run is in progress, its status is Queued, Accepted, Running or Awaiting approval. When it ends, the run page shows how. A failed run shows a message and its Reason code. To run it again, click Try again. Review a PR opens with the failed run's repository and PR number filled in.

Status or reason codeWhat it means
SucceededThe run finished.
CancelledThe run stopped before it finished.
FailedThe run stopped on a problem. The reason codes below say which one.
approval_rejectedSomeone rejected the agent's request, so the run stopped.
approval_expiredAn approval request expired before anyone decided.
launch_failedThe agent couldn't start. If this keeps happening, ask an administrator to check that the agent runtime on the server is running.
accept_timeoutNo agent runtime picked up the run within 2 minutes. Ask an administrator to check that the agent runtime is running.
queue_not_configuredThis server has no run queue set up. Ask an administrator to set it up.
runtime_failedThe agent reported that it failed. If this keeps happening, check that the model data source has a working key and quota left.
runtime_timeoutThe agent didn't finish in time.
runtime_errorThe agent stopped unexpectedly.
max_iterations_exceededThe agent took more steps than a run allows.
token_ceiling_exceededThe agent used up the token limit for this run.
model_source_changedThe model data source was deleted, renamed or replaced. Hire the agent again on the source you use now.
model_source_missingThe agent was hired without a model data source. Hire it again and pick one.

Other reason codes, such as worker or queue problems, show their own message on the run page.