Build agent workspaces
inside your product
Use the API, SDK, or CLI to create customer workspaces, register end users, generate hosted connect links, create custom MCP servers, issue scoped tokens, and give agents access to 1,000+ app integrations and 12,000+ agent tools.
Builder embed flow
Your product provisions the workspace. Weavz handles app access, MCP, and governed execution.
mcpEndpoint = "https://platform.weavz.io/mcp/srv_..."
token = "mcp_..."
aliases = ["customer_slack", "gmail", "files", "state"]Provision a workspace
Create one workspace for the customer, project, team, or agent environment you want to isolate. This is the boundary for credentials, integrations, state, approvals, and audit.
// Via SDK from your SaaS backend
const workspace = await client.workspaces.create({
name: "Acme Agent Workspace",
slug: "acme-agent-workspace",
});Add workspace integration aliases
Mount the apps and built-ins the agent should see. Aliases such as customer_slack, files, state, and browser become the names your harness and MCP tools use.
const { integration: customerSlack } =
await client.workspaces.addIntegration(workspace.id, {
integrationName: "slack",
alias: "customer_slack",
connectionStrategy: "per_user",
enabledActions: ["send_channel_message", "list_channels"],
});
await client.workspaces.addIntegration(workspace.id, {
integrationName: "storage",
alias: "files",
settings: { persistence: { scope: "workspace" } },
});Register users and generate connect links
Map your application user into Weavz, then send them a hosted connect URL for the integration account they own. Hosted Connect handles OAuth, API keys, and custom auth.
const { endUser } = await client.endUsers.create({
workspaceId: workspace.id,
externalId: "user_456",
displayName: "Alice Johnson",
});
const { connectUrl } =
await client.endUsers.createConnectToken(endUser.id, {
workspaceIntegrationId: customerSlack.id,
});
// Open connectUrl in your product onboarding flow.Create scoped agent access
Create a Tool Mode or Code Mode MCP server for agent clients, issue per-user bearer tokens, or call actions through the API, SDK, and CLI for backend jobs.
const { server, mcpEndpoint } =
await client.mcpServers.create({
name: "Acme Agent Tools",
workspaceId: workspace.id,
mode: "CODE",
authMode: "oauth_and_bearer",
endUserAccess: "restricted",
});
const { bearerToken } =
await client.mcpServers.createBearerToken(server.id, {
endUserId: endUser.id,
scopes: ["mcp:tools", "mcp:code"],
expiresIn: 60 * 60 * 24 * 30,
});Plug Weavz into your harness
Pass the MCP endpoint and token to your agent framework or custom runtime. The agent discovers customer_slack, files, state, browser, and other aliases through Code Mode.
{
"name": "weavz-acme",
"url": "https://platform.weavz.io/mcp/srv_...",
"headers": {
"Authorization": "Bearer mcp_..."
}
}Govern action execution
Human Gates, input defaults, approval links, durable state, files, triggers, and audit receipts stay attached to the workspace. Direct API or SDK action calls remain available for tests and backend jobs.
await client.actions.execute("slack", "send_channel_message", {
workspaceId: workspace.id,
integrationAlias: "customer_slack",
input: {
channel: "#general",
text: "Approved update from the agent.",
},
});Ready to get started?
Free plan includes 20,000 actions/month, 10 connections, and 25 MCP servers. No credit card required.