Full-fidelity expert KB ingestion and MCP control plane #108

Open
opened 2026-09-21 19:56:42 +00:00 by nsaspy · 0 comments
Owner

Goal

Make llm-log the single logged LLM/control plane: every proxied request/response remains append-only raw evidence, richer bounded metadata is projected into Tek9 + SWI-Prolog experts, and downstream clients interact through a first-class MCP server rather than bypassing llm-log.

Required slices

  • project request, response, user-message, attribution/correlation, usage, and tool-activity metadata into the expert KB without duplicating raw bodies
  • preserve idempotent stable event identity and never invent missing usage/cost/outcome
  • expand versioned Prolog experts beyond the current minimal classifier with response/runtime assessment rules
  • expose a bounded expert catalog and exact-event context query
  • add MCP SDK v2 server with stdio + loopback Streamable HTTP
  • expose analytics and declared expert queries as typed MCP tools; no arbitrary Prolog goal or arbitrary proxy tool
  • optionally expose explicitly enabled write tools for outcome evidence
  • append an audit record for every MCP tool invocation and project those control events into the expert KB
  • package MCP v2 reproducibly in Nix and test with an in-process MCP client
  • document boundaries and promote verified invariants into roam + .prolog/kb

Safety/invariants

  • raw request/response bodies stay in append-only capture evidence, not duplicated wholesale into Tek9
  • secret headers remain redacted
  • missing provider counters remain unknown
  • MCP HTTP binds literal loopback by default and rejects non-loopback binding
  • expert/MCP operations stay finite and typed
## Goal Make llm-log the single logged LLM/control plane: every proxied request/response remains append-only raw evidence, richer bounded metadata is projected into Tek9 + SWI-Prolog experts, and downstream clients interact through a first-class MCP server rather than bypassing llm-log. ## Required slices - project request, response, user-message, attribution/correlation, usage, and tool-activity metadata into the expert KB without duplicating raw bodies - preserve idempotent stable event identity and never invent missing usage/cost/outcome - expand versioned Prolog experts beyond the current minimal classifier with response/runtime assessment rules - expose a bounded expert catalog and exact-event context query - add MCP SDK v2 server with stdio + loopback Streamable HTTP - expose analytics and declared expert queries as typed MCP tools; no arbitrary Prolog goal or arbitrary proxy tool - optionally expose explicitly enabled write tools for outcome evidence - append an audit record for every MCP tool invocation and project those control events into the expert KB - package MCP v2 reproducibly in Nix and test with an in-process MCP client - document boundaries and promote verified invariants into roam + .prolog/kb ## Safety/invariants - raw request/response bodies stay in append-only capture evidence, not duplicated wholesale into Tek9 - secret headers remain redacted - missing provider counters remain unknown - MCP HTTP binds literal loopback by default and rejects non-loopback binding - expert/MCP operations stay finite and typed
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/llm-log#108
No description provided.