Skip to content

Latest commit

 

History

History
68 lines (48 loc) · 1.99 KB

File metadata and controls

68 lines (48 loc) · 1.99 KB

Journalist Agent

Journalist Agent is a Node.js tool using CHAI OpenAI and Exa to create high-quality articles. It automates research, writing, and editing, ensuring content meets New York Times standards.

Features

  • 📰 Web Research: Searches the web for relevant information with Exa.
  • 📝 Writing: Writes an engaging article.
  • 📝 Editing: Refines the article to New York Times standards.

Get started

Let's get started with the project:

  1. To get started with Langbase, you'll need to [create a free personal account on Langbase.com][signup] and verify your email address. Done? Cool, cool!

  2. Download and setup the project

    The following command:

    • Downloads the example project folder from here
    • Renames the folder to journalist-agent
    • Changes the directory to the project folder
    • Copies the .env.example file to .env in the project folder
    npx degit LangbaseInc/awesome-agents/journalist-agent journalist-agent &&
    cd journalist-agent &&
    cp .env.example .env
  3. Add the values of these environment variables to the .env file:

    # Get your org or user API key that can be used to access everything with Langbase.
    # https://langbase.com/docs/api-reference/api-keys
    LANGBASE_API_KEY="your-langbase-api-key"
    OPENAI_API_KEY="your-openai-api-key"
    
  4. Install dependencies:

    pnpm install
    
    # OR
    npm install
  5. Run the journalist-agent:

    pnpm dlx tsx index.ts
    
    # OR
    npx tsx index.ts

Project Structure

journalist-agent/
├── .env.example   # Environment variables example
├── .gitignore     # Git ignore
├── index.ts       # Journalist agent implementation
├── package.json   # Node.js package configuration and dependencies
└── readme.md      # Project documentation