Pull out 'handle' behavior into own service or module

Created on 7 October 2025, 4 days ago

Problem/Motivation

Right now we have a bandaid solution for managing what we are currently calling 'artifacts' but what might be more akin to a 'handle' in programming. Basically a reference(or token) that can be passed around by AI that refers to a resource(or in our case to temporary storage). This is similar to Drupal's token system, and we can definitely decide how much of that to try and reuse, but the primary difference is the need to handle the temporary storag aspect. So instead of [node:1], we may need [node:lHkls5], where node may be modified by multiple tools before writing back to permanent storage. The purpose of the hash is to separate where the same entity is loaded multiple times, but could be acted upon in separate tool chains (load node 1 -> set field value -> load node 1 again -> diff the two -> save changed version).

Additionally, the handle/token needs to communicate the appropriate metadata where AI can understand enough about what the source is that is associated with the reference. For example, a reference to [node:lHkls5], may need to be aware of new/existing, base fields(bundle, langcode, id, revision id), etc so that it's able to make subsequent tool calls and that we haven't hidden away all metadata of the referenced resource.

Proposed resolution

TBD.

Remaining tasks

  • Decide if we should use existing token API or create something new
  • Determine if this should be in Tool API or a new dependent module only where needed(MCP, AI, but not ECA)

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States michaellander

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024