From rightbrain-manager
Complete manager for the Rightbrain API. Create and manage Tasks, TaskAgents, Skills, Integrations, and MCP Servers. Trigger with "rightbrain tasks", "rightbrain agent", "rightbrain skill", "rightbrain integration", "create task", "create agent", "run agent", "browse tasks", "manage skills", "connect integration", "switch to staging", "use staging", "staging environment", "use production".
How this skill is triggered — by the user, by Claude, or both
Slash command
/rightbrain-manager:rightbrain-managerThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Manage the four Rightbrain primitives and MCP Servers from the command line.
assets/agent-template.jsonassets/examples/classification.mdassets/examples/extraction.mdassets/examples/generation.mdassets/export-schema-example.jsonassets/task-template.jsonreferences/agents.mdreferences/architecture-guide.mdreferences/image-generation.mdreferences/integrations.mdreferences/mcp-servers.mdreferences/output-formats.mdreferences/prompt-patterns.mdreferences/skills-catalog.mdreferences/task-components.mdreferences/tasks.mdManage the four Rightbrain primitives and MCP Servers from the command line.
| Primitive | What It Is | When to Use |
|---|---|---|
| Task | A stateless AI function: input in, structured output out | Single-step operations: classify, extract, generate, analyze |
| TaskAgent | An autonomous agent that orchestrates multiple tools | Multi-step workflows, tool chaining, conversations |
| Skill | A declarative instruction bundle for agents | Teaching agents domain knowledge, policies, procedures |
| Integration | An OAuth connection to external services | Connecting agents to Google Workspace (Sheets, Docs, Gmail, etc.) |
| MCP Server | An external tool provider via Model Context Protocol | Connecting agents to databases, internal APIs, SaaS platforms |
Decision guide:
The skill supports two environments. Default is production.
| Environment | API Base URL | When to use |
|---|---|---|
| Production | https://app.rightbrain.ai/api/v1 | Default. Live data, real credits. |
| Staging | https://stag.leftbrain.me/api/v1 | Testing new features, development work. |
If the user says "use staging", "staging", or "stag" → set API_BASE to https://stag.leftbrain.me/api/v1 and confirm: "Switched to staging environment (stag.leftbrain.me)"
If the user says "use production", "production", or "prod" → set API_BASE to https://app.rightbrain.ai/api/v1 and confirm: "Using production environment (app.rightbrain.ai)"
If unspecified, default to production: API_BASE=https://app.rightbrain.ai/api/v1
Store API_BASE in context and use it for ALL subsequent curl commands.
Exit option: At any point, if the user says "cancel", "exit", or "never mind", exit gracefully.
[ -f ~/.rightbrain/credentials.json ] && echo "CREDENTIALS_FILE_EXISTS=yes" || echo "CREDENTIALS_FILE_EXISTS=no"
If no credentials file, run first-time login:
npx rightbrain@latest login --non-interactive
This opens the browser to sign in. If login fails, tell the user to try npx rightbrain@latest login manually.
node -e "
const c = JSON.parse(require('fs').readFileSync(process.env.HOME + '/.rightbrain/credentials.json', 'utf8'));
const token = c.access_token || '';
const expiresAt = c.expires_at || 0;
const expired = expiresAt && Date.now() >= expiresAt - 300000 ? 'yes' : 'no';
console.log('TOKEN_SET=' + (token ? 'yes' : 'no'));
console.log('EXPIRED=' + expired);
console.log('ORG_ID=' + (c.org_id || ''));
console.log('PROJECT_ID=' + (c.project_id || ''));
"
If TOKEN_SET=no or EXPIRED=yes, re-authenticate via npx rightbrain@latest login --non-interactive, then re-read.
Extract the access token:
node -e "console.log(JSON.parse(require('fs').readFileSync(process.env.HOME + '/.rightbrain/credentials.json', 'utf8')).access_token)"
Store as ACCESS_TOKEN for all subsequent API calls.
Test the token by fetching organizations:
curl -s -X GET "{API_BASE}/org" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: application/json"
If 401, re-authenticate. If 200, proceed.
If ORG_ID and PROJECT_ID already set from credentials: use them directly, confirm to user, skip selection.
Otherwise: Select org (auto-select if only one, ask if multiple), then fetch and select project the same way.
curl -s -X GET "{API_BASE}/org/{ORG_ID}/project" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: application/json"
curl -s -X GET "{API_BASE}/org/{ORG_ID}/project/{PROJECT_ID}/model" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: application/json"
Store model list in context. Key fields: id, name, supports_vision, supports_image_output.
Present the main action menu:
Route to the appropriate reference file based on selection.
For full task workflows, see Tasks Reference.
curl -s -X POST "{API_BASE}/org/{ORG_ID}/project/{PROJECT_ID}/task" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d @- << 'EOF'
{
"name": "Email Classifier",
"description": "Classifies emails by intent and urgency",
"enabled": true,
"output_modality": "json",
"system_prompt": "You are an email analyst specializing in business communication.",
"user_prompt": "## Goal\nClassify the email by intent.\n\n## Input\n{email_content}: The email to classify\n\n## Instructions\n1. Identify the primary intent\n2. Assess urgency\n3. Extract action items",
"llm_model_id": "model-uuid",
"llm_config": {"temperature": 0.2},
"output_format": {
"intent": {"type": "str", "options": ["inquiry", "complaint", "request", "feedback"]},
"urgency": {"type": "str", "options": ["low", "medium", "high"]},
"action_items": {"type": "list", "item_type": "str"}
}
}
EOF
curl -s -X POST "{API_BASE}/org/{ORG_ID}/project/{PROJECT_ID}/task/{TASK_ID}/run" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d @- << 'EOF'
{
"task_input": {
"email_content": "Hi, I need to cancel my subscription by Friday..."
}
}
EOF
Critical: All inputs must be wrapped in task_input.
For full agent workflows, see Agents Reference.
curl -s -X POST "{API_BASE}/org/{ORG_ID}/project/{PROJECT_ID}/task-agent" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d @- << 'EOF'
{
"name": "Research Assistant",
"description": "Searches and summarizes findings",
"instruction": "You are a research assistant. Given a topic, search for relevant information and produce a structured summary.",
"mode": "agentic",
"llm_model_id": "model-uuid",
"task_tools": [
{"task_id": "search-task-uuid", "is_output_formatter": false},
{"task_id": "summary-task-uuid", "is_output_formatter": true}
],
"skills": [],
"integrations": [],
"mcp_servers": [],
"memory_strategy": "sliding_window",
"memory_config": {"max_events": 100},
"max_turns": 15
}
EOF
curl -s -X POST "{API_BASE}/org/{ORG_ID}/project/{PROJECT_ID}/task-agent/{AGENT_ID}/run" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d @- << 'EOF'
{
"message": "Research quantum computing developments in 2026",
"session_id": null
}
EOF
Response streams via SSE. Pass session_id from a previous run to continue the conversation.
Agent modes:
For full skills workflows, see Skills Catalog Reference.
curl -s -X GET "{API_BASE}/skill/available" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: application/json"
curl -s -X POST "{API_BASE}/org/{ORG_ID}/project/{PROJECT_ID}/skill" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d @- << 'EOF'
{
"slug": "compliance-checker",
"display_name": "Compliance Checker",
"description": "Validates agent actions against GDPR and internal compliance policies",
"instructions": "## When to Use\nBefore any action that involves personal data.\n\n## Steps\n1. Identify personal data fields\n2. Check consent status\n3. Apply data minimization\n\n## Constraints\n- Never process data without verified consent\n- Log all compliance decisions",
"reference_docs": {},
"skill_metadata": {"author": "security-team"}
}
EOF
Skills are declarative instructions, not executable tools. They teach agents domain knowledge. Agentic mode only.
For full integration workflows, see Integrations Reference.
# 1. Create the integration
curl -s -X POST "{API_BASE}/integration" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d @- << 'EOF'
{"type": "google_sheets"}
EOF
# 2. Authorize (returns URL for browser OAuth)
curl -s -X POST "{API_BASE}/integration/{INTEGRATION_ID}/authorize" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: application/json"
CRITICAL: Google Sheets has 17 tools (~936k tokens). Always use allowed_tool_ids when attaching to agents:
{"project_integration_id": "uuid", "allowed_tool_ids": ["values_get", "values_update", "values_append"]}
Available types: google_sheets, google_docs, google_slides, google_calendar, google_gmail
For full MCP workflows, see MCP Servers Reference.
# 1. Discover tools
curl -s -X POST "{API_BASE}/task_mcp_server/discover" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d @- << 'EOF'
{"url": "https://mcp.example.com/sse", "transport": "sse"}
EOF
# 2. Create server
curl -s -X POST "{API_BASE}/task_mcp_server" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d @- << 'EOF'
{"name": "My MCP Server", "url": "https://mcp.example.com/sse", "transport": "sse"}
EOF
Attach to agent: {"task_mcp_server_id": "uuid", "allowed_tool_ids": null}
If the server requires OAuth, use GET /task_mcp_server/authorize?url=... first.
{API_BASE}
All requests require:
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
Always use heredoc syntax for reliability:
curl -s -X POST "{API_BASE}/..." \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d @- << 'EOF'
{"key": "value"}
EOF
For task_tools, skills, integrations, mcp_servers:
[] = clear all| Status | Cause | Solution |
|---|---|---|
| 400 | Validation error | Check error message, fix input |
| 400 | duplicate_task_name | Use a unique name |
| 401 | Invalid/expired session | Re-run npx rightbrain@latest login |
| 403 | No permission | Verify access in dashboard |
| 404 | Resource not found | Check org/project/resource IDs |
| 429 | Rate limit | Wait 30 seconds, retry |
| 500 | Server error | Retry after a few seconds |
Add timeouts for long requests: --connect-timeout 10 --max-time 30
json requires output_format; all others require null.{like_this} -- ADK treats them as session state variables.See Task Components Reference for complete validation documentation.
Workflow guides:
Task-specific references:
Templates:
npx claudepluginhub rightbrainai/claude-code-skills --plugin rightbrain-managerOrchestrates complex tasks by analyzing requirements, discovering plugins/agents/skills/MCPs, matching with confidence scores, and generating strategic execution plans with alternatives.
Routes tasks to the best specialist agent using file patterns, intent keywords, and domain context. Loaded every session to activate 58 agents across categories.
Provides best practices for Agent Teams skills: sub-agent setup, SendMessage protocols, task dependencies, logging hooks, context design, and patterns from 7 examples. Use to create new team skills, audit existing, debug communication.