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.
- 📰 Web Research: Searches the web for relevant information with Exa.
- 📝 Writing: Writes an engaging article.
- 📝 Editing: Refines the article to New York Times standards.
Let's get started with the project:
-
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!
-
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
-
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" -
Install dependencies:
pnpm install # OR npm install -
Run the journalist-agent:
pnpm dlx tsx index.ts # OR npx tsx index.ts
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