Skip to content

The output_path Parameter

Almost all builtin tools have an output_path parameter. In Turingpaper the output path parameter is treated in a special way.

Direct Output vs File Output

If the output_path is empty or - then the output of the tool will be returned directly, rather than saved to a file.

If the output_path is set to a real file or folder the output will be written to that location, and only a short message like success: wrote file ... will be returned directly.

When to Use Direct vs File Output?

When should you tell the agent to set output_path to - instead of a real file?

Imagine you would like your AI agent to use the fetch_content tool to get some content from the Internet.

If the task requires reading the content once, and you (the human) don't need to see the content for the sake of understanding, then telling the agent to set output_path to - is probably fine.

On the other hand, if you will use the content from fetch_content in multiple steps, or you need to validate the content, then it's better to tell the agent to use fetch_content with output_path set to some real Markdown file, and tell the agent to use file_read to read the file the content was saved to.

Doing this will allow the automation to read the file in any number of steps, and it will allow you to examine the content if something is not working as expected.

Copyright © 2024-2025 Turingpaper Technologies, Inc.