3forge Agent¶
3forge Agent is an AI assistant that lives inside the Web client. Through the chat window, a user can work on a Dashboard in plain language while an agentic loop calls live 3forge Enterprise operations in response, e.g: querying data, building panels, editing callbacks, inspecting logs. The model's reasoning and results are then streamed back into the window.
It operates on the running Dashboard. It can see the current layout, run real queries, and make real changes.
Enabling and Configuring Providers¶
3forge Agent is off by default. Enable it and declare at least one provider in the Web component's local.properties:
Built-in provider ids are anthropic, openai, gemini, and xai.
Available Properties¶
- Default:
- Description:
-
- Comma-delimited list of provider IDs (for built-in) or fully qualified class names for custom providers.
- The first entry is the default provider, the one used when a chat, a sub-agent, or
session.promptAidoes not name one explicitly. - Every listed provider is registered, so a user can switch providers mid-session from the chat's model picker.
- Listing a provider is what activates it. A built-in provider still needs its
ami.web.ai.<id>.api_keyto make calls, but it is the presence in this list, not the key, that registers it.
Note
2 special tokens are also accepted: * registers every provider discovered on the classpath, and !id excludes one (only meaningful alongside * e.g: *, !xai).
If AI is enabled but ami.web.ai.providers is unset, each user session fails to initialize.
Per-Provider Properties¶
Each provider reads its own ami.web.ai.<id>.* keys, where <id> is the provider id:
| Property | Purpose |
|---|---|
ami.web.ai.<id>.api_key |
Credential for a built-in provider |
ami.web.ai.<id>.model |
Comma-delimited model list; the first entry is the default model, and the full list becomes the "Switch model" dropdown |
ami.web.ai.<id>.timeout_ms |
Socket timeout for calls to this provider |
ami.web.ai.<id>.context_window |
Override the assumed context-window size (drives history compaction) |
Other Tunables¶
All of the following are under the ami.web.ai. prefix:
| Property | Default | Purpose |
|---|---|---|
max_tokens |
4096 |
Max tokens per model response |
tools.max_per_iteration |
30 |
Cap on tool calls dispatched from one model turn (anti-runaway guard) |
subagent.max_iterations |
25 |
Iteration budget for a spawned sub-agent |
tools.sql.permissions |
read |
The Center rights the agent's SQL runs with: read, read_write (read and write), or full (read, write, alter, and execute). A user's own AMIDB_PERMISSIONS narrows it further |
conversations.dir |
data/users/ai_chats |
Where chat histories persist |
conversations.max |
10 |
Retained conversations per user |
compaction.enabled |
true |
Auto-summarize long histories to stay within context |
compaction.threshold |
0.80 |
Fraction of context that triggers compaction, between 0.5 and 0.95. A value outside that range is clamped, with a warning |
system_prompt.dir |
(bundled) | A directory whose agents/ subdirectory replaces the built-in agent definitions. Without that subdirectory, 3forge Agent fails to start |
Opening the Chat¶
When AI is enabled, the desktop/Windows menu gains a "3forge Agent" entry. Selecting it opens a chat window titled "3forge Agent".
A chat can also be scoped to a specific panel: right-click a panel and choose "3forge Agent...". The agent then sees what you are looking at, so questions like "why is this table empty?" have context.
Within a chat, the gear menu's Chat submenu holds the conversation actions: rename, delete, and start a new chat. Conversations persist per user (up to conversations.max).
How a Turn Runs¶
Each prompt you send drives an agentic loop:
- The model streams a response into the chat window.
- Any operations (tools) it decides to run are dispatched against the live deployment.
- Their results are fed back to the model, and the loop iterates.
- The loop ends when the model finishes, or hits a safety budget.
Practical characteristics:
- Multiple operations in one model turn run one after another, in order, and their results go back to the model together.
tools.max_per_iterationcaps how many run; any beyond it are refused. - Mutating operations are guarded: the layout is autosaved before changes, and a DDL gate and result-size cap protect the deployment.
- A turn ends with a stop reason:
END_TURN,MAX_TOKENS,ERROR, orCANCELLED. A turn that reaches its iteration limit or time budget ends asEND_TURN, with a notice added to the reply. - For focused sub-tasks, the agent can spawn specialized sub-agents.
Note
The agent does not have Enterprise knowledge baked in. It fetches authoritative, build-current documentation at runtime through documentation tools, so its guidance stays in sync with the version you are running.
Agents and Their Tool Allowlists¶
3forge Agent ships a set of agents, one Markdown file per agent, enumerated by an _agents.txt manifest alongside them. Each file holds that agent's system prompt, and optional front matter listing the tools it may use:
To replace the bundled definitions, point ami.web.ai.system_prompt.dir at a directory with an agents/ subdirectory holding your _agents.txt and agent files.
Entry Forms¶
Each entry is a whole tool name, matched exactly. Related operations are grouped behind one tool with an op selector, so naming a grouped tool grants every operation it exposes: web_console gives the agent all of the web_console operations. An allowlist cannot grant one operation of a tool and withhold the rest.
Omitting the tools: block entirely gives the agent every tool available in the deployment.
How It Is Enforced¶
The allowlist is a boundary. The agent is shown only the tools on its list, and before a call runs, the tool it names must be one of them. A call to any other tool never reaches the deployment. The model receives Not executed: '<tool>' is not one of the tools available to this agent., and a warning naming the agent and the tool goes to the component log.
Diagnostics¶
When an agent is built, its list is matched against the tools the deployment exposes. An entry that matches no tool, such as a renamed tool or a misspelling, grants nothing, and the component log gets a warning that the agent declares N tools that match no advertised tool, naming them.
Switching Models and Providers¶
The chat's model picker lists every model from every registered provider's ami.web.ai.<id>.model list. Switching model (or provider) mid-conversation is supported; the conversation history carries over.
Observability¶
All 3forge Agent activity is written to AmiAi.log in the logs directory, one JSON object per line (older files roll over to numbered names such as AmiAi.0001.log), so a turn can be reconstructed after the fact. Payloads are shortened here:
Every line carries ts and event, and, where they apply, sessionId, chatId, and a payload. The sessionId field holds the user name. On prompt_received, chatId is the chat's id; on the events of the agent run that answers it, chatId is the run's id. To diagnose a turn, find the tool_result with "ok":false and read the tool_call with the same toolUseId to see what the agent attempted.