You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feature: Web interface for Cortex, in addition to the agentop TUI #1926
agentop is the only interface to Cortex. It runs only in a terminal. Some users cannot use it, or do not want to:
A user who does not work in a terminal, for example a Bob IDE user.
A user who wants to share a view, a link, or a screenshot with a teammate.
A view that needs more space than a terminal gives, for example a long Timeline or a cost chart.
Proposal
Add a web interface that reads the same session API that agentop reads (:47601 on a laptop, :9094 in a pod). The web interface supplements agentop. It does not replace it.
A first version can be read-only, with these views:
Sessions: the list, with the columns that the agentop Sessions pane shows.
A session's events and details, with live updates from GET /v1/events.
Timeline (GET /v1/sessions/{id}/timeline).
Usage and cost (GET /v1/usage).
Pipeline and plugin catalog (GET /v1/pipeline, GET /v1/plugins).
Constraints
The session API has no authentication. Its payloads hold raw prompts, completions and tool results. See docs/session-api.md.
The laptop session API refuses browsers.httpx.LoopbackOnly (core/listener/httpx/loopback.go) answers 403 to a non-loopback Host and to every request that carries an Origin header. This stops a page that does DNS rebinding from reading sessions. A web interface must keep that protection.
Bind only to loopback on a laptop. Never put the interface behind an ingress.
Open questions
Where does the interface run: in the cortex binary, in agentop (for example agentop web), or as a separate binary?
How does the browser get access to the data without opening the session API to every page? Options: serve the UI and a same-origin read proxy from one process, a per-launch token in the URL, or both.
Do write actions (erase a session, switch a server) go into the first version, or only reads?
Which frontend stack, and how do we ship it inside the binary (embed)?
Activity