# Agents

An Agent is a custom AI assistant that belongs to a workspace. It has one prompt, one
set of guardrails, one access policy, and one or more channels where people can talk
to it. Build it once, then deploy the same behaviour to Slack, Microsoft Teams,
iMessage, and an embedded chat on your own website.

This is what turns a knowledge base from something people study into something that
answers them at their desk.

## Anatomy

| Part | What it controls |
|---|---|
| Prompt | The Agent's role, goals, tone and response style |
| Guardrails | Non-negotiable limits, applied after the prompt and overriding it |
| Connector | The maximum data and actions available to the Agent |
| Identity mode | Whether it acts as a service, as the person asking, or both |
| Channels | Slack, Microsoft Teams, iMessage, website embed |
| Status | Draft, active, disabled or archived |

## One Agent, every channel

Channels are deployments of one Agent, not separate Agents to keep in sync. Adding
Slack and Teams to the same Agent gives both the same prompt, guardrails, permissions,
approved knowledge and courses, and lifecycle. Credentials and routing stay isolated
per channel; behaviour does not diverge. Changing the policy once applies it to every
active channel.

- **Slack.** Mention the Agent in a channel or send it a direct message. Replies stay
  in the thread.
- **Microsoft Teams.** Private chats and standard channel threads. Mention it once to
  start a thread and it keeps answering there.
- **iMessage.** Text a question and get an answer grounded in the current material.
  One active iMessage Agent per workspace.
- **Website embed.** Drop it into your own site as an iframe, public or authenticated.

## Permissions are separate from instructions

**An Agent cannot exceed its Connector's permissions, even if its prompt or a user
asks it to.** Prompts describe intended behaviour; the Connector decides what is
technically possible, and it is enforced server-side.

Guardrails are stored separately from the prompt and take precedence when the two
conflict, so a limit like "never reveal private employee data" is not one instruction
competing with a long persona description.

Three quick profiles cover most cases:

| Profile | Access |
|---|---|
| Answer questions | Read approved knowledge and courses |
| Build courses | Read knowledge, create courses, edit course content |
| Run learning operations | Read people and analytics, manage assignments |

Beyond these, access is granular per capability: knowledge base (read, write or
admin), courses, course creation with daily and lifetime caps, people, analytics,
assignments, groups, monitors and alerts, workspace curation, workspace settings, and
the integration audit log. Each can be narrowed by an allowlist of specific files,
folders, tags, per-path rules or named courses. Where path rules overlap the most
specific wins, so one file can stay read-only inside a writable folder.

The recommended approach is the smallest policy that supports the Agent's job, adding
capabilities only when a real workflow needs them.

## Identity

- **Service.** The same access for every sender, no workspace membership required.
  For public support and anonymous audiences.
- **Hybrid.** Links a sender to a workspace member where possible and falls back to
  the service identity otherwise.
- **Member gated.** The sender must resolve to a current workspace member. This is the
  mode for internal assistants touching private information, and membership is
  re-checked on every session.

The Connector remains the ceiling in every identity mode. Identity narrows access; it
never widens it.

## Embedding on your own site

A public Agent takes three steps: enable public access, list the website origins
allowed to embed it, and copy the generated iframe. For signed-in users, your server
mints a short-lived Agent URL for the current person, so the assistant knows who it is
helping without you managing another login. Those URLs carry a single-use ticket that
expires in two minutes and is never exposed in URLs, logs or referrers. The server key
stays on your server.

## Lifecycle

Agents move through draft, active, disabled and archived. Disabled is a clean pause
that keeps the configuration. Archiving is permanent and thorough: it disables every
deployment, revokes embed keys, tickets and live sessions, releases channel routing,
and revokes the managed access policy. Conversation history is isolated by Agent,
channel, conversation and thread.

Permissions are enforced server-side, guardrails override conflicting instructions,
provider credentials are sealed at rest and never returned to the browser, every
inbound Slack and Teams request is cryptographically verified, embed origins are
checked when a session starts and again while it runs, and member-gated sessions
re-check current membership.

## Suggested starting policies

| Agent | Policy |
|---|---|
| Internal knowledge assistant | Answer questions, member gated |
| Public support Agent | Answer questions, service, approved public knowledge only |
| Course creation Agent | Build courses, member gated |
| Operations Agent | Run learning operations, member gated |

## Boundaries

- Slack and Teams channels remain in draft until provider setup is complete.
  Selecting a channel is not the same as activating it.
- A custom Teams Agent requires an Entra application, an Azure Bot registration and a
  Teams app package, so it involves IT. Slack is considerably lighter.
- Only one Agent can be the active iMessage responder per workspace at a time.
- A workspace-wide Slack or Teams installation is not automatically attached to every
  custom Agent. The default workspace assistant and a custom Agent are separate things.
- Agent-managed access policies cannot be shared between Agents; reusing one means
  attaching an existing Connector explicitly.

## Agent Runs

Review runs across Slack, Microsoft Teams, iMessage, and embeds. Inspect who asked, the conversation, tool activity, model, turn counts, and cost. Agent permissions determine which knowledge and actions are available; the prompt describes how to use them.

## Course update proposals and Automations

Agents can be granted permission to propose changes on selected courses. They prepare a draft for course editors or a catalog’s Publishing reviews queue, where a person can inspect the submitted version before approval. The access policy remains the ceiling, including for unattended runs.

[Automations](https://honen.com/llms/automations.md) run an Agent on a schedule, by webhook, or manually. Choose the Agent, write instructions, and set the trigger and time zone. Pause from the list, Run now, or open Runs for results and conversations. The automation inherits the Agent’s model and permissions.

Slack and Microsoft Teams work continues through long course-creation and editing tasks, with progress updates in the conversation and a final reply when the result is ready. Shared course links open the learner experience. Generated files and supported attachments stay part of the conversation.

## Run tasks, evaluate results, and share reports

Agents can run tasks through Console or the Connector API. Inputs & outputs defines optional JSON schemas, named files, Sandbox, and reusable resources.
Resources can include Knowledge Base documents, templates, and reference uploads. Each run uses a snapshot of its authorized sources.
Console shows Output and Activity. Preview limits workspace access to reading and can generate local files. Live permits configured actions.
The API requires a Connector with Run Agents enabled and the Agent selected. Set the mode explicitly; the API defaults to Live.
Evals tests saved cases against weighted criteria. Inspect the output and scoring evidence, and compare Preview and Live runs separately.
An HTML report can include images and a seven-day sharing link. Anyone with that link can view that report until it expires.
