Intro
Building AI-Based Assistants with SuperAgent Markup Language (SAML)
SuperAgent Markup Language (SAML) is a powerful way for teams to quickly design, iterate, and deploy AI-based assistants. By defining assistants’ capabilities, data sources, and tools in a structured format, SAML enables rapid development and deployment of AI agents.
Step 1: Creating a Basic Assistant
Begin by defining a straightforward SuperAgent assistant without external tools or data sources using SAML.
Basic Assistant Configuration
name
: Sets the assistant’s name.llm
: Specifies the language model used, such asgpt-4-1106-preview
.prompt
: Establishes the assistant’s behavior context.intro
: Provides an introductory message for user interactions.
Step 2: Adding Data Sources
Enhance the assistant’s capabilities by adding data sources to provide it with specific information it can utilize.
Data Integration
data
: Defines the data your assistant can access.urls
: Lists the data sources, enabling the assistant to pull information from these files.
Step 3: Defining Multiple Specialized Assistants in a Single Workflow
Use SAML to set up multiple assistants within the same workflow, each with its own specialized tasks.
Combined Workflow Configuration
- The first assistant, “Web Scraping Assistant,” uses the Browser tool to scrape web pages.
- The second assistant, “Summarizing Assistant,” focuses on summarizing content, leveraging its prompt configuration to guide its functionality without the need for additional tools.
The Browser tool enables the assistant to search the internet for information. When integrated into an assistant, the Browser tool can be configured to scrape data from specific web pages or perform searches based on user queries. This capability is particularly useful for assistants that need to provide up-to-date information or conduct research on behalf of the user.
By leveraging SAML to define and integrate these tools, teams can create versatile AI assistants capable of performing a wide range of tasks, from data retrieval and content summarization to custom functions and internet searches.
Tools and Their Parameters
Here’s an overview of the tools and their parameters provided in the example:
-
Browser
name
: Identifier for the tool.use_for
: Describes the tool’s purpose, such as scraping web pages.
-
Code Executor
name
: Identifier for the tool.use_for
: Describes the tool’s purpose, such as executing code snippets.
-
HTTP
name
: Identifier for the tool.use_for
: Describes the tool’s purpose, such as making HTTP requests.metadata
: Contains configuration details like headers, URL, method, and body.
-
Replicate
name
: Identifier for the tool.use_for
: Describes the tool’s purpose, such as generating content with a model on Replicate.metadata
: Includes details like the model and API key.
-
Algolia
name
: Identifier for the tool.use_for
: Describes the tool’s purpose, such as querying an index.metadata
: Includes details like API ID, API key, and index name.
-
Metaphor Search
name
: Identifier for the tool.use_for
: Describes the tool’s purpose, such as searching the internet.metadata
: Includes the API key for Metaphor.
-
Function
name
: Identifier for the tool.use_for
: Describes the tool’s purpose, such as calling a custom function.metadata
: Includes arguments likename
andtitle
.