Quickstart
Build your first agent in 10 minutes. This walkthrough installs the SDK, sets up a provider key, and runs a tiny agent locally.
Step 1: Install the SDK
Section titled “Step 1: Install the SDK”pip install dreadnodeStep 2: Set a provider API key
Section titled “Step 2: Set a provider API key”Dreadnode uses provider environment variables (for example, Anthropic) or explicit configuration. Export the key in your shell:
export ANTHROPIC_API_KEY="sk-ant-..."Then configure the SDK with your Dreadnode project in your script using dn.configure(...).
Step 3: Create your first agent
Section titled “Step 3: Create your first agent”Create a file called quickstart.py:
import asyncioimport 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())Step 4: Run it
Section titled “Step 4: Run it”python quickstart.pyStep 5: View the output
Section titled “Step 5: View the output”You should see a short response printed to the terminal.