Make a tool that shows files in replies

Your tools can do more than open from a list. A tool can say which kinds of file it shows, and then agents can show those files under their replies with it.

Steps

  1. Ask an agent for it

    In a conversation, say what you want, such as “Make me a tool that shows 3D models in replies.” The agent starts from the same starter as any other tool, and lists the file types the tool takes.

  2. Have the agent show a file with it

    Ask it to show you a file of that type. A card appears under its reply. Press play to start the tool.

  3. Change it by asking

    Tell the agent what to change, as with any tool.

Where a tool lives

  • In the project. A tool in the project’s enjoy-apps folder works in that project, and people who copy the project from Git get it too. This is where agents make them.
  • On your computer. A tool in ~/Enjoy/Plugins works in all your projects.

When several tools take the same kind of file, the project’s comes first, then yours, then Enjoy’s. The menu on a reply’s card chooses another, and Enjoy remembers your choice for files of that type.

Good to know

  • It’s an ordinary tool. It’s a folder with an enjoy-app.json, and previews in that file says what it shows: accepts lists the file types, such as model/gltf-binary or video/*, and entry names its page. Its page uses enjoy.preview to get the file and to attach moments to your reply.
  • What a tool can do. It’s a whole web page, with a server of its own if it needs one. It gets the file’s address, your theme, whatever the agent passes it, and on request the file’s waveform and transcript.
  • What a tool can’t do. It draws only inside its card. It can’t read your conversation or send messages. It can only add a chip to your message, and you decide whether to send it.
  • Only you start it. A tool’s server runs as you, with access to your files, so a reply arrives as a picture and the tool starts only when you press play. Tools you get from someone else’s project are worth the same care as any code you run.

See also

  1. 01See what an agent made, in its replyConversations · 3 min
  2. 02Make a toolYour tools · 5 min
  3. 03What are your tools?Your tools · 4 min
  4. 04Open a file with a different editorFiles & docs · 4 min

Did this help?

Service

If Enjoy doesn’t work as this manual describes, a person will help.