// In workflow - no executor entity needed
const agentResults = yield* Effect.all(
agents.map((_, i) =>
Activity.make({
name: `RunVerificationAgent-${i}`,
execute: Effect.gen(function* () {
// Rate limit using DurableRateLimiter
yield* DurableRateLimiter.rateLimit({
name: "verification-agents",
algorithm: "token-bucket",
window: "1 minute",
limit: MAX_CONCURRENT_AGENTS,
key: "global",
tokens: 1,
});
// Run agent inline
return yield* runVerificationAgent({ agentIndex: i, ... });
})
})
),
{ concurrency: "unbounded" } // Rate limiter controls actual concurrency
);
// In workflow - no executor entity needed
const agentResults = yield* Effect.all(
agents.map((_, i) =>
Activity.make({
name: `RunVerificationAgent-${i}`,
execute: Effect.gen(function* () {
// Rate limit using DurableRateLimiter
yield* DurableRateLimiter.rateLimit({
name: "verification-agents",
algorithm: "token-bucket",
window: "1 minute",
limit: MAX_CONCURRENT_AGENTS,
key: "global",
tokens: 1,
});
// Run agent inline
return yield* runVerificationAgent({ agentIndex: i, ... });
})
})
),
{ concurrency: "unbounded" } // Rate limiter controls actual concurrency
);