Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
321 changes: 272 additions & 49 deletions admin_manual/ai/app_context_agent.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,109 +9,321 @@ The *context_agent* app is the app that provides AI agent functionality in Nextc
When the Context Agent app is installed the AI Chat in Nextcloud Assistant will be able to interact with your Nextcloud apps via virtual integrations that are called "tools". They allow the Assistant to perform actions in your Nextcloud upon sending instructions in a chat message.
Tool groups are only available if their requirements are met. They can be en- and disabled in the AI admin settings.

Currently implemented tools:
Currently implemented tools
---------------------------

Artificial intelligence tools
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Ask a question to context chat (requires :ref:`Context Chat<ai-app-context_chat>`)

* Example prompt: *"What is the company's sick leave process?"*

* Transcribe a media file (requires Transcribe audio task type enabled)

* Example prompt: *"Can you transcribe the following file? https://mycloud.com/f/9825679"* (Can be selected via smart picker.)

* Generate documents (requires `Nextcloud Office <https://apps.nextcloud.com/apps/richdocuments>`_)

* Example prompt: *"Can you generate me a slide deck for my presentation about cats?"*
* Example prompt: *"Can you generate me a spreadsheet with some plausible numbers for countries and their population count?"*
* Example prompt: *"Can you generate me a pdf with an outline about what to see in Berlin?"*

* Generate images (requires Image generation task type enabled)

* Example prompt: *"Can you generate me an image of a cartoon drawing of a roman soldier typing something on a laptop?"*

Calendar tools
~~~~~~~~~~~~~~

* List the user's calendars

* Example prompt: *"List my calendars"*

* List the user's talk conversations (requires `Talk <https://apps.nextcloud.com/apps/spreed>`_)
* Schedule an event in the user's calendar

* Example prompt: *"List my talk conversations"*
* Example prompt: *"Schedule an event with Andrew tomorrow at noon."*

* List messages in a talk conversation (requires `Talk <https://apps.nextcloud.com/apps/spreed>`_)
* Find free times in users' calendar

* Example prompt: *"List the latest messages in my conversation with Andrew"*
* Example prompt: *"Find a free 1-hour slot for a meeting with me and Marco next week."*

* Send a message to a talk conversation (requires `Talk <https://apps.nextcloud.com/apps/spreed>`_)
Tasks tools
~~~~~~~~~~~

* Example prompt: *"Can you send a joke to Andrew in talk?"*
* Create a task

* Create a public talk conversation (requires `Talk <https://apps.nextcloud.com/apps/spreed>`_)
* Example prompt: *"Create a task for grocery shopping with due date tomorrow."*

* Example prompt: *"Can you create a new public talk conversation titled 'Press conference'?"*
* List tasks

* Example prompt: *"List my outstanding tasks"*

* Complete a task

* Example prompt: *"Mark the grocery shopping task as completed."*

* Update a task's details

* Example prompt: *"Change the priority of the grocery shopping task to the highest possible priority."*
* Example prompt: *"Change the due date of my work report task to the beginning of next week."*

* Delete a task

* Example prompt: *"Delete the grocery shopping task in my tasks."*


Circles/teams tools
~~~~~~~~~~~~~~~~~~~

* List circles

* Example prompt: *"List all my teams."*

* Find a person in the user's contacts
* List circle members

* Example prompt: *"What is Andrew's Email address?"*
* Example prompt: *"List all members of my Content Marketing team."*

* Create new circle

* Example prompt: *"Create a new team called 'Hiking group'."*

* Add members to circles

* Example prompt: *"Add Ralph to the Hiking group team."*

* Remove members from circles

* Example prompt: *"Remove ralph from the Hiking group team."*

* Change circle details

* Example prompt: *"Change the name of the Hiking group team to 'Outdoor group'."*
* Example prompt: *"Add the following description to the Hiking group team: We go hiking together once a month. Come join us."*

* Delete a circle

* Example prompt: *"Delete the Hiking group team."*

* Share a file with a circle

* Example prompt: *"Share my Hiking plans.md file with the Hiking group team."*


Contacts tools
~~~~~~~~~~~~~~

* Find a contact

* Example prompt: *"What is Anna's email address?"*

* Find a user's ID

* Example prompt: *"What is Ralph's userID?"*

* Find the current user's details

* Example prompt: *"Where do I live?"*

* Ask a question to context chat (requires :ref:`Context Chat<ai-app-context_chat>`)
Cookbook tools
~~~~~~~~~~~~~~

* Example prompt: *"What is the company's sick leave process?"*
* List recipes

* Transcribe a media file (requires Transcribe audio task type enabled)
* Example prompt: *"List my recipes."*

* Example prompt: *"Can you transcribe the following file? https://mycloud.com/f/9825679"* (Can be selected via smart picker.)
* Search for recipes

* Generate documents (requires `Nextcloud Office <https://apps.nextcloud.com/apps/richdocuments>`_)
* Example prompt: *"Do I have any Spaghetti recipes?"*

* Example prompt: *"Can you generate me a slide deck for my presentation about cats?"*
* Example prompt: *"Can you generate me a spreadsheet with some plausible numbers for countries and their population count?"*
* Example prompt: *"Can you generate me a pdf with an outline about what to see in Berlin?"*
* Get recipe details

* Generate images (requires Image generation task type enabled)
* Example prompt: *"Can you give me the details of my Spaghetti Carbonara recipe?"*

* Example prompt: *"Can you generate me an image of a cartoon drawing of a roman soldier typing something on a laptop?"*
* Create a new recipe

* Get coordinates for an Address from Open Street Maps Nomatim
* Example prompt: *"Create a recipe for Guacamole in my cookbook."*

* Example prompt: *"What are the coordinates for Berlin, Germany?"*
* Delete a recipe

* Get the URL for a map of a location using Open Street Maps
* Example prompt: *"Remove the Guacamole recipe from my cookbook."*

* Example prompt: *"Can you show me a map of New York, please"*
* List recipe categories

* Get the current weather at a location
* Example prompt: *"Which recipe categories do I have in my cookbook?"*

* Example prompt: *"How is the weather in Berlin?"*
Deck tools
~~~~~~~~~~

* Schedule an event in the user's calendar
* List deck boards

* Example prompt: *"Schedule an event with Andrew tomorrow at noon."*
* Example prompt: *"List the deck boards I have access to."*

* Find free times in users' calendar
* Add a new card

* Example prompt: *"Find a free 1-hour slot for a meeting with me and Marco next week."*
* Example prompt: *"Can you add a card with title 'Repair kitchen sink' to my Personal deck board?"*

* Create a deck card (requires `Deck <https://apps.nextcloud.com/apps/deck>`_)
* Add a label to a card

* Example prompt: *"Create a deck card for 'Buy Groceries' in my Personal board."*
* Example prompt: *"Can you add the label 'Urget' to the 'repair kitchen sink' card in my personal deck board?"*

* Access information in deck boards (requires `Deck <https://apps.nextcloud.com/apps/deck>`_)
* Assign a card to a user

* Example prompt: *"Which deck cards are currently in the To do list in my Personal board?"*
* Example prompt: *"Can you assign the 'Repair kitchen sink' card in my Personal deck board to Andrew?"*

* Create a task
* Delete a card

* Example prompt: *"Create a task for 'Renovate flat' in my Personal calendar. The task should be due Monday next week."*
* Example prompt: *"Delete the 'Repair kitchen sink' card in my Personal deck board."*

* Search for youtube videos
Files tools
~~~~~~~~~~~

* Example prompt: *"Show me the youtube video of the Nextcloud hub 10 launch."*
* Get contents of a file

* Search Duckduckgo
* Example prompt: *"Can you fetch the following file in my documents? Design/Planning.md"*
* Example prompt: *"Can you fetch the following file in my documents? https://mycloud.com/f/98543234"*

* Example prompt: *"Show me search results for quick pasta recipes, please."*
* Retrieve folder tree

* Send an email via Nextcloud Mail (requires `Mail <https://apps.nextcloud.com/apps/mail>`_)
* Example prompt: *"List my files."*

* Example prompt: *"Send a test email from my carry@company.com account to Andrew@company.com"*
* Create a public link for a file or folder

* Get contents of a file
* Example prompt: *"Create a public link for the following file: Design/Planning.md"*

* Create a new file

* Example prompt: *"Create a new file Ideas.md in my files and fill it with ideas for hiking destinations in the black forest."*

* Create a new folder

* Example prompt: *"Create a new folder 'Hiking plans' in my files."*

* Move a file

* Example prompt: *"Move the Ideas.md file into the Hiking plans folder."*

* Copy a file

* Example prompt: *"Copy the Ideas.md file into my Notes folder."*

* Delete a file

* Example prompt: *"Delete the Ideas.md file."*

Forms tools
~~~~~~~~~~~

* List all forms

* Example prompt: *"List all the forms I have access to."*

* Get details of a form

* Example prompt: *"Can you give me all details about the Retreat signup form?"*

* Add a question to a form

* Example prompt: *"Add the following question to the retreat signup form: 'Number of days attending'."*

* Retrieve all responses of a form

* Example prompt: *"List all responses to the Retreat signup form."*

* Example prompt: *"Can you summarize the following file in my documents? Design/Planning.md"*
* Update form settings

* Generate a public share link for a file
* Example prompt: *"Make the Retreat signup form expire end of next week."*

* Example prompt: *"Can create a share link for the following file in my documents? Design/Planning.md"*
* Delete a form

* Get the folder tree of the user's files
* Example prompt: *"Delete the Retreat signup form."*

* Example prompt: *"Can you show me the folder tree of my files?"*
Search tools
~~~~~~~~~~~~
All search providers in Nextcloud are also automatically available as tools.

* Search for files

* Example prompt: *"List all the powerpoint presentations in my files with file ending pptx."*

Share tools
~~~~~~~~~~~

* List shares

* Example prompt: *"List all files that were shared with me."*
* Example prompt: *"List the shares of the Design/Ideas.md file."*

* Share a file or folder with a user

* Example prompt: *"Share the Design/Ideas.md file with the user martin."*

* Share a file or folder with a group

* Example prompt: *"Share the Design/Ideas.md file with the group Designers."*

* Update a share's permissions

* Example prompt: *"Only allow martin read only access on the share of the Design/Ideas.md file."*

* Delete a share

* Example prompt: *"Remove the share of the Design/Ideas.md file with martin."*

* List user groups

* Example prompt: *"Which user groups are there?"*

* Retrieve share details

* Example prompt: *"Does martin have write access to the Design/Ideas.md file I shared with him?"*


Talk tools
~~~~~~~~~~

* List the user's talk conversations (requires `Talk <https://apps.nextcloud.com/apps/spreed>`_)

* Example prompt: *"List my talk conversations"*

* List messages in a talk conversation (requires `Talk <https://apps.nextcloud.com/apps/spreed>`_)

* Example prompt: *"List the latest messages in my conversation with Andrew"*

* Send a message to a talk conversation (requires `Talk <https://apps.nextcloud.com/apps/spreed>`_)

* Example prompt: *"Can you send a joke to Andrew in talk?"*

* Create a public talk conversation (requires `Talk <https://apps.nextcloud.com/apps/spreed>`_)

* Example prompt: *"Can you create a new public talk conversation titled 'Press conference'?"*

Miscellaneous tools
~~~~~~~~~~~~~~~~~~~

* Get coordinates for an Address from Open Street Maps Nomatim

* Example prompt: *"What are the coordinates for Berlin, Germany?"*

* Get the URL for a map of a location using Open Street Maps

* Example prompt: *"Can you show me a map of New York, please"*

* Get the current weather at a location

* Example prompt: *"How is the weather in Berlin?"*

* Search for youtube videos

* Example prompt: *"Show me the youtube video of the Nextcloud hub 10 launch."*

* Search Duckduckgo

* Example prompt: *"Show me search results for quick pasta recipes, please."*

* Send an email via Nextcloud Mail (requires `Mail <https://apps.nextcloud.com/apps/mail>`_)

* Example prompt: *"Send a test email from my carry@company.com account to Andrew@company.com"*

* Determine public transport routes (requires a `HERE <https://www.here.com/>`_ API key configured in the admin settings)

Expand All @@ -129,6 +341,9 @@ Currently implemented tools:
* Example prompt: *"Create a work package called 'Publish release video' in the 'Product launch' project in OpenProject"*


Combining tools
---------------

These tools can also be combined by the agent to fulfil tasks like the following:

* *"How is the weather where Andrew lives?"*
Expand All @@ -143,6 +358,14 @@ These tools can also be combined by the agent to fulfil tasks like the following

* Uses contacts to look up Andrew's email and then sends an email

* *"Which of my files are from Anna?"*

* Looks up Anna's userID and searches for files that belong to her

* *"Send the content of my draft.md file to Andrew in Talk"*

* Gets the content of the file and sends it in a 1-1 Talk conversation with Andrew

Custom Tools using MCP
-----------------------

Expand Down