- Arrow-key input history (up/down with multiline awareness) - Bang shell commands via ! prefix (requires --yolo) - Codex-style input bar with mode indicator (R/Y/⌘) - Command palette virtual scrolling - Multiline input viewport fix - Merged model pills + footer into single status line - Removed shift+enter (wait for TUI library support) - Removed default footer hints
agentu
agentu is a small local agent written in Go. The current MVP is a terminal chat UI with OpenAI-compatible providers, streaming responses, session-level model/provider switching, and local tools.
Current MVP
- TUI-first chat experience with a light theme by default.
- OpenAI-compatible
/v1/chat/completionsprovider support. - Multiple providers from
~/.agentu/config.yaml. - Session-only provider, model, and thinking-level switching.
- Read-only project tools enabled by default.
- Built-in web search and URL fetching.
--yolomode for file writes and shell execution.
Quick Start
mkdir -p ~/.agentu
cp agentu.example.yaml ~/.agentu/config.yaml
export AGENTU_API_KEY='your-api-key'
go run .
Use dark mode when your terminal is dark:
go run . --theme dark
Use --yolo only when you want agentu to write files or run shell commands:
go run . --yolo
Config
By default, agentu reads:
~/.agentu/config.yaml
Use --config <path> to load another file.
providers:
loveuer:
base_url: https://ai.loveuer.com
api_key: ${AGENTU_API_KEY}
models:
- id: deepseek-v4-flash
thinking: none
context: 256000
Web tools are enabled by default with a built-in no-key backend. agentu exposes
web_search for current or external web information and web_fetch for reading
a known URL.
Provider names are the keys under providers. At startup, agentu selects the
first provider by name. Use /model provider <name> to switch providers for the
current session.
models is required. /model model <name> is restricted to that list. Each
entry is an object with:
id: model name sent to the provider.thinking: optional default thinking level for that model.context: optional context-window token count used for auto-compaction.
If model is omitted, agentu uses the first models entry. The agent block
is optional: working_dir, tool_timeout, system_prompt, and
max_context_tokens all have defaults. max_context_tokens overrides the
selected model's context when set.
Supported thinking values are:
none, middle, high, xhigh, max
When configured or changed with /model thinking ..., the value is sent as a
top-level OpenAI-compatible request field named thinking.
CLI Flags
go run . [flags]
--config <path>loads a YAML config file. Default:~/.agentu/config.yaml.--theme light|darkselects the TUI theme. Default:light.--plainuses the simple line-based REPL instead of the TUI.--yoloenables automatic file writes and shell execution.--resume <id>resumes a saved session from~/.agentu/sessions.
TUI Controls
entersends the message.ctrl+jinserts a newline.uprecalls the previous input;ctrl+p/ctrl+nnavigate input history.- The input starts at one line and grows up to six lines.
page up/page downscrolls the transcript.esccancels a running response.- Type
/to show available commands. - In
--yolomode, type! <command>to run a shell command from the configured working directory.
Slash commands:
/clearresets conversation history./compactsummarizes older conversation history and keeps the newest ~20% of context, with a small recent-message floor./statusshows changed files withgit status --short./diff [--stat] [path...]shows the unstaged git diff./test [command...]runs a project test command; defaults togo test ./...for Go modules ornpm testfor Node projects./modelshows current provider, model, thinking, and switch usage./model provider <name>switches provider for the current session./model model <name>or/model <name>switches model for the current session. In the TUI, type/modelor/model modelto choose from configured model IDs in the candidate palette./model thinking <none|middle|high|xhigh|max>changes thinking for the current session./sessionslists saved sessions./resume [id]resumes by ID or opens an interactive picker./rename <name>renames the current session./newsaves the current session and starts a fresh one./exitor/quitexits.
Local Tools
Read-only tools are available by default:
file_readfile_listfile_searchwith optionalcontext_linesandmax_resultscode_symbolsfor Go packages, imports, types, functions, and methodsgit_statusshows changed filesgit_diffshows unstaged or staged diff outputgit_logshows recent commit history
Web tools are also available in read-only mode:
web_searchweb_fetch
--yolo additionally enables:
file_writefor creating or replacing whole filesfile_editfor surgical line-range or pattern edits to existing filesshell_runfor non-interactive shell commands
Use --yolo for prompts that ask agentu to run or inspect local commands, for
example:
请帮我运行 `go test ./...` 并总结结果
Development
Run the verification suite:
go test ./...
go vet ./...
go build .
Local config and build outputs are intentionally ignored by git.
Notes
- Provider/model/thinking changes are session-only; agentu does not write them
back to
~/.agentu/config.yaml. - The config schema is intentionally strict during MVP development. Deprecated
fields such as
provideroractive_providerare rejected.