"Specialist" here is a specialized prompt given to an agent to make it more useful at specific tasks. For example, you might have a "software engineer", a "code reviewer", and a "secretary", each with a different prompt and set of tools by default. Claude calls these "agents" but that's a bad term because it is overloaded, so we call them "specialists".

Phase 1: Hand-written, "Phase 3" Spider

Hand-write prompts for a single "specialist". This is really not a specialist since it is a generalist. This agent accesses Hyperware process APIs by:

  1. list-apis/search-apis tool provided by the MCP Server part of Spider,
  2. get-api tool ditto, which provides the specific methods for a Hyperware process,
  3. call-api tool ditto, which makes use of one of the methods defined in get-api to form a Request to the Hyperware process that provides that method.

Develop a set of evaluation examples. Use these to tune the hand-written prompts by "LLM-directed evolution".

Phase 2: Specialists

There are some obvious common usecases, as mentioned above (coder, general secretary, shopper, researcher, etc). Phase 2 involves attempting to improve Spider's effectiveness by hand-writing some specialist prompts for the most common of these usecases (and including a "make your own specialist" part of the UI). Specialists include both a custom prompt and a preloaded set of APIs. For example, shopper would have preloaded common wallet API commands. Tune these as above using "LLM-directed evolution".

When a prompt comes in, before acting on it, Spider asks an LLM:

Which of the following "specialists" is most suited to the given task?
Reply only with the name of the specialist.
If none, say "generalist".

Use the chosen specialist to carry out the task.

Note that there is nothing stopping a given specialist from doing the flow described in Phase 1, namely getting any API off of Hyperware. Specialists simply start with a pre-loaded set of APIs at their disposal that are tuned to the tasks they are expected to accomplish, reducing the number of tool calls required to carry out their tasks and reducing unnecessary context.

Phase 3: Automatic generation of specialists

The most hand-wavy of the phases. Use the user's conversation history as evaluations for automatic creation of new specialists. For example, say the user is an electronic music composer. Their conversation history will reflect this. Further, their conversation history will include explicit or implicit queues as to whether or not it was satisfactory.

For example, we can expose a +1/-1 rating system to get explicit feedback about good vs bad performance in conversations. More ambitiously, we can analyze conversation history to determine the "goodness" of the conversation, classify it as novel/not well covered by existing specialists, and cluster it with other similar conversations. From a set of such conversations we can form a new specialist by looking at the commonly used APIs in those conversations, and then running "LLM-directed evolution" to optimize the specialists prompt.

Original gist on GitHub