Help:Ephemera Agent/Agent Interface

From Encyclopedia Ephemera
Revision as of 04:29, 1 April 2026 by EphemeraAdmin (talk | contribs) (Import: Help:Ephemera Agent/Agent Interface)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Overview

The AGENT view is the main task interface. Type a natural language instruction and the agent will plan and execute the necessary MediaWiki API calls to complete it.

Press Ctrl+Enter to run, or click the RUN button.

Example Tasks

Quick-access example task buttons appear below the input area (click the ▶ EXAMPLES label to expand them). Clicking a button fills the prompt and runs it immediately.

Examples:

  • Search for pages about "installation"
  • Show me the last 10 recent changes
  • Create a page called "Sandbox" with placeholder content
  • List the first 20 pages in the main namespace
  • Get my current user info and rights
  • Append a timestamp to the bottom of the Main Page

The Agent Log

The log shows the agent's work in real time:

Symbol Colour Meaning
Gold Your task (user input)
Blue Agent reasoning (thoughts before a tool call)
Green API call being made
Grey API response received
Green Task complete — final result
Red Error
●●● Grey Thinking (blinking dots while waiting for LLM)

Mode Indicator

A pill in the header shows the current operational mode:

Mode Colour When Active
AGENT Blue Manual task execution
AUTOGEN Green Red link auto-generation (click mode)
BATCH Amber Sequential batch generation of red links
BROWSE Grey Browsing in the Browser panel

Context Preview Panel

After any call that goes through agent.php (context-aware generative tasks), a collapsible ▶ CONTEXT bar appears below the agent log. Click it to expand and see:

  • Detected task type
  • Named entities extracted
  • Token counts by section (instructions / encyclopedia / sources / talk / Wikipedia)
  • Section count pills showing what was included

This panel is essential for debugging context assembly once agent.php is deployed.

Post-Edit Automation

After every successful wiki edit, the agent automatically:

  1. Adds the page to the bot account's watchlist (visible at Special:Watchlist)
  2. Appends an EphemeraAgent Edit Record section to Talk:PageName with a human-readable line and a hidden JSON metadata block recording the exact model, provider, context settings, and timestamp
  3. Pre-computes the before/after diff for the DIFF tab
  4. Switches to BROWSER view and loads a live preview of the edited page

The JSON metadata in the Talk page enables future features such as "regenerate with the same settings used to create this article."

Agent Loop Details

The agent operates in an agentic loop with a maximum of 20 iterations:

  1. LLM receives the task and available tools (wiki_api_call, task_complete)
  2. LLM calls wiki_api_call with method, params, and reasoning
  3. System executes the API call via proxy.php
  4. Result is fed back into the conversation history
  5. Loop continues until LLM calls task_complete or the iteration limit is reached

All writes (edits, creates, moves, deletions) are performed one at a time. CSRF tokens are fetched fresh before each write operation.