yaklang-memfit-cli is a terminal AI agent client for Yaklang.
It connects to yaklang ai-http-gateway and provides an interactive TUI-based workflow for creating sessions, streaming agent output, and sending follow-up inputs from the command line.
- Connects to a Yaklang AI gateway endpoint (default:
http://127.0.0.1:8089/agent) - Creates and manages agent runs/sessions
- Streams real-time run events via SSE
- Sends user inputs/events during a live session
- Supports runtime AI setting updates (provider/model/review policy/focus mode)
- Supports run cancellation from the TUI
- Go
1.24.1+ - A running Yaklang
ai-http-gatewayservice - Accessible API prefix (default:
/agent)
# 1) Enter project directory
cd /Users/z3/Code/yaklang-aitui
# 2) Run directly
go run ./cmdBy default, the client connects to:
- Host:
127.0.0.1 - Port:
8089 - Prefix:
/agent
So the final base URL is:
http://127.0.0.1:8089/agent
go run ./cmd \
-host 127.0.0.1 \
-port 8089 \
-prefix /agent \
-token <JWT_TOKEN>-host: gateway host-port: gateway port-prefix: API route prefix-token: optional JWT bearer token
go build -o yaklang-memfit-cli ./cmd
./yaklang-memfit-cli -host 127.0.0.1 -port 8089 -prefix /agent/helpshow command help/settingshow current AI settings/providerlist/select provider/modellist/select model/focus_modelist/select focus mode/set <key> <value>update setting fields/review_policy <auto|ai|manual|ai-auto>update review policy/newstart a new session/cancelcancel current running session/clearclear screen content/exitor/quitquit the app
- Create a session via
POST /session - Open SSE stream via
GET /run/{run_id}/events - Trigger run execution via
POST /run/{run_id} - Push follow-up user input via
POST /run/{run_id}/events/push - Cancel run (if needed) via
POST /run/{run_id}/cancel
cmd/main.go: CLI entrypoint and flagsclient.go: HTTP/SSE client for gateway APIstui.go: Bubble Tea TUI implementationmodels.go: request/response modelsevent_content.go: event content parsing helpers
- This repository is focused on a terminal-first AI agent experience.
- The UX is designed for iterative, stream-driven agent workflows.
- If your gateway requires authentication, pass
-token.