MyShell
  • About MyShell
    • What is MyShell
    • MyShell in a Nutshell
    • Quickstart
  • Explore AI Agents
    • Image Generation
    • Video Generation
    • Meme Generation
    • Role-Playing Game
    • Character
    • Utility
  • Create AI Agents
    • Classic Mode
      • Enhanced Prompt
      • Knowledge Base
      • Telegram Integration
    • Pro Config Mode
      • Core Concepts
      • Tutorial
        • Tutorial Structure
        • Hello World with Pro Config
        • Building Workflow
        • Transitions
        • Expressions and Variables
        • Integration with Any Widget
        • An Advanced Example
      • Basic
        • Common
        • Atomic State
        • Transition
        • Automata
        • Modules
      • Advanced
        • Cron Pusher
        • Neutral Language To SD Prompt
        • Advanced Input Validation
        • Advanced Memory Manager in Prompt Widget
      • Tools
        • AutoConfig Agent
        • Cache Mode
        • Knowledge Base Agent
        • Crawler Widget
      • Example
        • Homeless With You
        • Random Routing
        • Function Calling
      • API Reference
        • Atomic State
        • Transition
        • Automata
        • Context
        • Module
          • AnyWidget Module
            • Prompt Widget
            • LLM Widget
            • TTS Widget
            • Code Runner Widget
            • Melo TTS
            • Age Transformation
            • ChatImg
            • GIF Generation
            • Music Generation
          • LLM Module
          • LLM Function Module
          • TTS Module
          • Google Search Module
        • Widgets
          • Bark TTS
          • Champ
          • CoinGecko
          • ControlNet with Civitai
          • Crawler
          • Crypto News
          • Data Visualizer
          • Email Sender
          • Google Flight Search
          • Google Hotel Search
          • Google Image Search
          • Google Map Search
          • Google News Search
          • Google Scholar Search
          • Google Search
          • GroundedSAM
          • Image Text Fuser
          • Information Extractor - OpenAI Schema Generator
          • Information Extractor
          • Instagram Search
          • JSON to Table
          • LinkedIn
          • MS Word to Markdown
          • Markdown to MS Word
          • Markdown to PDF
          • Mindmap Generator
          • Notion Database
          • OCR
          • Pdf to Markdown
          • RMBG
          • Stabel-Video-Diffusion
          • Stable Diffusion Inpaint
          • Stable Diffusion Recommend
          • Stable Diffusion Transform
          • Stable Diffusion Upscale
          • Stable Diffusion with 6 fixed category
          • Stable Diffusion with Civitai
          • Storydiffusion
          • Suno Lyrics Generator
          • Suno Music Generator
          • Table to Markdown
          • TripAdvisor
          • Twitter Search
          • UDOP: Document Question Answering
          • Weather forecasting
          • Whisper large-v3
          • Wikipedia
          • Wolfram Alpha Search
          • Yelp Search
          • YouTube Downloader
          • YouTube Transcriber
          • Youtube Search
      • FAQs
      • Changelog
    • ShellAgent Mode
      • Download and Installation
      • App Builder
      • Workflow
      • Build Custom Widget
      • Publish to MyShell
      • Customized Pricing For Your Agent
      • Example
        • Child Book X Agent w/ DeepSeek
        • Kids Book NFT AI Agent w/ BNB Chain
        • DeFAI Agent w/ BNB Chain
  • Shell Launchpad
    • How to Launch a Token
    • Trade Agent Tokens
  • Tokenomics
    • $SHELL Basics
    • $SHELL Token Utility
    • How to Obtain $SHELL
    • Roadmap
  • Open-source AI Framework/SDK
    • ShellAgent
    • OpenVoice
    • MeloTTS
    • JetMoE
    • AIlice
  • Links
Powered by GitBook
On this page
  1. Create AI Agents
  2. Pro Config Mode
  3. API Reference

Transition

The Transition type can be one of the following:

  • string: In this simplest case, the agent will transition to the provided target state.

  • TransitionCase: The agent will transition to the target state only if the condition is evaluated as true.

The capability for a state to transition to any other state, including itself, hinges on being able to reference a target state, which can be done through either absolute indexing or relative indexing. Here's a bit more detail:

  • Relative Indexing: This method allows navigation amongst states in relation to the current state:

    • sibling refers to another state at the same level as the current one.

    • .child specifies a sub-state of the current state.

    • sibling.child.grandchild indicates a more complex path from a state at the same level to a grandchild state.

  • Absolute Indexing: This approach uses a unique identifier to directly reference any state, regardless of the current state:

    • #id directly points to a state with the specified identifier.

    • #id.child combines the use of an identifier with relative paths to specify a state that is a child of the identified state.

This structure provides great flexibility in the flow control within an agent, permitting intricate navigation across the states depending on the desired agent behavior or user interactions.

TransitionCase

Field's Name
Type (Required/Optional)
Description
Example

target

string (Optional)

The target state to which the agent will transition. If not specified, the agent will transition to the current (self) state. Applies to TransitionCase type only.

"next_state"

condition

BoolExpression (Optional)

A condition that must be evaluated as true for the agent to transition to the target state. If not specified, the condition is treated as true. Applies to TransitionCase type only.

target_inputs

Object (Optional)

Specify the value for the inputs of target state. It will override the default value of the input, but not the value of the input.

TransitionCase[]

The agent will evaluate the conditions of each TransitionCase in the given array one by one. It will transition to the target state of the first TransitionCase whose condition is satisfied.

PreviousAtomic StateNextAutomata

Last updated 4 months ago