Introduction & Quickstart
Relevant source files
The following files were used as context for generating this wiki page:
Speakeasy (formerly Gram) provides an AI control plane that centralizes the management, security, and observability of Model Context Protocol (MCP) servers, skills, and assistants. It enables organizations to scale AI usage by enforcing fine-grained permissions (RBAC), detecting threats, and tracking token costs and usage across popular AI providers like Claude, OpenAI, and Gemini.
Sources: README.md:1-26, CLAUDE.md:21-28
Project Architecture
The project is organized as a monorepo containing the backend server, frontend dashboard, CLI, and serverless function runner.
The diagram shows the high-level organization of the Speakeasy monorepo.
Sources: CLAUDE.md:30-49, ONBOARDING.md:3-5
Core Components
| Component | Technology | Purpose |
|---|---|---|
| Backend | Go, Goa | Implements HTTP-RPC API and core business logic. |
| Frontend | React, TypeScript | Provides the management dashboard and "Elements" chat interface. |
| Workflow Engine | Temporal | Manages background tasks and long-running processes. |
| Database | PostgreSQL, ClickHouse | Stores configuration (Postgres) and telemetry/logs (ClickHouse). |
| Local IDP | dev-idp (Go) | Emulates WorkOS for local identity and authentication. |
Sources: README.md:104-111, CONTRIBUTING.md:113-116, CLAUDE.md:52-78
Local Development Quickstart
To set up the development environment, you must have Mise and Docker installed.
1. Initial Setup
Run the initialization script until it succeeds. This script installs dependencies, generates TLS certificates, and prepares the environment.
./zero
Sources: CONTRIBUTING.md:3-8, README.md:90-94
2. Booting the Stack
Use mise to manage local services. The start task runs the pitchfork process manager, which orchestrates the server, worker, and dashboard.
mise run start
Sources: CLAUDE.md:82-88, CONTRIBUTING.md:144-145
3. Seeding Data
Populate your local environment with sample projects, agent sessions, and telemetry data.
mise seed
Sources: CONTRIBUTING.md:96-103, README.md:96-100
Development Workflow
Worktree Management
Speakeasy supports parallel worktrees via worktrunk. Each worktree runs an isolated stack with its own ports and database instances.
This diagram illustrates the automated flow when creating a new development worktree.
Sources: CONTRIBUTING.md:162-180, CLAUDE.md:7-14
Identity and Authentication
For local development, the system uses dev-idp. It provides a non-interactive login flow that identifies you based on your git config user.email.
| Configuration | Value | Description |
|---|---|---|
GRAM_DEVIDP_BACKEND | "local" | Uses the built-in emulator (Default). |
GRAM_DEVIDP_BACKEND | "workos" | Proxies calls to the real WorkOS API. |
GRAM_IDP_BASE_URL | http://localhost:35293 | Default local IDP endpoint. |
Sources: CONTRIBUTING.md:113-143
Technical Standards
Coding Conventions
- Error Handling: Use
fmt.Errorf("action: %w", err)for Go. Avoid "failed to" prefixes. - Database: Never write bare SQL in application code; use SQLc for Postgres and Squirrel for ClickHouse.
- Frontend: Use
@tanstack/react-queryfor server state. Avoid manualuseEffectfor data fetching. - Brand: Use "Speakeasy" in user-facing text. Avoid "Gram" except in internal variables/headers.
Sources: REVIEW.md:21-35, REVIEW.md:160-165, CLAUDE.md:16-19
Service Communication
The sequence shows the standard data flow for a request entering the Speakeasy system.
Sources: REVIEW.md:104-118, REVIEW.md:139-142