Skip to content

feat(ai-assistants): add CRUD operations for AI assistants (personas)#13

Open
stewartshea wants to merge 1 commit into
mainfrom
add/assistant
Open

feat(ai-assistants): add CRUD operations for AI assistants (personas)#13
stewartshea wants to merge 1 commit into
mainfrom
add/assistant

Conversation

@stewartshea
Copy link
Copy Markdown
Contributor

@stewartshea stewartshea commented Jun 2, 2026

  • Introduced new tools for managing AI assistants, including list_assistants, get_assistant, create_assistant, update_assistant, and delete_assistant.
  • Updated documentation in AGENTS.md and README.md to reflect the new functionality and usage.
  • Enhanced authorization checks to include the new assistant management tools.
  • Added validation for assistant names to ensure compliance with naming conventions.
  • Implemented unit tests for the new assistant management features to ensure reliability.

Note

Medium Risk
Introduces workspace write APIs that can replace full persona config on upsert and affect chat behavior via persona_name; gated to readwrite+ but mis-use of create_assistant could reset settings.

Overview
This PR adds first-class MCP support for workspace AI assistants (personas) so agents can create and manage dedicated persona_name identities for workspace_chat, not only workspace-wide chat rules/commands.

Server: Five new tools — list_assistants, get_assistant, create_assistant, update_assistant, delete_assistant — call PAPI v4 /personas (list/get/delete) and /personas/sync-typed (create/update). Assistant short_name maps to persona_name; full platform names use {workspace}--{short_name}. create_assistant is a full upsert (omitted fields reset); update_assistant fetch-merge-writes partial changes. Kebab-case name validation blocks -- (workspace/persona separator). Mutations are gated via WRITE_TOOLS (readwrite+).

Docs & workflow: AGENTS.md, README.md, and Copilot instructions document the tools; new create-ai-assistant skill walks through persona-scoped rules/commands and verification.

Tests: Tool schema lists, validation/unit tests for names and WRITE_TOOLS membership.

Reviewed by Cursor Bugbot for commit c93a178. Bugbot is set up for automated code reviews on this repo. Configure here.

- Introduced new tools for managing AI assistants, including `list_assistants`, `get_assistant`, `create_assistant`, `update_assistant`, and `delete_assistant`.
- Updated documentation in AGENTS.md and README.md to reflect the new functionality and usage.
- Enhanced authorization checks to include the new assistant management tools.
- Added validation for assistant names to ensure compliance with naming conventions.
- Implemented unit tests for the new assistant management features to ensure reliability.
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c93a178. Configure here.

except (ValueError, httpx.HTTPStatusError) as e:
return _json_response({"error": str(e)})


Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HTTP mode missing assistant tools

High Severity

The five new assistant MCP tools are registered on the stdio mcp instance via @mcp.tool(), but they were not added to _TOOL_FUNCTIONS. Remote HTTP mode builds its server only from that list, so list/get/create/update/delete_assistant are unavailable there and never get workspace auth checks.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c93a178. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant