> For the complete documentation index, see [llms.txt](/llms.txt).
> A full single-fetch corpus is available at [llms-full.txt](/llms-full.txt).
---
title: Hacker News digest quickstart
description: Create a Hacker News digest workflow, run it in an AGNT5 Cloud dev environment, and inspect the execution trace.
last_verified: 2026-06-07
category: Getting Started
---



In this quickstart, you create a **[workflow](/docs/build/workflows.md)**: 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](/docs/run/overview.md)** 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](/docs/install-cli.md)** (`agnt5`), Python 3.12+ or Node.js 22+ with npm, an [Anthropic API key](https://console.anthropic.com/settings/keys) or [OpenAI API key](https://platform.openai.com/api-keys), and about 3 minutes.



> **Build with your AI coding agent**
> Give Codex, Claude Code, Cursor, Windsurf, Cline, or Copilot a copyable prompt for this quickstart. If you want durable project instructions first, install AGNT5 skills.
> Installs the CLI, scaffolds the project, configures ANTHROPIC_API_KEY or OPENAI_API_KEY, starts agnt5 dev, and walks you through the first run.
> [Install AGNT5 skills](/docs/build-with-ai)
> Running the manual commands yourself? Skip this prompt. The same steps are below.


**Python:**

    

```text
Help me run the AGNT5 Hacker News digest quickstart.

1. Install the AGNT5 CLI if it is not present:
     curl -LsSf https://agnt5.com/cli.sh | bash
   Open a new shell, or source the rc file, so 'agnt5' resolves.

2. Authenticate:
     agnt5 auth login
   This opens a browser to sign in.

3. Scaffold the project:
     agnt5 create --template python/quickstart my-agnt5-quickstart
     cd my-agnt5-quickstart

4. Copy .env.example to .env. Ask me whether I want to use Anthropic or OpenAI.
   - If I choose Anthropic, ask for my Anthropic API key, uncomment ANTHROPIC_API_KEY in .env, fill it in, and change the summarizer model in src/agnt5_quickstart/functions.py to "anthropic/claude-3-5-haiku-20241022".
   - If I choose OpenAI, ask for my OpenAI API key, uncomment OPENAI_API_KEY in .env, and fill it in.
   Do not commit .env.

5. Start the dev server:
     agnt5 dev
   Wait for it to print a Studio URL and to register these components:
   digest, fetch_top_ids, fetch_story, summarize, assemble_digest.

6. Tell me to open the Studio URL, pick the 'digest' workflow, set the input to {"limit": 5}, and click Run.

7. When the run completes, describe the trace structure: one fetch_top_ids step, five parallel fetch_story steps, five parallel summarize steps, and one assemble_digest step. Point me at where the assembled digest text appears.

If the AGNT5 MCP server is available in your tool list, call list_runs after step 6 and get_trace on the latest run to verify completion and show me the trace tree.

Rules:
- Do not modify workflows.py or functions.py except for the Anthropic model switch if I choose Anthropic.
- Keep the default summarizer model as openai/gpt-5-mini when I choose OpenAI.
- The Hacker News API is public. No Hacker News token is needed.
```


  


  

**TypeScript:**

    

```text
Help me run the AGNT5 Hacker News digest quickstart.

1. Install the AGNT5 CLI if it is not present:
     curl -LsSf https://agnt5.com/cli.sh | bash
   Open a new shell, or source the rc file, so 'agnt5' resolves.

2. Authenticate:
     agnt5 auth login
   This opens a browser to sign in.

3. Scaffold the project:
     agnt5 create --template typescript/quickstart my-agnt5-quickstart
     cd my-agnt5-quickstart

4. Install dependencies:
     npm install

5. Copy .env.example to .env. Ask me whether I want to use Anthropic or OpenAI.
   - If I choose Anthropic, ask for my Anthropic API key, uncomment ANTHROPIC_API_KEY in .env, fill it in, change model to LM.anthropic(), and change modelName in src/functions.ts to "anthropic/claude-3-5-haiku-20241022".
   - If I choose OpenAI, ask for my OpenAI API key, uncomment OPENAI_API_KEY in .env, and fill it in.
   Do not commit .env.

6. Start the dev server:
     agnt5 dev
   Wait for it to print a Studio URL and to register these components:
   digest, fetchTopIds, fetchStory, summarize, assembleDigest.

7. Tell me to open the Studio URL, pick the 'digest' workflow, set the input to {"limit": 5}, and click Run.

8. When the run completes, describe the trace structure: one fetchTopIds step, five parallel fetchStory steps, five parallel summarize steps, and one assembleDigest step. Point me at where the assembled digest text appears.

If the AGNT5 MCP server is available in your tool list, call list_runs after step 7 and get_trace on the latest run to verify completion and show me the trace tree.

Rules:
- Do not modify workflows.ts or functions.ts except for the Anthropic model switch if I choose Anthropic.
- Keep the default summarizer model as openai/gpt-5-mini when I choose OpenAI.
- The Hacker News API is public. No Hacker News token is needed.
```


  





## 1. Install the CLI

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


  

**curl (macOS, Linux, WSL2):**

```bash
curl -LsSf https://agnt5.com/cli.sh | bash
```


  

**Homebrew (macOS only):**

```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.

```bash
agnt5 auth login
```

The command opens a browser window to sign you in. For install verification and API-key auth, see the [install guide](/docs/install-cli.md).

## 2. Create the workflow project

Create the quickstart project from the Hacker News digest template.



**Python:**

```bash
agnt5 create --template python/quickstart my-agnt5-quickstart
cd my-agnt5-quickstart
```





**TypeScript:**

```bash
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.

```bash
cp .env.example .env
```

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

```bash
# 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.



**Python:**

```python
summarizer = Agent(
    name="hn_summarizer",
    model="anthropic/claude-3-5-haiku-20241022",
    instructions=SUMMARIZER_PROMPT,
)
```





**TypeScript:**

```ts
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`.

```bash
agnt5 dev
```

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



**Python:**

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





**TypeScript:**

```text
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:



**Python:**

```text
digest (workflow)
├─ fetch_top_ids
├─ fetch_story (x5 parallel)
├─ summarize (x5 parallel)
└─ assemble_digest
```





**TypeScript:**

```text
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

<AccordionGroup>
  <Accordion title="agnt5 is not found after installation">
    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.
  </Accordion>
  <Accordion title="agnt5 dev cannot call the model provider">
    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.
  </Accordion>
  <Accordion title="The TypeScript worker cannot start">
    Run `npm install` from `my-agnt5-quickstart` and then restart `agnt5 dev`. The TypeScript template expects dependencies to be installed before the worker starts.
  </Accordion>
  <Accordion title="The Studio URL opens but no digest workflow appears">
    Check the `agnt5 dev` terminal for registration errors. The expected components are listed in step 4. Fix the error, then restart `agnt5 dev`.
  </Accordion>
</AccordionGroup>

## Next steps



Now that the workflow runs, move it toward production use.

- [Follow the learning path](/docs/learning-path): Move through the recommended order from first run to build, deploy, operate, and improve.
- [Deploy the workflow](/docs/run/deploying): Set secrets, create an environment, deploy the worker, and trigger a run outside `agnt5 dev`.
- [Evaluate the output](/docs/improve/overview): Turn runs into datasets, add scorers, and compare prompt or model changes.
- [Integrate with your app](/docs/integrations/event-sources/overview): Connect external events or webhooks so your application starts workflow runs.


