Skip to Content
DocumentationActionGuidesConfigure AI Agents

Configure AI Agents

Momen includes built-in AI capabilities. Create highly customized Agents with flexible Prompt, RAG, and tool invocation, combined with Momen frontend orchestration and backend data processing, to build production-grade AI applications quickly.

Model support

Use models provided by Momen or connect your own model service.

Momen-hosted models

Momen supports mainstream large models. Token usage is tracked automatically and converted to Momen AI Points according to billing rules.

When AI Points are insufficient, data vectorization, vector sorting, and Agent calls will not work. After recharging, allow a few minutes for the balance to take effect.

View Points consumption records in project details.

AI Points consumption records

Each project receives a monthly AI Points grant based on its plan. Unused balance resets at the start of each month. When balance is exhausted, purchase more from project details.

Available models

ModelCapabilities
Gemini 3 FlashA fast, high-value reasoning model for agent workflows, multi-turn chat, and coding assistance. Near Pro-level reasoning and tool use for interactive development, long-running agent loops, and collaborative coding. Significant improvements over Gemini 2.5 Flash in reasoning, multimodal understanding, and reliability.
Gemini 3 ProGoogle’s flagship frontier model for high-precision multimodal reasoning. Combines strong performance across text, image, video, audio, and code with a 1M-token context window. Excels at general reasoning, STEM, factual Q&A, multimodal understanding, agent coding, and long-context tasks.
Gemini 3.1 ProBuilds on Gemini 3 with improved SWE benchmarks and real-world coding. Stronger autonomous task execution in structured domains such as finance and spreadsheet workflows. Better token efficiency, long-horizon stability, and tool orchestration.
Gemini 2.5 seriesDesigned for advanced reasoning, coding, math, and science. Features a “thinking” mode for logical deduction. The public-image-input variant is optimized for external URL image recognition.
Nano BananaTop-tier image generation model with context understanding—for generation, editing, and multi-turn visual dialogue.
Nano Banana 2Latest image generation and editing model with Flash-level speed and professional visual quality.
Nano Banana 2 — 2K / 4KUltra-high-resolution (2K/4K) variants for commercial-grade assets.
VeoGenerates high-fidelity 8-second 720p, 1080p, or 4K video with realistic motion and native audio.
GPT 5 / 5.1 / 5.2Latest flagship models with strong commonsense reasoning and complex instruction following.
GPT 5 mini / nanoLightweight variants with faster responses and lower cost while retaining core GPT-5 logic.
GPT o3 / o4 miniOptimized for deep logical reasoning—math, programming, and complex decisions.
GPT 4.1 seriesFinal GPT-4 generation with stable output and accurate JSON parsing.
DeepSeek R1Excels at “thinking” logic—deep reasoning via reinforcement learning for precise answers.
Qwen3Max: highest performance; VL Plus: vision-enhanced, highly accurate image understanding.
GLM 5Balanced bilingual (Chinese/English) capabilities with complex tool calling (Function Calling).
ERNIE5.0 Thinking: enhanced reasoning chains; 4.5 Turbo 128K: ultra-long context.

This table is a basic reference. See each provider’s official documentation for full details.

Bring your own model

Paid projects can connect other model providers (e.g., OpenAI) or self-hosted models.

Configuration:

  • Fill in name, type, platform, and model ID
  • For platform models: provide API Key and endpoint ID where required
  • For self-hosted models: provide server URL, auth header, and model value
  • After validation, save and deploy to use

Create an Agent

Create a new Agent

Create an Agent from the Action tab → AI Integration. The system automatically generates data models such as Conversation and Message tables. See AI data model below.

Set model parameters

  • Large model: Momen-hosted or your own model
  • Temperature: 0–1; higher values produce more random output
  • Max turns: Maximum conversation turns per session
  • Token limit per turn: Exceeding this fails the current turn
  • Image processing mode: Simple or detailed (detailed consumes more)

In multi-turn conversations, history accumulates. Set token limits and turn counts carefully.

Configure input

Inputs pass dynamic data when calling the Agent. Reference them in the prompt template and contexts.

Supports image, video, and file (PDF) inputs. These are appended to the end of the prompt automatically and cannot be referenced inside the prompt text.

Configure prompts

  • System: Define the Agent’s role、task、constraints, etc.
  • User: Define the first message sent to the model (optional)

Configure contexts

Context results are sent to the model together with the prompt template, improving accuracy, timeliness, and trustworthiness.

Context sources can be the Momen database or APIs.

Since August 2025, direct file upload as contexts is no longer supported (existing file contexts are unaffected). For file-based knowledge, preprocess and store in the Momen database, or use a third-party RAG platform and fetch via API.

For vector storage and semantic search, see Vector data.

Configure tool invocation

Actionflows, APIs, and other Agents can be registered as tools. The AI decides when to call them.

Configure output

  • Plain text: Unstructured output; streaming supported
  • Structured: Output follows a JSON schema with custom field descriptions

Debug

After configuration, debug directly to verify inputs, tool calls, and responses.

Agent actions

Use these actions on pages to interact with an Agent:

  1. Start conversation: Create a new session and send the initial message. Returns session ID and model result; adds records to the Conversation and Message tables.

    • Input: Agent ID, message content
    • Output:
      • id: New session ID (integer)
      • data: Model result—text for plain output, JSON for structured output
      • images: Images returned by the model (array)
  2. Continue conversation: Send a new message to an existing session.

    • Input: Session ID, message content
    • Output: No direct output; session status becomes IN_PROGRESS and a new Message record is added.
  3. Delete conversation: Delete a session and its messages.

    • Input: Session ID
    • Output: No direct output; session and related messages are removed.
  4. Stop response: Stop an in-progress AI reply; the session can still be continued later.

    • Input: Session ID
    • Output: No direct output; session status changes to stopped.

By default, a loading animation appears while the Agent runs. Toggle Show loading animation on request on the action to control this.

Use Agent results

  1. Plain text mode

    Add a page variable. On the button action, configure an AI request and set the page variable to the result on success. For streaming output, assign the stream to a text page variable—its value updates as the AI generates text.

  2. Structured mode

    When using custom output, set field types and English names. The AI returns results by field name. Select fields from result data for business logic.

  3. Image output

Images from the Nano Banana model are stored in the images array. For a single image, use the FIRST formula to get the first item.

Request timeout

All AI requests have a 60-second gateway timeout. Streaming and non-streaming output have no additional timeout beyond this gateway limit.

FAQ

Q: What if a model is officially deprecated?

Providers (e.g., OpenAI) periodically retire models. Momen deprecates the same models in the editor. Configurations using deprecated models will error and cannot be debugged or published until you switch to an available model. In deployed apps, AI actions calling deprecated models fail with CUSTOM_LLM_CONFIG_NOT_FOUND.

Before deprecation, an in-editor notification is sent. Switch affected AI configurations to available models promptly.


AI Points

AI Points represent computing resources for AI features. Usage is deducted based on tokens consumed by the model.

Monthly grant (per project)

At the start of each month, Momen grants AI Points to each project according to its plan. Unused balance does not roll over.

PlanMonthly AI Points
Free100,000
Basic1,000,000
Pro5,000,000

When balance is exhausted, vectorization, vector sorting, and AI calls stop working until you purchase more. After recharge, allow a few minutes for the balance to take effect and for pending vector data to process.

Check and purchase AI Points

Go to User Center, hover over your project, and click Manage. On the project details page, view your remaining balance and purchase more.

Project details — AI Points

What consumes AI Points

  • Vector data storage: When vector storage is enabled on a field and data is written to it.
  • AI requests and responses: Points are deducted for both input and output tokens. View detailed usage under Order & Usage Details in project details.

AI data model

When you create an Agent, the system automatically creates four core tables: Conversation, Message, Tool Usage Record, and Message Content.

AI data model tables

Conversation table

Records each AI session. A record is added after Start conversation; Delete conversation removes it and related message content.

FieldTypeDescription
Account IDIntegerLinks to the account table; identifies the session owner.
InputJSONStores prompt, contexts, tools, output config, and other parameters at session start.
StatusTextCREATED, IN_PROGRESS, THINKING_CHAIN_STREAMING, STREAMING, COMPLETED, FAILED, CANCELED
Error messageTextError content when the session fails.
AI modelTextModel used when the session was created.
AI config ID / modelRelationAI configuration and model invoked.
MessagesRelationAll messages in this session.

Message table

Records all messages in a session.

FieldTypeDescription
Account IDIntegerLinks to the account table.
Conversation IDIntegerLinks to the Conversation table.
RoleTextsystem (prompt/context), assistant (model output), user (user input)

Message Content table

A message can contain multiple content types (text, image, JSON). Message Content stores each piece.

FieldTypeDescription
TypeTextTEXT, IMAGE, VIDEO, PDF, AUDIO, JSON, REASONING_CONTENT
Message IDIntegerLinks to the Message table.
Token usageIntegerActual tokens for this content. For assistant, output tokens; for user or system, input tokens.

Tool Usage Record table

Records tool calls during Agent execution. A single message may trigger multiple tool calls.

FieldTypeDescription
NameTextTool name
Tool call IDTextUnique identifier for this call
TypeTextACTION_FLOW, TPA (third-party API), ZAI (another Agent)
RequestJSONRequest sent to the tool
ResponseJSONTool response
Message IDIntegerLinks to the Message table
Last updated on