No description
- Go 89%
- Emacs Lisp 10.5%
- Makefile 0.5%
Muness
A fully open-source, terminal-based micro agent harness built in Go. Highly portable and designed for secure scripting, system administration, and programming on local or remote systems.
Features
- Zero External Dependencies: Implemented strictly using Go's standard library (including custom OpenAI-compatible client and JSON-RPC servers).
- Extremely Portable: Builds into a single self-contained executable. Ideal for copy-and-run deployment on remote servers.
- Interactive Security Model: By default, all system operations (file edits, bash execution) prompt for user consent.
- Path Sandboxing: Validates and restricts file operations within the workspace directory, preventing directory traversal.
- Extensible Integration: Designed to export capabilities to external systems (such as Emacs) via JSON-RPC 2.0.
Getting Started
Prerequisites
- Go 1.18 or higher (tested on 1.26.4).
Building
To build the executable:
go build -o muness
This generates a single muness binary in the current directory.
Running
To run the agent in interactive terminal mode:
./muness --api-url "https://api.openai.com/v1" --api-key "your-key" --model "gpt-4o"
Configuration Options
You can configure the agent using flags or environment variables:
| Flag | Env Variable | Default | Description |
|---|---|---|---|
--api-url |
HARNESS_API_URL / OPENAI_API_BASE |
https://api.openai.com/v1 |
OpenAI-compatible API base URL |
--api-key |
HARNESS_API_KEY / OPENAI_API_KEY |
(None) | Your API Key |
--model |
HARNESS_MODEL / OPENAI_MODEL |
gpt-4o |
LLM model name |
--workspace |
(None) | nearest .git root or . |
Directory agent is allowed to access |
--system-prompt |
(None) | loaded from system_prompt.md |
System instructions string |
--system-prompt-file |
(None) | (None) | Path to file containing system prompt |
Directory Structure
├── main.go # Entry point & flag parsing
├── go.mod # Go module definition
├── README.md # Project documentation
└── pkg
├── agent
│ └── agent.go # Core REPL and conversation coordinator
├── llm
│ └── client.go # Lightweight OpenAI HTTP client wrapper
└── tools
└── tools.go # File manipulation & shell command execution tools