New Tool Radar

AI Agents & Automation

How to Build a Custom Tool with AnythingLLM Agent Flows

Create an agent flow in AnythingLLM that scrapes HackerNews and filters the posts by topic, then call it from an agent chat with @agent.

Schematic diagram with three steps: create a flow from the agent skills page, add a Web Scraper block and an LLM Instruction block, then call the flow from an agent chat with @agent.

AnythingLLM’s built-in agent skills do one job each: search the web, open a page, search your documents. An Agent Flow chains those jobs together into a custom tool of your own, without writing code. Agent Flows are a no-code way to build agentic skills, using a visual interface to build flows that can be used in your agents. This guide builds one flow — scrape HackerNews, filter the posts by a topic you choose, and return the matching articles as clickable links — and then calls it from an agent chat. It is about building a flow, not about using the built-in agent on its own.

Create a flow from the agent skills page

To create a new flow, navigate to your workspace’s agent skills page and click the “Create Flow” button. This opens the flow builder with a blank canvas. Every new flow starts with three essential blocks: the Flow Information block, which defines the flow’s name and description; the Flow Variables block, which sets up any variables needed in the flow; and the Flow Complete block, which marks the end of the flow.

Call the flow “HackerNews Filter” and describe it in plain words, for example: “Filter HackerNews posts by a topic I choose and return matching articles as clickable links.” The name and description matter because they tell the model when to call the flow. In the Flow Variables block, create the variables the docs’ HackerNews tutorial uses: hackerNewsURLPath, topicOfInterest, and pageContentFromSite.

Add a Web Scraper block and an LLM Instruction block

To add functionality to your flow, click the “Add Block” button between any existing blocks to see the available options. The docs’ HackerNews tutorial builds the flow in this order: scrape content from HackerNews, from either the front page or newest posts; use an LLM to filter and extract articles matching your topic of interest; and return the relevant articles as clickable links.

Add a Web Scraper block below the Flow Variables block, set to fetch the HackerNews page, and then add an LLM Instruction block below it, with an instruction to keep only the articles about the topic in topicOfInterest and return them as clickable links. The flow ends at the Flow Complete block, which marks the end of your flow. Click “Save” in the top right to save changes: all new flows are automatically saved as “Enabled”, and you can reach existing flows from the agent skills page, where the gear icon on a flow lets you edit or delete it.

Call the flow from an agent chat

Agent flows work exactly the same as agent skills, the only difference is the way you build them. You can use agent flows in the same way you use agent skills via the @agent directive, or by asking a relevant question while in an agentic chat. In a workspace chat, start an agent chat and ask for HackerNews articles about a topic you choose, for example:

@agent Find HackerNews articles about local AI and give me the matching ones as links.

The agent decides the flow fits the request, runs it, and returns the matching articles as clickable links. The docs’ tutorial advises disabling other agent skills first to ensure this flow is used. Depending on the power of your LLM, you can even expect the LLM to chain multiple flows together to complete a task, or call a series of flows in a row.

Try it: four checks from blank canvas to flow reply

Check What you should see If you do not see it
Flow created “HackerNews Filter” listed on the agent skills page, saved as Enabled Check you clicked Create Flow on the workspace’s agent skills page
Blocks in place Flow Information, Flow Variables, Web Scraper, LLM Instruction, and Flow Complete blocks Click Add Block between blocks to add the missing one
Flow saved Save clicked, and the flow is still listed after leaving the builder New flows save as Enabled automatically — click the gear icon on the flow to edit it
Flow runs An agent chat reply with HackerNews articles about your topic as clickable links Disable other agent skills so the agent uses this flow, and check the variable names match

Expected result. We checked the AnythingLLM agent flows overview docs page, which gives the no-code visual way to build agentic skills, the built-in flow editor in the Docker and Desktop versions, the flows-versus-skills difference with flows as the no-code way and skills as the code way, flows working exactly like agent skills via the @agent directive or a relevant question in an agentic chat, and the LLM chaining multiple flows together; and the getting started docs page, which gives the workspace agent skills page with the Create Flow button, the blank canvas with the three default blocks Flow Information, Flow Variables, and Flow Complete, the Add Block button between blocks, new flows automatically saved as Enabled, the Save button in the top right, and the gear icon to edit or delete a flow; and the HackerNews flow tutorial docs page, which gives the scrape HackerNews, filter by topic with an LLM, and return matching articles as clickable links flow, the variables hackerNewsURLPath, topicOfInterest, and pageContentFromSite, the Web Scraper then LLM Instruction block order, and the advice to disable other agent skills to ensure the flow is used. We did not install AnythingLLM or build or run a flow on this machine.

Limits

This guide covers building one flow and calling it once. It is not about writing a custom agent skill in code — flows are the no-code way to build agentic skills, and skills are the code way for power users and developers, with the same end result. The Docker and Desktop versions both have a built-in agent flow editor, but in general the desktop version has more tools available to use in flows. How well a flow runs depends on the power of your LLM, including whether it picks the right flow and chains flows together. If the flow does not return what you expect, the tutorial’s troubleshooting is to check that the flow variables are correctly named, verify the Web Scraper URL is correct, and make sure the LLM instructions are clear and specific. We did not run any of this ourselves.

Sources

See all