AI Child Book
Building a Child Book AI Agent using ShellAgent with DeepSeek
Last updated
Building a Child Book AI Agent using ShellAgent with DeepSeek
Last updated
DeepSeek’s groundbreaking innovation is yet another testament to the sheer power of open-source AI. With these next-level foundation models and cutting-edge multi-modal AI, we’re stepping into a new era for multi-agent systems and consumer layer applications.
The real game-changer ahead isn’t just another chatbot—it’s the rise of multi-modal, multi-functional AI Agents, on MyShell.
Building AI applications today requires zero coding. That’s right—NO CODE, no hassle. With MyShell, creating a next-gen AI agent is as easy as clicking a few buttons, just like steps in this tutorial.
Before you start building, take a moment to outline a clear plan detailing what your AI agent will do and how it will function. ShellAgent is magical, but isn’t pure magic—it bridges the gap between ideation and execution, while it cannot generate original ideas for you.
Let’s use the Child Book AI agent as an example. You need a clear vision of how the agent will interact with users to accomplish its tasks, setting realistic expectations for different models handling various functions.
Below is a simplified overview of how the Child Book AI Agent works. We use DeepSeek to transform user text input into prompts that image-generation models can understand, then display both the story and images. Users can continue writing the story, start a new one, or ask DeepSeek to continue the narrative.
To get started, first visit ShellAgent (cloud version). We offer the cloud version for everyone.
ShellAgent is also an open-source project that you can deploy on your own computer—learn more at our GitHub repository, or revisit the Download and Installation chapter.
We provide some quickstart templates for beginners. You might prefer creating from a template to take a quick look of all the configuration details below.
Please skip this part and go to the Build the MyShell Agent chapter if you are a veteran or you want to learn more about the processes.
Create an agent from templates
Choose either type of your agent
After creating from a template and saving your MyShell Agent or X Agent in ShellAgent cloud version, you can directly go to the Deploy the MyShell Agent chapter or the Deploy the X Agent chapter accordingly.
In this tutorial,
AI Child Book - MyShell (right side in the image above) is a MyShell Agent
which users can interact with on MyShell;
AI Child Book - X (left side in the image above) is an X Agent
designed for X account automation.
The tutorials below will first introduce the development of the MyShell Agent
, and then the X Agent
.
Create a blank agent
Choose the MyShell Agent type
Set Context Variables
You will set story
and reply
as text type
variable, and image
as image type
variable. Context variables are like a thread that connects everything within ShellAgent.
Edit the Introduction
You can have cool introductions if you want to add Audio
/Images
/Buttons
for the sake of simplicity of this demo, we will just do text intros.
Generate Replies Using AI Models
This step processes user input with DeepSeek R1, refining and optimizing prompts for the child book scenario. Flux then generates the corresponding images. The results are also stored as context variables for reuse in subsequent states.
You start by clicking State
from the left menu bar to add one to the Canvas. Then, add the input to this state, let’s name it Generate
. In this example, we simply named the input prompt
, and connect that with the Chat Input Box of Intro State, shown by the yellow line.
You will add different widgets to perform Tasks to Generate
, which in our plan will be DeepSeek R1 & Flux1-dev , the current SOTA image gen model. We will skip the configuration details for models and you can check it via our template. Here at Tasks, you can actually select ANY widgets that are displayed at the left menu bar, all the way from LLMs, Image Processing, General Tools, Searching, Image Generation, and even Web3 relevant widgets with 50+ widgets supporting diverse functionalities. We’ll be supporting more and more in the future.
You also need to add Context Variables that you set previously into the the output section, ensuring that the output of models can be stored and transported across states. Remember, when editing outputs, you can go with select output
and directly select the image
and reply
variables you created beforehand.
You should be careful when editing the Flux widgte prompt, remember you should use /
command to reference the variables passed from DeepSeek, not by typing it.
You also need to add Context Variables that you set previously into the output section, ensuring that the output of models can be stored and transported across states. Remember, when editing outputs, you can go with select output
and directly select the image
and reply
variables you created beforehand.
We provide an additional setting here to control if users see the thinking processes of DeepSeek R1.
Display Results and Provide Options
We display DeepSeek’s text result and Flux’s image result at the same time. Because the job of Display
state is purely to show users the generated images/story without performing too much of tasks; thus it doesn’t have input or tasks. You simply add the story
and reply
context variables as output so that these doesn’t get lost. On Message part, here is how you actually render the output out.
Simply go to Ref Mode
,select Context→Reply
. By doing that, you’re rendering the reply of the LLM out. You will do the same for the image generated by Flux. Go from Text
to Image
section and select the context variable image
.
Moreover, creating two buttons to allow users to decide whether they want AI to continue the story or restart a new one. Let’s name them Auto-Write
and Restart
Don’t remember to add the new reply to the whole story in the context. So that the agent doesn’t forget what happened before and keep writing good stories for you.
Auto-Write Story
This step is similar to the ‘Generate’ state but differs in two ways:
It doesn’t require user input.
DeepSeek R1 uses a different system prompt to process the entire story.
Restart a Story
Simply clear the context values to start fresh.
Adding Transitions (Connect the lines!)
We’ve completed all necessary states at ShellAgent, now you need to add transitions to make the state machine running. The “+”
sign on the left and right side of each state node represents the flow of states. Under the Transition section of each state represents where user interaction will change the flow of states.
Le’s go there one by one:
Start
to Intro
, that’s default
Intro
uses the type box connects to Generate
, this means that Generate
gets input from user’s input at Intro
's type box.
Generate
connects to Display
via the “+”
sign, means no additional user action is needed
At Display
state
Auto-write
button connects to Auto-writes
state
Restart
button connects to restart
states
Type box (means users wants to keep writing the story) goes to Generate
Auto-write
connects to Display
via the “+”
sign
Restart
connects to Intro via the “+”
sign
Save
Make sure to click the save button in ShellAgent (even we have the auto-save function).
That’s it! You’ve completed a basic bot at ShellAgent, congrats!
We will introduce how to deploy the MyShell Agent you've created on MyShell in the next chapter.
Create a new agent from MyShell Workshop for deployment and fill in the required fields
Choose ShellAgent Mode and select the configuration you created in ShellAgent
Save it and enjoy your AI agent on MyShell.
We will create an X Agent that monitors the comments of the pinned post on your account. When users comment on your pinned post, the agent's account will automatically respond with the generated results.
In this example, if users comment with their ideas (e.g., a puma at large), the X Agent will respond with a full story and an image based on the idea.
Create a new X Agent in ShellAgent
Set a text-to-image workflow
The X Agent simply performs text-to-image generation just like the MyShell Agent above.
If you follow the steps in Deploy the MyShell Agent, you should have a MyShell Agent in Workshop now.
Navigate to the Setting tab of the MyShell Agent you have created in Workshop.
Scroll down to the end of the page and select the X Agent's configuration you just created in ShellAgent.
Create a new X account for your X Agent
There are two requirements:
The account must follow our official X account @myshell_ai.
The account must include a MyShell Agent’s URL
in the “Website” section of its profile.
Make sure your X Agent's account has followed our official X account @myshell_ai
Copy your AI Agent's link by click the button below
Paste the link into the Website
field of your X account's profile settings and save it
Connect with X
Go back to MyShell and connect your X Agent with your X account
Save the settings of your X Agent
You are all set, but please read the content below.
Due to X's restrictions on API calls and third-party app interactions, currently ShellAgent only supports basic request-and-reply interactions with Premium (blue check/verified) users.
For the first time, it may take about one hour to connect with X. Please be patient.
We highly recommend you mark your X Agent account as an Automated
account to reduce the risk of restrictions. Follow the steps:
As MyShell is open to all for building powerful AI Agents, anyone can become a solo entrepreneur.
The AI playing field has never been more wide.
And with crypto in the mix, everything is about to accelerate even faster.