Needs work
Project:
AI Integration - ECA
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
15 Apr 2026 at 15:51 UTC
Updated:
3 May 2026 at 10:56 UTC
Jump to comment: Most recent
When using the Chat action, I can't seem to figure out what the "Token input" configuration field actually does.
I assumed that any tokens I added to this field would be replaced and added to the prompt, but this does not seem to be the case.
When I need to use a token value in the prompt, I have to add it the usual way - directly in the prompt (with square brackets.)
Looking at the code, it looks like the "Token input" token value is replaced and stored as configuration, but never used (https://git.drupalcode.org/project/ai_integration_eca/-/blob/1.0.x/src/P...)
What am I missing?
thanks,
-mike
Comments
Comment #2
ultimikeIt appears that I have the same question for the "Schema" configuration field for this action as well - it doesn't appear to have any affect on the output...
-mike
Comment #3
jurgenhaasThis implementation is not ideal and will hopefully be cleaned up soon before we publish the first stable release.
The
Token inputfield optionally takes the name of 1 token, which will be used to replace that token in the prompt. So, if you have a prompt like "Use the model [model] to calculate 1+1." and you usemodelas token input, then the value of that token will be available to replace{model]in the prompt. However, if no token input is provided, all tokens will be available for replacement in the prompt.In other words, the token input field seems to be unnecessary and should be removed.
Comment #4
ultimike@jurgen - understood about the "Token input" field.
Maybe you missed my followup question (comment 2 above) - how about the "Schema" field? Can you give me an example of what this should look like?
thanks,
-mike
Comment #5
jurgenhaas@ultimike when I worked on #3 I did remember that I saw that additional question but couldn't find it. Most likely, I had the issue open in the browser and forgot to reload.
So, here comes the answer to that question: without defining a schema, there is only very little control over the data type and structure that the action receives back from the agent. With some instructions in the prompt, one may be lucky, but it's never a contract.
By providing a schema, the chat will instruct the agent to only ever return the results as a JSON-encoded string following the schema. An example schema may look like this:
Writing such a schema by hand when configuring the ECA model is a big ask on the user. I think we should find way to make that easier to achieve. As this is something that comes from the AI module, that solution should probably be discussed in that context. On the other hand, if AI usage inside ECA becomes more popular, we may want to get started on this purely in the modeler. I'd be open for that.