An admin API for AI web artifact creation and editing

As per this discussion, it seems like many admins would be ecstatic to have an interface or an admin API which allows them to manually create and edit artifacts.

Currently the only way to create/edit any artifacts is through the Web Artifact Creator persona, however this inherently has some limitations:

  • :money_bag: Costs: Making LLM calls for trivial changes such as changing some text or button placement, etc. gets quite expensive if one really wants to work out all of the kinks and progressively add new stuff to it, etc.
  • :warning: Risks: An admin could in principle (I think, as I haven’t tried it yet) write a function to SSH tunnel into the database (or use a GUI like pgAdmin 4), copy the relevant rows from the relevant tables, auto increments the artifact ID, alter the code for a different artifact or make changes, etc. etc. But this is obviously risky and potentially destructive (that’s why Data Explorer is read-only, after all). Not to mention that it is time-consuming.

What would this feature enable? A LOT. Here are just a few things I could think of which are relevant to my community:

  • :nerd_face: A “base quiz” artifact: We could have one base quiz artifact, then simply copy it and alter the JSON storage to create an entirely new quiz. This pathway has the potential to totally bypass H5P content for educational communities.
  • :wrench: A “copy/customize artifact” LLM tool: Since this hypothetical feature would be part of Discourse’s rich REST API, admins could make a tool which allows personas to copy a given artifact then personalize the JSON storage for a particular user or group.
  • :microscope: Personalized artifacts: Closely related to both of the previous points, instead of having to rely on an LLM to copy/paste an artifact without messing anything up, we could have just one artifact which actually works then use this API to copy it for a specific user or group, then personalize it to them however needed via the JSON storage. One use-case I have for this is making individual knowledge graphs for some of my users. It’d be nice to have a graph visualizer artifact which works well, then each user just builds their own knowledge graph which is stored as persistent JSON.
  • :computer_disk: Fetching JSON data: I suspect that such an API would also more easily enable retrieving the persistent JSON data associated with any given artifact. This could be massively beneficial for many reasons. For example, feeding it to an LLM for context (via a “read artifact data” tool), etc.
1 Like