Skip to content

AgentDefinition

The following is a specification for defining AI agents with structured metadata, inputs, outputs, tools, and templates. It provides a way to create reusable and composable AI agents that can be executed with specific configurations. The specification includes metadata about the agent, model configuration, input parameters, expected outputs, available tools, and template configurations for prompt rendering.

---
title: AgentDefinition
config:
  look: handDrawn
  theme: colorful
  class:
    hideEmptyMembersBox: true
---
classDiagram
    class AgentDefinition {
      <>
        +string kind
        +string name
        +string displayName
        +string description
        +dictionary metadata
        +PropertySchema inputSchema
        +PropertySchema outputSchema
    }
    class PromptAgent {
        +string kind
        +Model model
        +Tool[] tools
        +Template template
        +string instructions
        +string additionalInstructions
    }
    AgentDefinition <|-- PromptAgent
    class Workflow {
        +string kind
        +dictionary trigger
    }
    AgentDefinition <|-- Workflow
    class ContainerAgent {
        +string kind
        +ProtocolVersionRecord[] protocols
        +EnvironmentVariable[] environmentVariables
    }
    AgentDefinition <|-- ContainerAgent
kind: prompt
name: basic-prompt
displayName: Basic Prompt Agent
description: A basic prompt that uses the GPT-3 chat API to answer questions
metadata:
authors:
- sethjuarez
- jietong
tags:
- example
- prompt
inputSchema:
properties:
firstName:
kind: string
value: Jane
lastName:
kind: string
value: Doe
question:
kind: string
value: What is the meaning of life?
outputSchema:
properties:
answer:
kind: string
description: The answer to the user's question.
NameTypeDescription
kindstringKind represented by the document
namestringHuman-readable name of the agent
displayNamestringDisplay name of the agent for UI purposes
descriptionstringDescription of the agent’s capabilities and purpose
metadatadictionaryAdditional metadata including authors, tags, and other arbitrary properties
inputSchemaPropertySchemaInput parameters that participate in template rendering
outputSchemaPropertySchemaExpected output format and structure from the agent

The following types extend AgentDefinition: