Getting Started
LongerAgent is a TUI demo exploring how a coding agent can proactively manage its own context and workflow. It's a working prototype — usable for real tasks, but built to demonstrate design ideas rather than serve as a production tool.
Platform: macOS.
Install
Install LongerAgent globally via npm:
npm install -g longer-agentRequires Node.js 18 or later.
Run the Setup Wizard
The init command walks you through provider selection, API key configuration, and model selection:
longeragent initThe wizard will:
- Show you the list of supported providers (Anthropic, OpenAI, Kimi, MiniMax, GLM, Ollama, oMLX, LM Studio, OpenRouter).
- Prompt you to select one or more providers.
- Ask for API keys for each selected cloud provider, or import detected external env vars for GLM, Kimi, and MiniMax.
- For local providers (Ollama, oMLX, LM Studio), auto-discover available models from the running server.
- Let you pick a default model.
All preferences are saved to ~/.longeragent/tui-preferences.json. API keys are stored in ~/.longeragent/.env with 0600 permissions. GLM, Kimi, and MiniMax use LongerAgent-managed internal env slots there; external env vars are only imported during init or /model. OpenAI (ChatGPT Login) stores OAuth tokens in ~/.longeragent/auth.json instead of using an API-key env var.
You can re-run longeragent init at any time to add providers or change your default model.
Start a Session
longeragentThat's it. You are now in a conversation with the agent. Type a task and press Enter.
Useful Early Commands
/model # switch model/provider; can import or paste missing keys
/mcp # connect configured MCP servers and list discovered tools
/thinking # raise or lower reasoning depth
/skills # enable or disable installed skills
/resume # reopen an older session from log
/summarize # compress older context to free up space
/compact # full context reset with continuation summaryWhat Happens During a Session
LongerAgent is optimized for a specific workflow:
- Start a real task -- not a toy prompt. Give it something substantial.
- Let the agent work -- it will explore, edit, and test for a while.
- Interrupt freely -- add clarifications or side requests without restarting.
- Manage context -- use
/summarizeor/compactto keep the session alive instead of starting over when context grows large.
The agent manages context automatically through three layers (hint compression, agent-initiated summarization, and auto-compact), but you can also intervene manually at any point.
CLI Options
longeragent # Start with auto-detected config
longeragent --version # Show the current version
longeragent init # Run setup wizard
longeragent oauth # Log in to OpenAI via OAuth (device code / browser)
longeragent oauth status # Check OAuth login status
longeragent oauth logout # Log out
longeragent --templates <path> # Use a specific templates directory
longeragent --verbose # Enable debug loggingSafety
LongerAgent does not sandbox shell commands or file edits. It executes commands and writes files directly. Run it in trusted environments and review what it does.
Next Steps
- Providers -- set up cloud or local model providers
- Context Management -- understand how context stays under control
- Sub-Agents -- run parallel workers within a session
- Configuration -- full reference for
~/.longeragent/