Skip to main content
This page is part of an AI coding agent skill and is written for agents, not humans. For the human-readable Base44 docs, see the developer documentation.

Agents Module

AI agent conversations and messages via base44.agents.
Note: This module requires a logged-in user. All agent methods work in the context of the authenticated user.
This module is for in-app agentsmanaged and conversational: app users talk to the agent and the platform runs the loop. For non-conversational task work where your code owns the loop (triggered by an entity event, schedule, or webhook — not a chat), build a code agent on the AI gateway instead. See ai-gateway.md.

Contents

Concepts

  • Conversation: A dialogue between user and an AI agent. Has unique ID, agent name, user reference, and metadata.
  • Message: Single message in a conversation. Has role (user, assistant, system), content, timestamps, and optional metadata.

Methods

Examples

Create Conversation

Get All Conversations

Get Single Conversation (with messages)

Returns the complete stored conversation including full tool call results (unlike the realtime subscription, which truncates tool call data).

List with Filters

Subscribe to Updates (Realtime)

When receiving messages through this subscription, tool call data is truncated for efficiency (arguments_string limited to 500 characters, results to 50). Use getConversation() after the message completes to retrieve full tool call data.

Send a Message

Get WhatsApp Connection URL

Message Structure

Conversation Structure

Common Patterns

Chat Interface

Type Definitions

AgentNameRegistry and AgentName

How to get typed agent names: The Base44 CLI can generate an augmentation of AgentNameRegistry from your project. For how to run it, use the base44-cli skill.

AgentConversation

AgentMessage

Supporting Types

CreateConversationParams

ModelFilterParams

AgentsModule