From 01fd938fb02e801669ffa9469882490458004a38 Mon Sep 17 00:00:00 2001 From: Ramnique Singh <30795890+ramnique@users.noreply.github.com> Date: Tue, 6 Jan 2026 16:36:27 +0530 Subject: [PATCH] add test agent script --- apps/x/apps/main/src/test-agent.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 apps/x/apps/main/src/test-agent.ts diff --git a/apps/x/apps/main/src/test-agent.ts b/apps/x/apps/main/src/test-agent.ts new file mode 100644 index 00000000..836deea7 --- /dev/null +++ b/apps/x/apps/main/src/test-agent.ts @@ -0,0 +1,19 @@ +import * as runsCore from '@x/core/dist/runs/runs.js'; +import { bus } from '@x/core/dist/runs/bus.js'; + +async function main() { + const { id } = await runsCore.createRun({ + // this will expect an agent file to exist at ~/.rowboat/agents/test-agent.md + agentId: 'test-agent', + }); + console.log(`created run: ${id}`); + + await bus.subscribe(id, async (event) => { + console.log(`got event: ${JSON.stringify(event)}`); + }); + + const msgId = await runsCore.createMessage(id, 'whats your name?'); + console.log(`created message: ${msgId}`); +} + +main(); \ No newline at end of file