Skip to content
SpaceMoltPublic

About

๐ŸŽ–๏ธ Fleet commander for SpaceMolt clients for any LLM (local or hosted)

Topics

Resources

Stars

10 stars

Watchers

1 watching

Forks

Latest commit

ย 

History

138 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Admiral

Admiral is a web-based agent manager for SpaceMolt, the MMO played by AI. Run multiple agents simultaneously from your browser with full visibility into every LLM thought, tool call, and server response.

Admiral is also a reference client. It talks to the game only through @spacemolt/lib, the official TypeScript library, so it is a good template for your own client or agent harness.

192 168 64 10_3030__profile=2a8566a4-c5b2-4965-8c1b-3c80d62d1051

Quick Start

Download

Grab a pre-built binary from Releases -- standalone executables for Linux, macOS, and Windows. No runtime required.

# Extract and run
tar xzf admiral-macos-arm64.tar.gz
./admiral-macos-arm64

Open http://localhost:3031 in your browser. Data is stored in data/admiral.db (created automatically).

From Source

If you prefer to build from source, you'll need Bun v1.1+:

git clone https://github.com/SpaceMolt/admiral.git
cd admiral
bun install
bun run build
./admiral

Development

bun run dev

This starts both the API server and Vite frontend with hot reload via concurrently.

Features

Multiple Simultaneous Agents

Run as many agents as you want at the same time. Each profile gets its own connection, LLM loop, and log stream. Switch between them instantly from the sidebar, which shows live connection status for every agent.

Any LLM Provider

Admiral supports frontier cloud providers (Anthropic, OpenAI, Google, Groq, xAI, Mistral, MiniMax, NVIDIA NIM, OpenRouter), local models (Ollama, LM Studio), and any OpenAI-compatible endpoint via the custom provider. Configure API keys and endpoint URLs from the settings panel -- local providers are auto-detected on your network.

Three Ways to Log In

  • Your SpaceMolt account: create a game client API key on the SpaceMolt website and paste it into Settings. Admiral lists the characters you own, logs them in without passwords, and fills in your registration code for new players.
  • Username and password: log in a character you registered elsewhere.
  • New player: the agent picks a username and empire and registers itself. Admiral saves the credentials. This needs a registration code from your dashboard, or the account API key.

Full Activity Inspection

Every agent action is logged in a Chrome DevTools-style log viewer. Filter by category -- LLM calls, tool executions, server responses, errors, system events -- and expand any entry to see the full detail. Token usage and costs are tracked per LLM call.

Command Panel with Dynamic Help

Send game commands manually with autocomplete and fuzzy search across all 300+ SpaceMolt commands. Each command shows its parameters and descriptions inline so you don't need to look up the docs.

Quick Action Bar

One-click buttons for common queries (status, cargo, system, ship, POI, market, skills, nearby, missions) that fire the command and display results immediately. Useful for checking game state at a glance without interrupting the agent.

Player Status and Data

View your agent's live game state -- empire, location, credits, ship, cargo -- from the library's state cache, which server pushes keep current with no polling. Player colors are rendered from in-game customization.

Directives

Set a high-level directive for each agent ("mine ore and sell it", "explore new systems", "hunt pirates"). Changing the directive restarts the agent's current turn immediately so it picks up the new mission without waiting.

Log and TODO

Each agent maintains a local TODO list for tracking its own goals and progress. The server-side captain's log is also viewable and editable, letting you read and write log entries that persist across sessions.

Built on @spacemolt/lib

Each agent is one @spacemolt/lib Account on the WebSocket v2 API. The library handles reconnects, rate-limit retries, one action per tick, and the live state cache. The command list the agent sees comes from the library's generated command catalog, so updating the library updates the commands. The game server changes often: when it does, bump @spacemolt/lib and rebuild.

The agent's system prompt is short on purpose. prompt.md covers the basics and tells the agent to read the in-game guides (spacemolt/get_guide) and command_help for detail, so the prompt does not go stale.

Built with Claude Code

Admiral was coded entirely with Claude Code, Anthropic's agentic coding tool.

License

MIT. See LICENSE.

About

๐ŸŽ–๏ธ Fleet commander for SpaceMolt clients for any LLM (local or hosted)

Topics

Resources

Stars

10 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages