Help:Ephemera Agent/Agent Interface
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:
- Adds the page to the bot account's watchlist (visible at Special:Watchlist)
- Appends an EphemeraAgent Edit Record section to
Talk:PageNamewith a human-readable line and a hidden JSON metadata block recording the exact model, provider, context settings, and timestamp - Pre-computes the before/after diff for the DIFF tab
- 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:
- LLM receives the task and available tools (
wiki_api_call,task_complete) - LLM calls
wiki_api_callwith method, params, and reasoning - System executes the API call via
proxy.php - Result is fed back into the conversation history
- Loop continues until LLM calls
task_completeor 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.