> 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-07-24
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.



**Go:**

There's no published Go version of this specific Hacker News digest template yet — `agnt5 create --template go/go-quickstart` scaffolds a minimal single-function-and-workflow starter instead (see [Local development](/docs/build/local-development.md)). The rest of this page walks through the Python/TypeScript digest template as written; it does not describe a runnable Go project. Use the Go tab only for a translation reference — the `.env.example` file, the `digest` workflow, and its trace shape in steps 3, 5, and 6 all assume the scaffolded digest template and won't exist until you build the digest workflow and functions yourself, following [Workflows](/docs/build/workflows.md) and [Functions](/docs/build/functions.md) with the parallel-fan-out pattern from [Running in parallel](/docs/build/workflows.md#running-in-parallel).





> **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 Dashboard URL and to register these components:
   digest, fetch_top_ids, fetch_story, summarize, assemble_digest.

6. Tell me to open the Dashboard 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 Dashboard URL and to register these components:
   digest, fetchTopIds, fetchStory, summarize, assembleDigest.

7. Tell me to open the Dashboard 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, Linux):**

```bash
brew install agnt5dev/agnt5/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
```





**Go:**

```bash
agnt5 create --template go/go-quickstart my-agnt5-quickstart
cd my-agnt5-quickstart
go mod tidy
```

This scaffolds a minimal starter (one function, one `Step`-backed workflow), not the Hacker News digest — add `fetch_top_ids`, `fetch_story`, `summarize`, and `assemble_digest` yourself following [Workflows](/docs/build/workflows.md).



`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. 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. The `go/go-quickstart` template ships no `.env.example` — export the provider key directly in your shell instead, since the Go model constructors read it via `os.Getenv` (see below), not through an auto-loaded `.env` file. 



**Python:**

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





**TypeScript:**

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





**Go:**

```bash
export ANTHROPIC_API_KEY="sk-ant-..."
# or: export OPENAI_API_KEY="sk-..."
```



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,
});
```





**Go:**

```go
summarizer, err := agnt5.NewAgent("hn_summarizer",
    agnt5.WithAgentModel(agnt5.NewAnthropicModel(agnt5.AnthropicConfig{APIKey: os.Getenv("ANTHROPIC_API_KEY"), Model: "claude-3-5-haiku-20241022"})),
    agnt5.WithAgentInstructions(summarizerPrompt),
)
```



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 Dashboard URL.



**Python:**

```text
╭───────────────────────────╮
│ agnt5 dev                 │
│ <deployment-id> · managed │
│ ~/my-agnt5-quickstart     │
╰───────────────────────────╯
  worker       uv run python app.py (pid <pid>)
  coordinator  http://grpc.agnt5.com:3418
  watch        3 dirs · .py .ts .js .go .env

  Auto-discovered components: 4 functions, 0 entities, 1 workflows, 1 agents, 0 tools, 0 scorers
  Worker created. Connecting to AGNT5 runtime...

  quickstart v0.1.0
  ────────────────────────────────────────
  ◆ workflows (1)
    └── digest
  ƒ functions (4)
    ├── assemble_digest
    ├── fetch_story
    ├── fetch_top_ids
    └── summarize
  ● agents (1)
    └── hn_summarizer
  ────────────────────────────────────────
  Dashboard: https://app.agnt5.com/projects/<project-id>/components
```





**TypeScript:**

```text
╭───────────────────────────╮
│ agnt5 dev                 │
│ <deployment-id> · managed │
│ ~/my-agnt5-quickstart     │
╰───────────────────────────╯
  worker       npx tsx app.ts (pid <pid>)
  coordinator  http://grpc.agnt5.com:3418
  watch        2 dirs · .py .ts .js .go .env

🚀 AGNT5 Worker Starting
   Service: quickstart
   Worker ID: <worker-id>
   Coordinator: http://grpc.agnt5.com:3418
   Tenant: <tenant-id>
   Deployment: <deployment-id>
   Runtime: node

📦 Registered components: 4 function(s), 1 workflow(s)
Dashboard: https://app.agnt5.com/projects/<project-id>/components
```





**Go:**

The `go/go-quickstart` template starts `go run .` and registers its own minimal components (`greet` and `greet_workflow`) rather than the digest pipeline. Expect different component names in the Dashboard until you add the digest functions and workflow.



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

## 5. Run the digest workflow

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

1. Pick the `digest` workflow. 1. Pick the `digest` workflow. 1. Pick the `greet_workflow` workflow the scaffolded template registers (not `digest` — you haven't built that yet). 
2. Set the input to `{"limit": 5}` `{"limit": 5}` `{"name": "Ada"}`, matching `greet_workflow`'s input shape .
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
```





**Go:**

Once you've built the digest workflow following [Workflows](/docs/build/workflows.md), a Go run shows the same shape — one `agnt5.Step` per stage, with the two fan-out stages wrapped in a single `Step` each (see [Running in parallel](/docs/build/workflows.md#running-in-parallel)):

```text
digest (workflow)
├─ fetch_top_ids
├─ fetch_stories (parallel fan-out inside one Step)
├─ summarize (parallel fan-out inside one Step)
└─ assemble_digest
```



Open the final `assemble_digest` step to see the generated digest text. Open the final `assembleDigest` step to see the generated digest text. Open `greet_workflow`'s single step to see its output — there's no `assemble_digest` step until you build the digest workflow.  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 Dashboard 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.


