Skip to content

Quickstart

Build your first agent in 10 minutes. This walkthrough installs the SDK, sets up a provider key, and runs a tiny agent locally.

Terminal window
npm install @dreadnode/agents @ai-sdk/anthropic

Start the CLI and store a provider key (for example, Anthropic):

Terminal window
dreadnode
Terminal window
/keys set anthropic sk-ant-...

Create a file called quickstart.ts:

import { anthropic } from '@ai-sdk/anthropic';
import { createAgent, createGenerator } from '@dreadnode/agents';
const generator = createGenerator(anthropic('claude-sonnet-4-20250514'));
const agent = createAgent({
name: 'quickstart-agent',
generator,
systemPrompt: 'You are a helpful assistant.',
});
async function main(): Promise<void> {
const result = await agent.run({
input: 'Say hello and summarize what Dreadnode does in one sentence.',
});
const lastMessage = result.trajectory.lastMessage;
if (lastMessage) {
console.log(lastMessage.text);
}
}
main().catch((error) => {
console.error(error);
process.exit(1);
});
Terminal window
npx tsx quickstart.ts

You should see a short response printed to the terminal.

  • Explore the CLI reference: /cli
  • Dive into the SDK reference: /sdk
  • Learn core concepts: /concepts