shell2 ## Sections • [API Docs](https://app.theneo.io/raiden-ai/shell2/api-docs.md) • [Sequence](https://app.theneo.io/raiden-ai/shell2/api-docs/sequence.md): Sequences are a predefined list of consecutive tasks to be executed in the shell2 sandbox • [Run a sequence](https://app.theneo.io/raiden-ai/shell2/api-docs/sequence/run-a-sequence.md): This API endpoint allows you to run a sequence within the Shell2 API. By making a request to this endpoint, you can initiate the execution of a predefined sequence of actions or tasks. This feature is especially useful for automating repetitive or complex processes within your application. Running a sequence can help streamline your workflow and save valuable time and resources. • [Fetch sequence data](https://app.theneo.io/raiden-ai/shell2/api-docs/sequence/fetch-sequence-data.md): The /sequence/get API endpoint allows you to retrieve all data from a sequence execution. • [List all sequences](https://app.theneo.io/raiden-ai/shell2/api-docs/sequence/list-all-sequences.md): This API endpoint allows you to retrieve a list of all sequences. • [Update a sequence](https://app.theneo.io/raiden-ai/shell2/api-docs/sequence/update-a-sequence.md): The post /sequence/update API endpoint allows you to update a sequence in the Shell2 API - namely its public status. • [Session](https://app.theneo.io/raiden-ai/shell2/api-docs/session.md): The Session API endpoint allows you to retrieve information about live user sessions in Shell2. • [Create a new session](https://app.theneo.io/raiden-ai/shell2/api-docs/session/create-a-new-session.md): This API endpoint allows you to create a new session. By making a request to this endpoint, you can initiate a session for a user within the Shell2 platform. It is important to note that the session created through this API endpoint has a limited duration, specified in timeout (in seconds). After a certain period of inactivity or upon explicit termination, the session will expire, requiring the user to either create a new session or resume a previous session. • [Send a message in a session](https://app.theneo.io/raiden-ai/shell2/api-docs/session/send-a-message-in-a-session.md): The /session/message API endpoint allows you to send a new message in an active session. If you are sending a message to a multiplayer-enabled session from another user, you also need to specify the user's email in the query. • [Fetch session data](https://app.theneo.io/raiden-ai/shell2/api-docs/session/fetch-session-data.md): [{"type":"p","children":[{"text":"Get all session execution data"}]},{"type":"p","children":[{"text":""}]},{"type":"requestEditor","children":[{"text":""}],"pointsTo":"requestEditor","id":"e8834785-b723-4210-8f97-7b22da5e3b1a"},{"type":"p","children":[{"text":""}]},{"type":"p","children":[{"text":""}]},{"type":"responseEditor","children":[{"text":""}],"pointsTo":"responseEditor","id":"c7ceefb5-372b-4b8d-92f7-77b01fe15f48"},{"type":"p","children":[{"text":""}]}] • [Resume a session](https://app.theneo.io/raiden-ai/shell2/api-docs/session/resume-a-session.md): The /session/resume API endpoint allows you to resume a session in the Shell2 API. This functionality is particularly useful for scenarios where a user has ended a session and wants to continue where they left off later. • [Update a session](https://app.theneo.io/raiden-ai/shell2/api-docs/session/update-a-session.md): Update a session's multiplayer status. • [List all sessions](https://app.theneo.io/raiden-ai/shell2/api-docs/session/list-all-sessions.md): List all sessions Shell2 sessions. • [User](https://app.theneo.io/raiden-ai/shell2/api-docs/user.md): The User API section provides functionality for retrieving and updating user data. • [Settings](https://app.theneo.io/raiden-ai/shell2/api-docs/user/settings.md): To fetch and update user settings • [Fetch user settings](https://app.theneo.io/raiden-ai/shell2/api-docs/user/settings/fetch-user-settings.md): Fetch current user settings • [Update user settings](https://app.theneo.io/raiden-ai/shell2/api-docs/user/settings/update-user-settings.md): Update user settings. For a list of available LLMs, check the configuration section in your settings section, at shell2.raiden.ai/settings For the message prompt, which is used as a prompt to generate code, make sure it contains the {{USER_MESSAGE}} string that will be replaced with your task query in the sandbox If you specify a “reset” boolean as true instead of a settings object, the default shell2 configuration will be restored (without overriding your stored API keys) • [Commands Guide](https://app.theneo.io/raiden-ai/shell2/commands-guide.md): Messages you send in shell2 sessions & sequences without any prefix, are interpreted as queries to generate code by default. - Message Without Prefix Description : Code generation task. Usage : {CODE_TASK} Examples : plot a cosine wave animation into a mp4 file calculate and display the square root of 64 Since not every message is a code generation task, here is a list of currently available commands to use inside shell2 sessions & sequences. /m - Normal Text Prompt Description : This command generates normal text prompts without code generation. Usage : /m {TEXT_PROMPT} Examples : /m how to get clout? /m what are some important metrics mentioned in the previous text? /doc - Extract Text from Document or Image Description : This command can extract text from documents or images. It can be used directly from a URL or with a sandbox file. It works with various document files, image formats, and CSV files. Usage : /doc {URL_OR_FILENAME} {OPTIONAL_TEXT_PROMPT} Examples : /doc https://arxiv.org/pdf/1804.02767.pdf what is the paper about? /doc scores_data.csv /doc uploads://my_uploaded_paper.pdf /web - Extract Text from Webpage Description : This command extracts text from a webpage. Usage : /web {URL} {OPTIONAL_TEXT_PROMPT} Examples : /web https://example.com/articles/some_article /web https://www.latent.space/p/ai-ux-moat summarize in a single paragraph /file - Download File from URL Description : This command allows you to download a file from a URL. Usage : /file {URL} {OPTIONAL_OUTPUT_FILENAME} Examples : /file https://raw.githubusercontent.com/datasets/gdp/master/data/gdp.csv /file https://example.com/some_file.png i_love_u.png /doc uploads://my_uploaded_file.json /shell - Execute a Shell Command Description : This command allows you to execute a shell command. Usage : /shell {COMMAND} Examples : /shell pip install -U seaborn /run - Execute Python Code Description : This command allows you to execute Python code. Usage : /run {PYTHON_CODE} Examples : /run x = 1337 /run import time; print(f'current timestamp: {time.time()}') /file_extract - Download & Extract an Archive Description : This command allows you to download and extract an archive. Usage : /file_extract {ARCHIVE_URL} {OPTIONAL_ARCHIVE_OUTPUT_FILENAME} Examples : /file_extract https://raw.githubusercontent.com/example/example-data/main/my_archive.7z /done - Close the Session Description : This command closes the session. Usage : /done Examples : /done Feel free to use these commands to interact with the tool as needed. If you have any questions or need assistance, please contact us via email or on twitter (@n_raidenai). • [Examples](https://app.theneo.io/raiden-ai/shell2/examples.md): Here are some example you can use to test shell2. You can either use them as sequences or use them in live sessions. • [MLB Data](https://app.theneo.io/raiden-ai/shell2/examples/mlb-data.md): Below is a simple example for dealing with baseball data using the /doc command, which handles documents and csv data, we download a small example csv file and feed it into the context: /doc https://raw.githubusercontent.com/raidendotai/shell2-example-data/main/mlb_2012.csv using a code query, we plot and save in a file. code queries do not need any command prefix plot a chart for the relationship between season payrolls and wins in a hi res png finally we inquire more about our data using the /m command, which means text query /m tell me more about history of the top scoring team you identified in the previous data, from your own knowledge The shell2 sequence definition from the above example would simply be: Select... /doc https://raw.githubusercontent.com/raidendotai/shell2-example-data/main/mlb_2012.csv plot a chart for the relationship between season payrolls and wins in a hi res png /m tell me more about history of the top scoring team you identified in the previous data, from your own knowledge • [Findings from papers & articles](https://app.theneo.io/raiden-ai/shell2/examples/findings-from-papers-and-articles.md): An example with arXiv papers using the /doc command, which handles documents and csv data, we download and inquire about a paper: /doc https://arxiv.org/pdf/2308.13937.pdf summarize the paper in 1 paragraph we do the same for another paper /doc https://arxiv.org/ftp/arxiv/papers/2301/2301.08992.pdf summarize the paper in 1 paragraph we use the /web command with similar syntax, which handles text extraction from web: /web https://www.latent.space/p/ai-ux-moat summarize the article in 1 paragraph we generate a synthesis of previous data using the /m command, which handles text prompts /m synthesize the 3 summaries you generated by emphasizing common points we make a table from the findings /m turn your synthesis findings into a table, with a max of 10 words per entry we generate + execute code to save it as a csv file save it as a csv file The shell2 sequence definition from the above example would simply be: Select... /doc https://arxiv.org/pdf/2308.13937.pdf summarize the paper in 1 paragraph /doc https://arxiv.org/ftp/arxiv/papers/2301/2301.08992.pdf summarize the paper in 1 paragraph /web https://www.latent.space/p/ai-ux-moat summarize the article in 1 paragraph /m synthesize the 3 summarize you generated by emphasizing common points /m turn your synthesis findings into a table, with a max of 10 words per entry save it as a csv file