Documentation
¶
Overview ¶
Package web serves Oni3 agents to a browser over a small HTTP API.
The API mirrors the MCP tools (agents, models) and streams a single agent turn as Server-Sent Events. Conversations are stored with the same session files the TUI and ACP use, so a chat started in the browser can be resumed from the CLI and vice versa.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentInfo ¶
type AgentInfo struct {
Name string `json:"name"`
Description string `json:"description"`
DefaultModel string `json:"default_model"`
}
AgentInfo describes one selectable agent.
type ModelList ¶
type ModelList struct {
DefaultModel string `json:"default_model"`
Models []string `json:"models"`
}
ModelList reports model aliases only, matching list_models over MCP.
type Options ¶
type Options struct {
// DefaultAgent is pre-selected in the interface. An empty value picks the
// first agent by name.
DefaultAgent string
// WorkDir is shown in the interface and is the directory tools resolve
// relative paths against (the process working directory).
WorkDir string
// Version is reported by /api/bootstrap.
Version string
// Token enables bearer-token authentication when non-empty.
Token string
// DisableWeb hides the browser interface, web API and login/docs pages.
// Protocol endpoints and /api/health remain available.
DisableWeb bool
// EnableAGUI mounts the AG-UI SSE endpoint.
EnableAGUI bool
// EnableA2A mounts the A2A JSON-RPC and agent-card endpoints.
EnableA2A bool
// EnableMCPServer makes Oni3 itself an MCP server over Streamable HTTP and
// legacy SSE. It does not manage external MCP servers.
EnableMCPServer bool
}
Options configures a web server.
Click to show internal directories.
Click to hide internal directories.