Skip to content

Documentation / @agentick/core / run

Variable: run ​

const run: Procedure<RunHandler, true>

Defined in: core/src/agentick-instance.ts:948

One-shot execution of a JSX component.

This is Agentick.run - the simplest way to run an agent. Returns SessionExecutionHandle (AsyncIterable, not PromiseLike).

Example ​

typescript
import { run } from 'agentick';

// Get result
const result = await run(<MyAgent />, { messages, model }).result;

// Stream events
const handle = await run(<MyAgent />, { messages, model });
for await (const event of handle) {
  console.log(event);
}

Released under the ISC License.