Agents¶
AI agents are intelligent virtual assistants within the PrimeThink platform that enhance productivity and streamline workflows. These specialized digital entities can perform a wide range of tasks, from answering questions and retrieving information to executing complex workflows and integrating with external systems.
PrimeThink's agent architecture allows for seamless collaboration between human users and AI assistants, creating a powerful ecosystem where routine tasks can be delegated while maintaining human oversight on critical decisions. Whether you're looking to automate customer support, enhance team collaboration, or create specialized assistants for specific domains, PrimeThink's agent capabilities provide the foundation for intelligent automation.
This section explores how to effectively work with AI agents in PrimeThink, including their configuration, capabilities, and best practices for integration into your workflows.
Topics: - Available AI agents and their capabilities - Adding AI agents to channels - Agent permissions and access levels - Agent commands and syntax - Best practices for agent interaction
Archiving an Agent¶
An agent you no longer want offered, but do not want to lose, can be archived. Archiving hides the agent from the agent list without deleting it or touching the chats it already belongs to, and it can be reversed at any time.
Archived agents are left out of the agent list by default. Ask for them explicitly to see them — through the app's archived filter, or by passing archived=true when listing agents through the API, which returns active and archived agents together. An agent's own record now carries an archived flag alongside its status.
In the app, Archive and Unarchive sit on the agent's own menu and ask you to confirm before acting.
For integrators
Archiving used to be expressed as an agent status. It is now a separate flag, so an agent is archived and active at the same time rather than losing its status. The old status=archived and status=all filters still work and are still translated for you, but prefer the archived flag in new code.
Member-Agent Delegation¶
When several AI assistants are members of the same chat, the active assistant can use the other assistants as specialist subagents. It delegates a matching unit of work privately, waits for the result, and incorporates that result into its own response.
Each member subagent uses its own:
- Name, description, and reply style as its working persona
- Configured model and the model credentials available to the current user or group
- Capabilities and tools, including supported MCP and web-search tools
- Attached documents and active, non-skill collections
- Shared chat goal, documents, and collections
A member whose model or required configuration is unavailable is skipped without failing the active assistant's entire turn.
Private Delegation vs Visible Conversation¶
Member delegation is private and synchronous. The member's intermediate work and response are returned to the active assistant rather than posted as a separate chat message. Use this for specialist research, analysis, or tool use that should contribute to one combined answer.
Use a visible @ mention instead when the member assistant should participate publicly in the conversation and answer as itself.
Member Knowledge Filesystem¶
The agent runtime exposes other member assistants under the read-only path:
INDEX.md identifies the member and lists its available knowledge. The documents/ and collections/ folders mirror documents and active non-skill collections attached to that member. Skill collections are not copied into this area.
The /chat/members/ tree is agent-visible runtime context, not an editable chat-document folder. Writes and edits are rejected. To change a member's knowledge, update the documents or collections attached to that assistant in PrimeThink.
Treat member knowledge as shared with the chat's assistants
Adding an AI assistant to a chat makes its mounted documents and active collections available to the other assistants for delegated work. Attach only knowledge that is appropriate for that chat and its participants.
The same knowledge is also searchable by RAG in every chat the assistant takes part in, including a public chat that runs it with Documents and Collections on: visitors can get answers drawn from its indexed collections and its own documents. See AutoRAG.
Configuration Recommendations¶
- Give each member a distinct, specific description so the active assistant can choose the right specialist.
- Assign only the capabilities and knowledge the member needs for its role.
- Use complementary specialists rather than several assistants with overlapping descriptions.
- Keep sensitive or unrelated material out of an assistant's attached knowledge before adding it to a shared chat.
- Use
@mentions when users need to see which assistant produced an answer; use automatic delegation for a single coordinated response.
Rich Replies: Widget and HTML Blocks¶
An agent can answer with a small piece of rendered HTML instead of plain text: a styled summary card, a mini dashboard, a table with colour coding. It writes the HTML inside a fenced code block, and the app shows the result in the message.
Two block types are recognised:
| Block | What the reader sees |
|---|---|
```widget | The rendered result, directly in the message. Tailwind utility classes work without loading anything, and scripts run. |
```html | Code and Preview tabs: the source by default, and the rendered page when the reader opens Preview. Tailwind is not provided. |
Use widget when the rendered result is the answer, and html when the reader may want the source, for example when the agent is writing a page for them.
<div class="rounded-xl border border-gray-200 dark:border-gray-700 p-4">
<p class="text-sm text-gray-500 dark:text-gray-400">Open tickets</p>
<p class="text-3xl font-semibold">42</p>
<p class="text-sm text-green-600 dark:text-green-400">−8 since Monday</p>
</div>
How a widget block behaves:
- It fits its content. The block grows to the height of what it renders, so there is no fixed box to scroll inside. Full-screen heights such as
h-screenandmin-h-screenare ignored, and in the browser a very tall widget is capped and scrolls on its own. - It follows the theme. The widget sits on the message's own background and text colour. Add
dark:variants to your classes so it also reads well in dark mode; a widget with nodark:classes is shown on a white background when the app is dark. - Scrolling passes through. Scrolling or swiping over a widget scrolls the chat, unless the widget has a scrollable area of its own under the pointer.
- It appears once the block is complete. While a reply is streaming, a widget renders when its block closes, or once it has stopped changing for a moment.
- Replies show a label. When someone replies to the message, the quote shows [Widget] or [HTML] instead of the code.
Each block runs isolated from PrimeThink, in a sandbox of its own:
- It cannot reach the app, the signed-in session, the chat's data or the PrimeThink API, and
primethink.jsis not available. A block only displays; it cannot send messages or save anything. For something people interact with and that keeps data, build a Live App, or give the agent the Gen UI capability for structured cards and forms. - Browser storage and cookies last only while the block is shown.
- Web links (
http,https,mailto,tel) open outside the chat, in a new browser tab or in the device's browser. In the mobile apps, a file the block offers for download is passed to the share sheet only right after the reader taps.
To make an agent use them, say so in its Reply Instructions, for example: "When a visual summary helps, add a widget block styled with Tailwind classes, with dark: variants." Keep the content self-contained: the block cannot fetch PrimeThink data, so put the values in the HTML itself.