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
pip install dreadnode

Dreadnode uses provider environment variables (for example, Anthropic) or explicit configuration. Export the key in your shell:

Terminal window
export ANTHROPIC_API_KEY="sk-ant-..."

Then configure the SDK with your Dreadnode project in your script using dn.configure(...).

Create a file called quickstart.py:

import asyncio
import dreadnode as dn
dn.configure(api_key="dn_...", project="my-project")
@dn.tool()
async def summarize(text: str) -> str:
"""Summarize a block of text."""
return text
async def main() -> None:
agent = dn.Agent(
name="quickstart-agent",
model="anthropic/claude-sonnet-4-20250514",
instructions="You are a helpful assistant.",
tools=[summarize],
)
trajectory = await agent.run(
"Say hello and summarize what Dreadnode does in one sentence."
)
last_message = trajectory.messages[-1] if trajectory.messages else None
if last_message:
print(last_message.content)
if __name__ == "__main__":
asyncio.run(main())
Terminal window
python quickstart.py

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