o1 Daily Brew is a daily reflection from o1 published to a Slack channel of your choice.
-
Clone the repo.
-
Create a Slack app and add your webhook URL to your environment variable
SLACK_WEBHOOK
(see below). -
Create a LangGraph Platform deployment.
Any paid LangSmith plan has access to LangGraph Platform and deployments.
- Create a cron job to run the deployment at your desired time.
from langgraph_sdk import get_client
# URL from our LangGraph Cloud deployment
url = "deployment_url"
client = get_client(url=url)
# An assistant ID is automatically created for each deployment
await client.assistants.search(metadata={"created_by": "system"})
# Use the SDK to schedule a cron job to run at 11:00 AM PST (19:00 UTC) every day
cron_job_stateless = await client.crons.create(
your_assistant_id,
schedule="0 19 * * *",
input={"user_provided_topics": "AI"}
)
Create a Slack app to publish to Slack.
- Go to https://api.slack.com/apps
- Click "Create New App"
- Choose "From scratch"
- Name your app (e.g., "o1 Daily Brew") and select your workspace
- Once created, go to "Incoming Webhooks" in the left sidebar
- Toggle "Activate Incoming Webhooks" to On
- Click "Add New Webhook to Workspace"
- Choose the channel where you want the messages to appear
- Copy the "Webhook URL" that's generated
Add add webhook URL credentials to your environment variable SLACK_WEBHOOK
.