Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.agno.com/llms.txt

Use this file to discover all available pages before exploring further.

Read files from a scoped local directory. The provider exposes one tool: query_fs for searching and reading files.
from agno.agent import Agent
from agno.context.fs import FilesystemContextProvider

fs = FilesystemContextProvider(root="./docs")

agent = Agent(
    model=...,
    tools=fs.get_tools(),
)

agent.print_response("What topics are covered in the documentation?")
The agent calls query_fs("documentation topics"). A sub-agent handles file listing, searching, and reading.

Configuration

ParameterTypeDefaultDescription
rootstr | PathrequiredDirectory to scope the provider to.
idstr"fs"Tool becomes query_<id>.
exclude_patternslist[str]NoneGlob patterns to exclude (e.g., ["*.pyc", "__pycache__"]).
modelModelNoneModel for the sub-agent.
modeContextModedefaultdefault or agent expose query_fs. tools exposes raw FileTools.

Tools Exposed

ToolDescription
query_fsSearch files, read content, list directory structure. Read-only.
FilesystemContextProvider is read-only. There is no update_fs tool.

Example queries

QueryWhat happens
”What files are in this project?”Lists directory structure
”Find all Python files that import requests”Searches file content
”Read the README”Returns file content

Resources

FileTools Reference

Underlying toolkit methods

Cookbook Example

Working example