Skip to content
Docs
Get started Hacker News digest quickstart

Hacker News digest quickstart

Create a Hacker News digest workflow, run it in an AGNT5 Cloud dev environment, and inspect the execution trace.

In this quickstart, you create a workflow: a durable program that AGNT5 runs with checkpointed steps. The workflow summarizes the top Hacker News stories, runs in an AGNT5 Cloud dev environment, and records a trace that shows each step, model call, and result. The Hacker News API is public, so you only need an Anthropic or OpenAI API key for the summarizer.

You’ll need: the CLI (agnt5), Python 3.12+ or Node.js 22+ with npm, an Anthropic API key or OpenAI API key, and about 3 minutes.

1. Install the CLI

Install agnt5, then authenticate the CLI against your AGNT5 account.

curl -LsSf https://agnt5.com/cli.sh | bash
brew install agnt5/tap/agnt5

The installer writes agnt5 to ~/.agnt5/bin and adds it to your PATH. Open a new terminal, or source your shell’s rc file, so agnt5 resolves.

agnt5 auth login

The command opens a browser window to sign you in. For install verification and API-key auth, see the install guide.

2. Create the workflow project

Create the quickstart project from the Hacker News digest template.

agnt5 create --template python/quickstart my-agnt5-quickstart
cd my-agnt5-quickstart
agnt5 create --template typescript/quickstart my-agnt5-quickstart
cd my-agnt5-quickstart
npm install

agnt5 create downloads the template, registers the project with the Control Plane, and writes the scaffolded files into my-agnt5-quickstart/.

3. Configure a model API key

Create a local .env file from the template example, then uncomment and fill in one provider key. The template uses OpenAI by default. For Anthropic, set ANTHROPIC_API_KEY and switch the summarizer model before starting the dev server.

cp .env.example .env

.env.example starts with both provider keys commented out:

# ANTHROPIC_API_KEY="sk-ant-..."
# OPENAI_API_KEY="sk-..."

In .env, remove # from exactly one key and fill in the value.

If you use Anthropic, change the summarizer model.

summarizer = Agent(
    name="hn_summarizer",
    model="anthropic/claude-3-5-haiku-20241022",
    instructions=SUMMARIZER_PROMPT,
)
const agent = new Agent({
  name: 'hn_summarizer',
  model: LM.anthropic(),
  modelName: 'anthropic/claude-3-5-haiku-20241022',
  instructions: SUMMARIZER_PROMPT,
});

Do not commit .env. The Hacker News API does not need a token; this key is only for the summarize step.

4. Start the dev server

Start the worker with agnt5 dev.

agnt5 dev

The dev server registers your components with the runtime and prints a Studio URL.

Registered components: digest, fetch_top_ids, fetch_story, summarize, assemble_digest
Worker connected
Studio: https://app.agnt5.com/anon/<session-id>
Watching project files
Registered components: digest, fetchTopIds, fetchStory, summarize, assembleDigest
Worker connected
Studio: https://app.agnt5.com/anon/<session-id>
Watching project files

Leave agnt5 dev running. It owns the local worker session that Studio calls.

5. Run the digest workflow

Open the Studio URL from the terminal in your browser. A run is one execution of a workflow, function, or agent.

  1. Pick the digest workflow.
  2. Set the input to {"limit": 5}.
  3. Click Run.

The trace renders live as each step lands. Click a step to inspect its input, output, logs, prompt, response, and cost.

6. View the trace

The first run should show this shape:

digest (workflow)
├─ fetch_top_ids
├─ fetch_story (x5 parallel)
├─ summarize (x5 parallel)
└─ assemble_digest
digest (workflow)
├─ fetchTopIds
├─ fetchStory (x5 parallel)
├─ summarize (x5 parallel)
└─ assembleDigest

Open the final assemble_digest or assembleDigest step to see the generated digest text. Each step is checkpointed, so a worker restart skips completed steps and continues from the missing work.

Troubleshoot

Open a new terminal and run agnt5 version. If it still fails, add ~/.agnt5/bin to your PATH manually and re-run the install command if the binary is missing.

Confirm .env exists in the project root and contains ANTHROPIC_API_KEY="sk-ant-..." or OPENAI_API_KEY="sk-...". If you set an Anthropic key, confirm the summarizer model uses anthropic/claude-3-5-haiku-20241022. Restart agnt5 dev after changing .env or the model.

Run npm install from my-agnt5-quickstart and then restart agnt5 dev. The TypeScript template expects dependencies to be installed before the worker starts.

Check the agnt5 dev terminal for registration errors. The expected components are listed in step 4. Fix the error, then restart agnt5 dev.

Next steps

© 2026 AGNT5