Skip to content

Display Tripwire in Mastra Studio + UI integrations #10935

@daneatmastra

Description

@daneatmastra

This issue was created from Discord post 1446279095779459226:

Open in Discord

I'm trying to understand what messages are emitted when stopping the Agent’s process after submitting a request.
When I click the stop button, I get an error (see attachment).
Is this correct? but not an Abort signal something?

So,

What I want to achieve is to detect the abort signal so that I can handle it properly.
I also tested the TokenLimiterProcessor with the following configuration:
new TokenLimiterProcessor({
limit: Number(process.env?.TOKEN_LIMIT ?? '200000'),
strategy: 'abort',
countMode: 'cumulative',
})

When the token limit is reached, the response returns a message of type "tripwire":
data: {
"type": "tripwire",
"payload": {
"tripwireReason": "Token limit of 100 exceeded (current: 215)"
}
}


Screenshot 1

Metadata

Metadata

Assignees

Labels

discordFor issues created from Discord discussions.trio-tb

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions