mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-13 17:22:37 +02:00
Show max calls per parent-child only for child internal agents
This commit is contained in:
parent
173dd9142f
commit
1b2a9e3dcb
2 changed files with 39 additions and 26 deletions
|
|
@ -1025,6 +1025,17 @@ export async function* streamResponse(
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only apply max calls limit to internal agents (task agents)
|
||||||
|
const targetAgentConfig = agentConfig[event.item.targetAgent.name];
|
||||||
|
if (targetAgentConfig?.outputVisibility === 'internal') {
|
||||||
|
const maxCalls = targetAgentConfig?.maxCallsPerParentAgent || 3;
|
||||||
|
const currentCalls = transferCounter.get(agentName, event.item.targetAgent.name);
|
||||||
|
if (currentCalls >= maxCalls) {
|
||||||
|
eventLogger.log(`skipping handoff to ${event.item.targetAgent.name} || reason: max calls ${maxCalls} exceeded from ${agentName} to internal agent ${event.item.targetAgent.name}`);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// inject give up control instructions if needed (parent handing off to child)
|
// inject give up control instructions if needed (parent handing off to child)
|
||||||
maybeInjectGiveUpControlInstructions(
|
maybeInjectGiveUpControlInstructions(
|
||||||
agents,
|
agents,
|
||||||
|
|
|
||||||
|
|
@ -576,6 +576,7 @@ export function AgentConfig({
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{agent.outputVisibility === "internal" && (
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
<label className={sectionHeaderStyles}>
|
<label className={sectionHeaderStyles}>
|
||||||
|
|
@ -605,6 +606,7 @@ export function AgentConfig({
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{USE_TRANSFER_CONTROL_OPTIONS && (
|
{USE_TRANSFER_CONTROL_OPTIONS && (
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue