- Go 1.25+
- Task
- Gloo AI client credentials
- Firecrawl API Key (sign up for a free account)
- PayloadCMS API Key from the payload web app
Create a .env file at the root of the repo with the following:
GLOO_CLIENT_ID=<client id>
GLOO_CLIENT_SECRET=<client secret>
# OR if using Anthropic use these instead
# ANTHROPIC_API_KEY=<anthropic api key>
# USE_ANTHROPIC_API=true
AGENT_API_PORT=3005
FIRECRAWL_API_KEY=<firecrawl key>
PAYLOAD_BASE_URL=http://localhost:3000
PAYLOAD_API_KEY=<generated api key>
# A secret to let the payload app talk to the agent
AGENT_API_KEY=123456
Run the API with:
task api
By default, it listens on port localhost:3005 according to the env var.
Converts a single page. Posts back to PayloadCMS with the updated page.
Request:
{
"url": "<web page url>",
"pageId": "<payloadcms page id>"
}
Response:
{
"task_status": "queued",
"task_id": "<task id>"
}
Converts a whole site. Creates pages in payloadcms and updates them.
NOTE: This can become expensive, consuming a large number of LLM tokens. Keep an eye on it while it runs.
Request:
{
"url": "<root website url>",
}
Response:
{
"task_status": "queued",
"task_id": "<task id>"
}
Reports the status of a task given by the id parameter.
Response:
{
"task_status": "queued" | "running" | "completed" | "failed"
}
Gets a Youtube transcript, reformats it as a document, and posts the content to PayloadCMS.
Request:
{
"url": "<youtube url>",
"postId": "<payloadcms post id>"
}
Response:
{
"task_status": "queued",
"task_id": "<task id>"
}
There's currently a bug in Gloo AI that prevents us from using their API, so you'll have to use Anthropic's for now.
This tool is just for testing and lives in cmd/agentbuild.