--- name: myagents description: | myagents CLI — loads agent profiles, retrieves credentials, and manages integrations for AI agents. Use to load an agent's full context (identity, credentials, integrations, memory), push memory/files/instructions back, or run diagnostics. TRIGGER when: user says "load [agent name]", "use my agent", "load ark", or any agent slug; user asks to get credentials, tokens, or API keys from their agent; user wants to push memory, a file, or updated instructions to their agent; user mentions myagents CLI commands (load, push, doctor, credentials, init, status, hook); project has a .myagents/ directory or myagents.json config; user says "my agent" in the context of credentials or work configuration; user asks "what tools/integrations does my agent have". DO NOT TRIGGER when: user asks about generic AI agent frameworks (LangChain, CrewAI, AutoGPT, OpenAI Assistants) with no myagents context. --- # myagents CLI Reference You have the `myagents` CLI installed. Use `myagents load ` as the default happy path, and prefer `--json` whenever the output will be parsed by an agent or tool call. Default `myagents credentials ` output is secret-safe. Use `--json` for machine-readable secrets or `--shell` only when you explicitly need an export command. ## Fast Operating Rules - `myagents load ` once at the start, then keep working from the loaded agent. - After your own successful CLI write on this same machine, do **not** rerun `myagents load `. The CLI already resyncs the active local cache silently. - Run `myagents load ` again only when you switch agents or need to pull changes that happened in the dashboard or on another machine. - Agent identity is fixed after creation. The agent name and slug are the same dashed value, so if you need a different identity later, duplicate the agent and choose a new one there. - Default load mode writes `~/.myagents/.env` for convenience. For the safer no-local-env path, use `myagents load --credential-mode on-demand` and fetch secrets just in time with `myagents credentials --json`. - Linked GitHub skills are stored as links only. `myagents load ` can prompt to download them locally, or you can force the choice with `--download-linked-skills ask|yes|no`. - Use `myagents status --json` when you need to confirm the active agent, current access role, whether a shared team agent is writable, or which credential mode is active. --- ## Intent -> Command Quick Reference | What the user says | Command to run | |---|---| | "load agent mars" / "use my ark agent" | `myagents load ` | | "load my agent without writing a local env file" / "use safer credential mode" | `myagents load --credential-mode on-demand --json` | | "load my agent and install its linked GitHub skills" | `myagents load --download-linked-skills yes --json` | | "set up myagents for this project" / "init an agent here" | `myagents init` | | "check if everything is working" / "health check" / "debug my setup" | `myagents doctor` | | "what agents do I have?" / "list my agents" | `myagents agent list --json` | | "which agent is active?" / "am I logged in?" | `myagents status --json` | | "get my GitHub token" / "what is my OpenAI key?" | `myagents credentials --json` | | "open the GitHub connector login" / "connect this MCP URL" | `myagents connector open --json` | | "save this to my agent" / "push my state" | `myagents push memory "..." --json` | | "create a new agent" | `myagents agent create --name my-agent [--slug my-agent] --json` | | "update my agent description/status" | `myagents agent update --description "..." --status disabled --json` | | "disable/activate my agent" | `myagents agent update --status disabled --json` | | "upload this file to my agent" | `myagents push resource ./file.md --type document --json` | | "link this GitHub skill repo to my agent" | `myagents push skill --github-repo https://github.com/org/repo --json` | | "show recent activity" / "what did I do?" | `myagents activity list --json` | | "list integrations" / "what tools am I connected to?" | `myagents integration list --json` | | "update my agent's name/email for forms" | `myagents identity update --set full_name="..." --set email="..." --json` | | "install the skill" | `myagents skill install --json` | | "auto-load when I mention ark" | `myagents hook install ark --json` | --- ## Fast Mental Model Use myagents with this short loop: `load` once, read directly, write directly, keep working. Do not rerun `myagents load ` after your own successful CLI write on the same machine. The CLI already resyncs the active local cache for you. Run `myagents load ` again only when you switch agents, start fresh on a machine or session, or need to pull remote changes from the dashboard or another machine. Use `myagents status --json` when you need to confirm the active agent, current access role, whether a shared team agent is writable, or which credential mode is active. ```bash myagents load --json myagents load --credential-mode on-demand --json myagents load --download-linked-skills yes --json myagents status --json ``` - Agent identity is fixed after creation. New agents use the same dashed value for both name and slug, so if you need a different slug-backed identity, duplicate the agent and create a new one. - If the loaded agent includes linked GitHub skills, `load` can prompt to install them locally without copying those repos into myagents itself. --- ## Quick Start Install the CLI once, authenticate once, then load any agent on demand. For agentic use, prefer `--json` on any command whose output will be parsed. ```bash # 1. Install CLI curl -fsSL https://myagents.sh/install.sh | bash # 2. Log in (one time) myagents login --email you@example.com --password yourpassword --json # 3. Create or link an agent for the current project myagents init --json # 4. Load your agent (restores env cache + skills + session) myagents load --json # 5. Run diagnostics any time something feels wrong myagents doctor --json ``` - If another AI agent is handling first-time setup, give it the simple prompt: `Go to https://myagents.sh/setup and install myagents for me.` - The `/setup` endpoint is terminal-first and machine-readable. It should be fetched as text and followed with shell tools directly. --- ## Account After `myagents load `, `myagents status --json` includes `access_role` and `can_manage_shared_config` so an agent can tell whether the current shared session is loaded as `viewer` or `admin`. ```bash # Create account (no browser required) myagents signup --email you@example.com --password yourpassword [--name "Your Name"] [--json] # Log in headless (no browser) myagents login --email you@example.com --password yourpassword [--json] # Log in with browser myagents login # Log out myagents logout [--json] # Show current user + active agent + expiries myagents status [--json] ``` --- ## Load an Agent This is the main entrypoint for both humans and agents. It refreshes auth/session state, writes local cache files, and refreshes skills. Use it at the start of work, when switching agents, or when you need to pull remote changes from the dashboard or another machine. Do not rerun it after your own successful CLI write on the same machine — the CLI already keeps that local cache in sync. ```bash myagents load [--json] [--silent] [--credential-mode env|on-demand] [--download-linked-skills ask|yes|no] ``` - Default `env` mode may write `~/.myagents/.env`, `~/.myagents/.connectors.json`, `~/.claude/skills/myagents/SKILL.md`, and `~/.claude/skills//SKILL.md`. - Use `--credential-mode on-demand` when you do not want a local per-agent `.env` file. In that mode, fetch secrets just in time with `myagents credentials --json` or `--shell`. - If the agent includes linked GitHub skills, the default interactive mode is `ask`: `load` can prompt to download them locally into `~/.claude/skills/myagents-linked-*`. Use `--download-linked-skills yes` or `no` when you need a deterministic non-interactive choice. - The dashboard Agent settings dialog now includes the Agent status toggle, an On-demand mode switch with a help popover, webhook controls, and API key management. When the On-demand switch is on, the next `myagents load ` uses on-demand mode by default. - If the agent is disabled in Agent settings, future CLI loads and session-backed requests fail until it is re-enabled. - The main dashboard now presents long-lived agent context under `Knowledge & Files`, separating uploaded files, reference notes, memory notes, and skills so the saved context is easier to inspect. - For shared team agents, the load response also persists `access_role` and `can_manage_shared_config` into the local session metadata. - The per-agent skill version is derived from the live agent row plus its integrations, resources, and enabled policies, so the next load notices more than just agent timestamp or integration-count changes. - Each agent is capped at 100 manual environment variables and 100 skill resources or linked GitHub skills. --- ## Init Use this from a project root to create an agent and optionally write a local `SKILL.md` stub. If flags are omitted, the CLI prompts for the missing values. ```bash myagents init [--name project-agent] [--slug project-agent] [--description "..."] [--visibility private|public|unlisted] [--json] ``` --- ## Doctor Checks auth refresh, active session health, API reachability, installed skill freshness, and integration expiry for the active agent. ```bash myagents doctor [--json] ``` --- ## Agent Management Listing and showing agents is available to both admins and viewers on shared team agents. Creating agents in a team, updating shared team agents, transferring them, or deleting them requires admin access. Agent identity is slug-backed and fixed after creation. New agents keep the stored name identical to the slug, so if you need a different identity, duplicate the agent instead of trying to rename it. ```bash myagents agent list [--json] myagents agent show [--json] myagents agent create --name agent-slug [--slug agent-slug] [--description "..."] [--visibility public|private|unlisted] [--json] myagents agent update [--description "..."] [--status active|disabled|archived] [--visibility public|private|unlisted] [--system-prompt "You are..."] [--preferred-model claude-sonnet-4-6] [--json] myagents agent transfer [--to-team team-slug | --to-personal] [--json] myagents agent delete --confirm [--json] ``` --- ## Credentials In the default `env` mode, credentials are normally restored during `load`; use this command when you need to fetch one directly. In `on-demand` mode, this becomes the primary just-in-time secret path because no local per-agent `.env` file is written. ```bash # Secret-safe default output myagents credentials [--label