This tool allows an LLM agent to query information about the Val Town platform using the llms.txt standard and navigate through links within the results.
- Fetches and parses information from Val Town's llms.txt standard
- Allows filtering information by specific queries
- Supports navigation through links specified within the results
- Provides formatted responses suitable for LLM consumption
val_town_info.ts
- Core functionality for fetching and parsing llms.txt contentval_town_tool.ts
- Wrapper function to be used as a tool by LLM agents
To get information about a specific topic:
import { valTownInfoTool } from "./val_town_tool.ts";
// Query information about APIs
const apiInfo = await valTownInfoTool("API");
console.log(apiInfo);
To navigate to a specific link found in previous results:
// Navigate to a specific documentation page
const pageInfo = await valTownInfoTool(undefined, "https://docs.val.town/some-specific-page");
console.log(pageInfo);
To get general information about the Val Town platform:
// Get general platform information
const generalInfo = await valTownInfoTool();
console.log(generalInfo);
When integrating this tool with an LLM agent, instruct the agent to:
- Use the tool to query general information about Val Town
- Refine searches with specific queries based on user questions
- Navigate through links to explore related documentation
- Refer to the llms.txt standard for any Val Town related functionality
The llms.txt standard is a structured format for providing information to LLMs. It organizes content into sections with clear headings and supports links for navigation. This tool parses the standard format to extract relevant information and present it in a way that's easy for LLMs to understand and use.
For more information about the standard, visit: https://docs.val.town/llms.txt