#+TITLE: SKILL: Web Dashboard Agent (Telemetry Interface) #+ID: skill-web-interface-agent #+STARTUP: content * Overview The **Web Dashboard Agent** provides a lightweight, browser-based window into the Neurosymbolic Kernel's internal state. It exposes the active skill graph, execution telemetry, and recent system logs, enabling real-time monitoring and transparency of the agent's cognitive processes. * The Interface Mandate 1. **Transparency:** Provide a human-readable overview of skill performance (executions, time, failures). 2. **Accessibility:** Serve a minimalist HTML dashboard over a configurable local port. 3. **Observability:** Expose the tail of the system logs for rapid debugging and "pain" analysis. 4. **Low Overhead:** Operate as a background service with minimal impact on the kernel's primary cognitive loop. * Symbolic Implementation (The Logic) The implementation leverages the Hunchentoot web server to provide a simple, deterministic telemetry endpoint. ** Architectural Intent: Server Initialization Bootstraps the web server on a specified port, ensuring the dashboard is live from the moment the skill is loaded. #+begin_src lisp (defvar *web-server* nil) (defun start-dashboard (&optional (port 8080)) "Starts the Hunchentoot dashboard server." (unless *web-server* (setf *web-server* (make-instance 'hunchentoot:easy-acceptor :port port)) (hunchentoot:start *web-server*) (kernel-log "WEB - Dashboard live on port ~a" port))) #+end_src ** Architectural Intent: Telemetry Rendering This handler constructs the dashboard UI. It introspects the skill registry and gathers telemetry for each skill, formatting the results into a clean HTML table alongside the system's recent log history. #+begin_src lisp (hunchentoot:define-easy-handler (dashboard-home :uri "/") () (setf (hunchentoot:content-type*) "text/html") (let* ((skills (org-agent:context-list-all-skills)) (telemetry (mapcar (lambda (s) (let ((stats (org-agent:context-get-skill-telemetry (getf s :name)))) (format nil "
  • ~a (P:~a) [Execs: ~a, Time: ~ams, Fails: ~a]
  • " (getf s :name) (getf s :priority) (or (getf stats :executions) 0) (or (getf stats :total-time) 0) (or (getf stats :failures) 0)))) skills))) (format nil " org-agent Dashboard

    org-agent Neurosymbolic Kernel


    Active Skill Graph & Telemetry


    Recent Logs

    ~{~a~%~}
    " telemetry (org-agent:context-get-system-logs 20)))) #+end_src * Registration ** Architectural Intent: Background Bootstrap Ensures the server starts automatically using environment-defined ports or sane defaults. #+begin_src lisp ;; Start the dashboard upon skill load (let* ((env-port (uiop:getenv "ORG_AGENT_WEB_PORT")) (port (if env-port (parse-integer env-port :junk-allowed t) 8080))) (start-dashboard port)) (defskill :skill-web-interface :priority 10 ; Low priority, background service :trigger (lambda (context) nil) :neuro (lambda (context) nil) :symbolic (lambda (action context) action)) #+end_src