Local
Local File System
LocalFileSystemTools enables agents to write files to the local file system with automatic directory management.
Was this page helpful?
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
LocalFileSystemTools enables agents to write files to the local file system with automatic directory management.
from agno.agent import Agent
from agno.tools.local_file_system import LocalFileSystemTools
agent = Agent(
instructions=[
"You are a file management assistant that helps save content to local files",
"Create files with appropriate names and extensions",
"Organize files in the specified directory structure",
"Provide clear feedback about file operations",
],
tools=[LocalFileSystemTools(target_directory="./output")],
)
agent.print_response("Save this meeting summary to a file: 'Discussed Q4 goals and budget allocation'", stream=True)
| Parameter | Type | Default | Description |
|---|---|---|---|
target_directory | Optional[str] | None | Default directory to write files to. Uses current directory. |
default_extension | str | "txt" | Default file extension to use if none specified. |
enable_write_file | bool | True | Enable file writing functionality. |
| Function | Description |
|---|---|
write_file | Write content to a local file with customizable options. |
Was this page helpful?