Skip to content

Quick Start

Terminal window
pnpm install
pnpm build
pnpm test

import { createAgent } from '@agntk/core';
const agent = createAgent({
name: 'my-agent',
instructions: 'You are a helpful coding assistant.',
workspaceRoot: process.cwd(),
maxSteps: 25,
});
const result = await agent.stream({ prompt: 'Read package.json and list the dependencies' });
for await (const chunk of result.fullStream) {
if (chunk.type === 'text-delta') process.stdout.write(chunk.text ?? '');
}
const text = await result.text;
const result = await agent.stream({ prompt: 'Build a REST API' });
for await (const chunk of result.fullStream) {
switch (chunk.type) {
case 'text-delta': console.log(chunk.text); break;
case 'tool-call': console.log('Calling:', chunk.toolName); break;
case 'tool-result': console.log('Result:', chunk.result); break;
case 'step-finish': console.log('Step done'); break;
case 'finish': console.log('Complete'); break;
}
}
const text = await result.text;
  • SDK Core — Full agent configuration reference
  • CLI — Use agents from the command line
  • Configuration — Configuration system