> ## Documentation Index
> Fetch the complete documentation index at: https://docs.guild.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To act on a user's behalf in Guild, use the Guild REST API at https://api.guild.ai/v1.
> The OpenAPI spec is unauthenticated: https://docs.guild.ai/openapi.json (or openapi.yaml).
> Authenticate with an account API key, sent as HTTP Basic (key id as username, secret as password) or as `Authorization: Bearer <api_key_id>:<api_key_secret>`. See https://docs.guild.ai/api-reference/introduction#authentication.
> To run one agent on demand without account-wide access, use an API trigger instead: https://docs.guild.ai/platform/api-triggers.
> To act on Guild from an MCP client, connect to https://api.guild.ai/mcp (OAuth) or run `guild mcp` locally. Setup: https://docs.guild.ai/api-reference/mcp.
> To search these docs from an MCP client, connect to https://docs.guild.ai/mcp. The full page index is https://docs.guild.ai/llms.txt.

# Manage Convex projects and deployments from Guild agents

> Give Guild agents governed access to Convex: create projects, manage deployments, control team roles, rotate tokens, and review audit logs.

Integrations · Convex

A Guild agent can create, configure, and tear down Convex projects and deployments, manage team membership and roles, rotate access tokens, and review audit logs without any human clicking through the Convex dashboard. Guild stores the API key server-side and injects it into every request, so agent code never sees the credential. Credential policies let you restrict exactly which Convex operations each agent may call, and every action appears in Guild's audit trail.

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use Convex.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect Convex to your first agent.

## What the Convex integration exposes

The integration provides tools that cover Convex projects, deployments (production, preview, and dev), team members, roles, deploy keys, personal and team access tokens, custom domains, default environment variables, and audit log events. Tools follow the `convex_` prefix convention and are imported from the `guildai~convex` package as `ConvexTools`. Use [`pick()`](https://docs.guild.ai/sdk/tools#selecting-specific-tools) to give an agent only the subset of tools it needs.

## How it works

**1. Connect your Convex credential**

In Guild, go to **Access & setup > Credentials**, click **Connect**, select **convex**, and paste your Convex API key into the **API Key** field. Guild sends the key as a bearer token in the `Authorization` header on every request.

**2. Scope the credential**

By default the credential serves every workspace the account owns. Follow [Credentials](https://docs.guild.ai/platform/credentials.md) to narrow it to one workspace, one member, or a single agent.

**3. Add tools to your agent**

Import `ConvexTools` from `@guildai-services/guildai~convex` and spread it into your agent's `tools` object. Use [`pick()`](https://docs.guild.ai/sdk/tools#selecting-specific-tools) to include only the tools your agent needs.

## Why Convex access needs governing

Convex tools can delete projects and deployments, rotate team access tokens, change member roles, and modify production environment variables. An agent acting on a broad credential could make irreversible changes across every project a team owns. [Credential policies](https://docs.guild.ai/platform/credential-policies.md) let you write ALLOW and DENY rules that Guild's credential proxy enforces before any request reaches Convex. You can restrict an agent to read-only audit log review with `convex_list_audit_log_events`, or allow deployment creation while blocking deletion with a targeted DENY on `convex_delete_*` operations.

Guild stores the Convex API key server-side and injects it only after the policy check passes, so agent code never sees the secret. You can scope a credential to one workspace, one member, or one agent using [Credentials](https://docs.guild.ai/platform/credentials.md), which limits blast radius further. Every call the proxy forwards appears in Guild's audit trail. Agents without a matching credential or a passing policy receive an immediate denial rather than a degraded response.

## About the Convex integration

Agents can create, configure, and delete Convex projects and deployments, including production and preview environments. They can manage team members, roles, access tokens, and deploy keys. Agents can also handle custom domains, environment variables, and audit log review. The integration is `guildai~convex`.

## Authentication

* **Type:** API key
* **Header:** Guild sends the key as a bearer token in the `Authorization` header

### Setup

**1. Connect Convex**

In Guild, go to **Access & setup > Credentials**, click **Connect**, select **convex**, and paste the key into **API Key**.

See [Credentials](https://docs.guild.ai/platform/credentials.md) for workspace, member, and agent-scoped credentials.

## Usage

```typescript theme={null}
import { ConvexTools } from "@guildai-services/guildai~convex"
import { llmAgent } from "@guildai/agents-sdk"

export default llmAgent({
  systemPrompt: "You work with Convex.",
  tools: { ...ConvexTools },
})
```

### Selecting specific tools

Tools are named with the `convex_` prefix. Use [`pick()`](https://docs.guild.ai/sdk/tools#selecting-specific-tools) to include only what your agent needs.

## Tools

Tools in the latest published version of `guildai~convex`:

> [accordion] All 49 tools
>
> | Tool | What it does |
> | - | - |
> | `convex_cancel_team_member_invite` | Cancel a pending team invitation |
> | `convex_create_custom_domain` | Create custom domain |
> | `convex_create_custom_role` | Creates a new custom role for the team with the specified name, description, and permission statements. |
> | `convex_create_deploy_key` | Create a deploy key like "dev:happy-animal-123\|ey..." which can be used with the Convex CLI to develop against or deploy code. |
> | `convex_create_deployment` | Create a new deployment for a project. |
> | `convex_create_personal_access_token` | Creates a new personal access token for the authenticated user. |
> | `convex_create_preview_deploy_key` | Create a preview deploy key like "preview:team-slug:project-slug\|ey..." which can be used with the Convex CLI to create and manage preview deployments within the project. |
> | `convex_create_project` | Create a new project on a team, optionally provisioning a dev or prod deployment. |
> | `convex_create_team` | This endpoint is not publicly accessible. |
> | `convex_create_team_access_token` | Create a team access token |
> | `convex_delete_custom_domain` | Remove a custom domain from a deployment. |
> | `convex_delete_custom_role` | Deletes a custom role from the team. |
> | `convex_delete_deploy_key` | Deletes a deploy key for the specified deployment. |
> | `convex_delete_deployment` | Delete a deployment. |
> | `convex_delete_personal_access_token` | Deletes a personal access token for the authenticated user. |
> | `convex_delete_preview_deploy_key` | Deletes a preview deploy key for the specified project. |
> | `convex_delete_project` | Delete a project. |
> | `convex_delete_team_access_token` | Deletes a team access token, identified by its secret value or name. |
> | `convex_get_deployment_in_project_by_project_id` | Get a deployment within a project by reference, default production deployment, or default dev deployment for the calling user. |
> | `convex_get_deployment_in_project_by_project_slug` | Get a deployment within a project identified by team and project slug, by reference, default production deployment, or default dev deployment for the calling user. |
> | `convex_get_project_by_id` | Get a project by its ID. |
> | `convex_get_project_by_slug` | Get a project by its slug. |
> | `convex_get_token_details` | Returns the team ID for team tokens. |
> | `convex_invite_team_member` | Invite a member to the given team by email. 'role' is required and must be one of 'admin', 'developer', or 'custom'. |
> | `convex_list_audit_log_events` | List a team's audit log events within a time range, with optional filters. |
> | `convex_list_custom_domains` | Get all custom domains configured for a deployment. |
> | `convex_list_custom_roles` | Lists all custom roles for the team with cursor-based pagination. |
> | `convex_list_default_environment_variables` | Lists all default environment variables for the specified project, with optional filtering by name and deployment type. |
> | `convex_list_deploy_keys` | Lists all deploy keys for the specified deployment. |
> | `convex_list_deployment_classes` | Lists the available deployment classes for a team. |
> | `convex_list_deployment_regions` | Lists the available deployment regions for a team. |
> | `convex_list_deployments` | List deployments for a projects. |
> | `convex_list_deployments_for_team` | Lists deployments for a team with pagination, sorting, and filtering. |
> | `convex_list_local_deployments_for_team` | Lists the local deployments for a team. |
> | `convex_list_pending_team_invites` | List the pending invitations for the given team. |
> | `convex_list_personal_access_tokens` | Lists all personal access tokens for the authenticated user. |
> | `convex_list_preview_deploy_keys` | Lists all preview deploy keys for the specified project. |
> | `convex_list_projects` | List a page of projects for a team, ordered by descending project ID. |
> | `convex_list_project_tags` | List a page of the distinct tags used by a team's projects, ordered by tag name. |
> | `convex_list_team_access_tokens` | Lists the team access tokens created by the authenticated member for the given team. |
> | `convex_list_team_members` | List the members of the given team. |
> | `convex_mint_ai_gateway_jwt` | Mints a short-lived AI gateway JWT for a local deployment. |
> | `convex_platform_get_deployment` | Get details about a cloud deployment. |
> | `convex_transfer_deployment` | Transfer a deployment from its current project to another project within the same team. |
> | `convex_update_custom_role` | Updates an existing custom role's name, description, and permission statements. |
> | `convex_update_default_environment_variables` | Creates, updates, or deletes default environment variables for the specified project. |
> | `convex_update_deployment` | Updates properties of an existing deployment. |
> | `convex_update_project` | Update a project's name, slug, and/or tags. |
> | `convex_update_team_member_role` | Sets either the member's built-in 'role' (admin/developer) or their 'customRoles'. |

## Frequently asked questions

> [accordion] Can an agent create a preview deployment and set its environment variables in one run?
>
> Yes. The agent can call `convex_create_deployment` to create a preview deployment, then call `convex_update_default_environment_variables` to create, update, or delete the default environment variables for that deployment, all within the same run.

> [accordion] Can I stop an agent from deleting Convex projects while still letting it create them?
>
> Yes. Write a DENY rule targeting `convex_delete_project` (or the pattern `convex_delete_*`) alongside an ALLOW rule for the operations you want to permit. Guild's credential proxy enforces DENY rules before any ALLOW, so the deletion call is blocked even if a broader allow rule matches. See [Credential policies](https://docs.guild.ai/platform/credential-policies.md) for the syntax.

> [accordion] Does the integration receive webhook events from Convex?
>
> No. The catalog entry for `guildai~convex` lists no webhook events, so the integration does not receive push notifications from Convex. Agents poll by calling list or get tools directly.

> [accordion] Can I give one agent access to Convex without sharing that credential with other agents in my workspace?
>
> Yes. Connect a dedicated credential from the installed agent's detail page and choose **Dedicated to this agent**. Guild stores it under the account that owns the workspace and never offers it to other agents. See [Credentials](https://docs.guild.ai/platform/credentials.md) for the full scoping options.

## Put a governed agent on Convex this week

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use Convex.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect Convex to your first agent.

## Related

**Also runs on Guild:** [Azure DevOps](https://docs.guild.ai/integrations/azure-devops.md) · [Bitbucket](https://docs.guild.ai/integrations/bitbucket.md) · [Buildkite](https://docs.guild.ai/integrations/buildkite.md) · [Cursor](https://docs.guild.ai/integrations/cursor-cloud-agents.md)

**Read:** Docs: [Credential policies](https://docs.guild.ai/platform/credential-policies.md) · [Credentials](https://docs.guild.ai/platform/credentials.md) · [Tools in agents](https://docs.guild.ai/sdk/tools.md)
