Skip to content

New command: spo agent add #6763

Description

@mkm17

Usage

m365 spo agent add

Description

Adds a new SharePoint agent

Options

Option Description
-u --webUrl <webUrl> URL of the site where the agent should be added.
-n, --name <name> The name of the agent.
-a, --agentInstructions <agentInstructions> The definition of the agent's role, tone, and limitations.
-w, --welcomeMessage <welcomeMessage> The welcome message.
-s, --sourceUrls <sourceUrls> Comma-separated list of URLs of the SharePoint sites, libraries, or files that are the sources of information.
-d, --description [description] The brief description of the agent's objective.
-i, --icon [icon] The URL of the icon.
-c, --conversationStarters [conversationStarters] Starter prompts. Please provide each prompt separated by a comma.

Examples

Add the SharePoint agent with Site and Library sources.

m365 spo agent add --webUrl https://contoso.sharepoint.com/sites/projectSite --name Agent --icon https://contoso.sharepoint.com/sites/projectSite/SiteAssets/icon.png --welcomeMessage "Welcome! Ask a question or get started with one of these prompts:"  --description "This is an agent curated based on the content from the selected file sources." --agentInstructions "Provide accurate information about the content in the selected files and reply in a formal tone." --conversationStarters "Summarize any key highlights,Create an FAQ based on these resources,How can I use these resources?"  --sourceUrls "https://contoso.sharepoint.com/sites/projectSite,https://contoso.sharepoint.com/sites/projectSite/Shared%20Documents"

Default properties

Additional Info

I need to explore this a bit further, but from my initial check, it seems we can create a new SharePoint agent by adding a file to the Site Assets library. The file should have a .agent extension and be in JSON format. This could be the first task in a larger list, including actions like agent list, agent approve, agent remove...

In this case, I’ve provided the option to add only one source (even though it can support up to 20). However, we can use the agent set command later to add a new source.

What do you think about this idea?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions