Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@
"format": "biome format --write src tests"
},
"dependencies": {
"@tangle-network/agent-eval": "^0.91.0",
"@tangle-network/agent-runtime": "^0.50.0",
"@tangle-network/agent-eval": "^0.95.1",
"@tangle-network/agent-runtime": "^0.70.0",
"zod": "^4.3.6"
},
"devDependencies": {
"@biomejs/biome": "^2.4.15",
"@neo4j-labs/agent-memory": "0.4.0",
"@tangle-network/sandbox": "^0.4.0",
"@tangle-network/sandbox": "^0.8.0",
"@types/node": "^25.6.0",
"tsup": "^8.0.0",
"typescript": "^5.7.0",
Expand Down
73 changes: 46 additions & 27 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 17 additions & 9 deletions src/profiles/researcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@
import {
type AgentProfile,
type AgentRunSpec,
createDriver,
type DefaultVerdict,
type Driver,
type DriverDecision,
type Iteration,
type OutputAdapter,
type SandboxEvent,
type Validator,
Expand All @@ -38,6 +37,14 @@ import {
/** @experimental */
export type ResearchSource = 'web' | 'corpus' | 'twitter' | 'github' | 'docs'

/**
* Driver decision for the single-fanout-then-stop topology. `'done'` is a
* kernel-terminal decision, so the loop ends after the one fanout round.
*
* @experimental
*/
export type FanoutDecision = 'continue' | 'done'

/** @experimental */
export interface ResearchTask {
/** The research question to answer. */
Expand Down Expand Up @@ -186,7 +193,7 @@ export function multiHarnessResearcherFanout(options: MultiHarnessResearcherFano
agentRuns: AgentRunSpec<ResearchTask>[]
output: OutputAdapter<ResearchOutput>
validator: Validator<ResearchOutput>
driver: Driver<ResearchTask, ResearchOutput, DriverDecision>
driver: Driver<ResearchTask, ResearchOutput, FanoutDecision>
} {
const harnesses =
options.harnesses && options.harnesses.length > 0
Expand All @@ -204,12 +211,13 @@ export function multiHarnessResearcherFanout(options: MultiHarnessResearcherFano
// Single fanout round across the N harnesses, then stop: the kernel
// round-robins `agentRuns` over the N branches and selects the winner
// (best valid score) across all iterations via `defaultSelectWinner`.
const driver = createDriver<ResearchTask, ResearchOutput>({
planner: ({ task, history }) =>
history.length === 0
? { kind: 'fanout', tasks: Array.from({ length: harnesses.length }, () => task) }
: { kind: 'stop' },
})
const driver: Driver<ResearchTask, ResearchOutput, FanoutDecision> = {
name: 'dynamic',
plan: async (task, history) =>
history.length === 0 ? Array.from({ length: harnesses.length }, () => task) : [],
decide: (history: ReadonlyArray<Iteration<ResearchTask, ResearchOutput>>) =>
history.length === 0 ? 'continue' : 'done',
}
return { agentRuns, output, validator, driver }
}

Expand Down
Loading