mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #536] [Feature]: Add agent tool calls for chat-wide variables #246
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#246
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cha1latte on GitHub (May 7, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/536
Originally assigned to: @SpicyMarinara on GitHub.
What problem does this solve?
Agents do not currently have a built-in way to read and write arbitrary chat-wide state through tool calls.
The recently added read and append chat summary tool calls provide a related pattern, but they only write to the summary and do not support replacing arbitrary named values. The reporter currently sees the only workaround as creating a separate server with state logic and connecting it through a custom webhook tool call, unless script-type tools can persist data in a way they are unaware of.
This limits custom agents that need to keep internal chat-wide state, coordinate with other agents, or leave messages for each other using predefined keys.
Proposed solution
Add two new tool calls that allow agents to manage custom chat-wide variables:
The write behavior should probably replace the existing value by default. An append option would make the system more flexible, either as a user-configurable option or as a choice available to the agent when calling the write tool.
The primary desired behavior is a chat-wide
String -> Stringmap where:A UI that lets the user inspect and manually edit the current variables and values would also be helpful, but is not required for the first version.
Alternatives considered
Additional context
Discord report: https://discord.com/channels/1417099416812392641/1502059754627797152
Reported by s'nt.
The main goal is to allow agents to read and write private chat-wide variables at will through tool calls.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@cha1latte commented on GitHub (May 7, 2026):
Triage note: labeling this as
scope-riskbecause the request is well aligned with agent tool workflows, but it introduces persistent chat-wide state and overlaps with existing tracker/summary concepts that need a clear boundary before implementation.Define the smallest shippable version as read/replace string variables for one chat scope before adding append behavior or a manual variable editor.
@SpicyMarinara commented on GitHub (May 10, 2026):
Will add tools, skip the UI parts for now.
@SpicyMarinara commented on GitHub (May 10, 2026):
Implemented in the local v1.5.9 issue sweep.
read_chat_variableandwrite_chat_variablebuilt-in agent tools.agentVariables.CHANGELOG.md.Validation:
pnpm --filter @marinara-engine/server exec tsx --import ./test/setup-env.ts --test test/tool-executor-agent-variables.test.tspnpm --filter @marinara-engine/server lint.