Sign in and start an AI agent in a MESA app¶
Draft: not yet validated
The AI assistant that drafted this tutorial ran all six steps in MESA JupyterLab on 2026-11-18 (OpenCode 1.19.4), with the account's owner typing the password and the key. Nobody has yet followed it as a reader would, from start to finish. Tell us what you find.
Every MESA app comes with AI coding agents that run in a terminal and can work with your Data Store through the MESA tools. They need two things from you: who you are, and a language model to think with.
You will: have an agent that answers a question about your own Data Store.
Time: 10 minutes. You need: MESA JupyterLab running, and an API key for CyVerse AI Verde, which you get at https://chat.cyverse.ai under Course → API Key.
Steps¶
-
In JupyterLab's Launcher, click Terminal.
You should see: a terminal tab with a prompt.
-
Sign in to CyVerse:
cyverse-loginIt shows your username: press Enter to accept it. Then type your CyVerse password.
You should see:
Verifying against /iplant/home/and your username, thenAuthenticated asand your username. The agents now act as you, with access to your own files. Without this step they can read public data only. -
Connect the language model:
aiverde-setupPaste your AI Verde key when it asks.
You should see:
Available models:and a list, thenSaved toand a file name. The key is saved but this terminal has not loaded it yet. Load it:source ~/.config/aiverde/envYou should see: the prompt return with no message.
-
Start an agent:
opencodeYou should see: the OpenCode screen, with a box to type in and the model's name under it. A note that
formationneeds authentication is expected; this task does not use it. -
Ask it:
List the folders in my CyVerse home.You should see: the tools it calls, such as
mesa_ds_list_directory, then a list of folder names. -
In the portal's browser tab, click Data Browser, then My Files.
You should see: the same folder names the agent listed.
Check it worked¶
The folders the agent lists are the ones in My Files. An agent that had not signed in as you could not see them.
If it didn't¶
The agent lists only public folders, or says permission was denied. It was started
before you signed in, so its tools are still anonymous. Quit the agent, run
cyverse-login again if you skipped it, and start the agent again.
Authentication Error, No api key passed in. The key is saved but not loaded.
Type /exit, run the source line in step 3, and start opencode again.
cyverse-login stays on Verifying, or says the login test failed. The Data
Store did not answer, which is not always a wrong password, and you are signed out
again. Do not keep retrying: CyVerse blocks addresses that look like crawlers. Wait a
few minutes, check https://status.cyverse.org, and sign in once more.
https://unblockme.cyverse.org lifts a block on your own computer; it is not yet known
whether it helps for an app.
Next¶
- Check an AI-suggested result against the data
- Type your password and your key only where these commands ask for them. See Keep tokens and passwords out of saved files.
- Signing in lasts only as long as the app: repeat steps 2 and 3 in each new session.
- Reference: AI agents in the MESA apps,
for the other agents (
claude,codex,agy), using your own account with an agent's vendor, and local models on a GPU.
Not yet validated by a person in MESA JupyterLab. Drafted with AI assistance on 2026-11-12 from the MESA documentation; all six steps were run in MESA JupyterLab on 2026-11-18.
Machine-readable versions of this page: Markdown twin · raw source on GitHub · llms.txt · llms-full.txt (whole site). See For AI agents.