Wacht Documentation

website·Indexed 31 days ago

https://wacht.dev/docs/sdks/nextjs/quickstart

An open source infrastructure for building AI-native applications. Features an agent runtime, task management via the /task/ filesystem, and a structured handoff process using deliverables and journals, with SDKs for Backend JS and TanStack Router.

Tokens
3.1K
Snippets
2
Records
33
Agent score
61%

What's inside Wacht

  1. Wacht API Reference Overview

    Wacht exposes several API surfaces:

    • Backend API: Server-to-server management for users, organizations, auth config, and deployment settings.
    • Frontend API: Runtime HTTP API for session management, auth flows, and user operations used by SDKs.
    • Agent Runtime API: Object hierarchy and verbs for controlling the Wacht agent runtime from code.
  2. Use the Wacht Rust SDK

    The Wacht Rust SDK (via the wacht crate) allows developers to interact with the Wacht backend. Key capabilities include:

    • User Management: Admin operations for sessions, passkeys, MFA, and memberships.
    • B2B Operations: Management of Organizations and Workspaces.
    • Auth: API authentication and OAuth management.
    • Webhooks: Management of apps, event catalogs, endpoints, and deliveries.
    • AI Runtime: Management of agents, tools, knowledge bases, MCP servers, projects, and threads.
    • Axum Integration: Support for AuthLayer, typed extractors for permission-gated handlers, and gateway authorization for API keys/OAuth.
  3. Use the Wacht Backend JS SDK

    The @wacht/backend SDK provides universal JavaScript and TypeScript access to Wacht APIs, authentication helpers, and gateway checks. It is compatible across multiple runtimes including Node.js, Deno, Bun, serverless functions, and edge workers.
  4. Wacht product overview

    Wacht is an open-source stack for building AI-native applications. It provides a unified product on a shared user model that replaces multiple disparate vendors. Key capabilities include:

    • Identity & Authentication
    • B2B Multitenancy
    • Machine Authentication
    • Webhooks and Notifications
    • AI Agent Runtime with sandboxed compute
  5. Wacht product overview

    Wacht is an open-source stack designed for building AI-native applications. It provides a unified product on a shared user model that replaces the need for separate vendors for identity & auth, B2B multitenancy, machine auth, webhooks, notifications, and an AI agent runtime (including sandboxed compute).
  6. Implement Customer-Managed API Key Authentication

    Wacht provides infrastructure for customer-managed API keys, including lifecycle management, auditing, analytics, and support for custom or vanity UX implementations. Developers can use Wacht hooks and backend policy checks to build production-ready management interfaces.
  7. Request a refund for Wacht subscriptions

    First-time subscribers to a paid Wacht plan are eligible for a full refund of their initial subscription fee if requested within fourteen (14) days of the first successful charge. To be eligible, the account must be in good standing and not in breach of the Terms.

    Refunds are NOT available for:

    • Subscription renewal charges
    • Upgrades, add-ons, overage charges, or usage-based fees
    • Custom professional services (implementation, migration, onboarding)
    • Accounts terminated for breach of Terms

    To request a refund, email engineering@intellinesia.com or support@wacht.dev with the following details:

    1. The account email address
    2. The invoice or order number
    3. A brief reason for the request
  8. Build and Manage Wacht Agents

    Wacht provides a comprehensive system for AI agents:

    • Orchestration: Route work across specialist agents using a coordinator.
    • Configuration: Override strong/weak models per agent and define tool approval policies (unattended, review, or denied).
    • Extensibility: Create Python tools via CodeRunner for sandbox execution or upload agent skill bundles via backend SDKs.
    • Automation: Schedule agent tasks for specific times or recurring intervals.
    • Integrations: Connect agents to third-party SaaS apps via Composio.
    • Lifecycle: Use execution hooks to trigger tool steps at the start or end of an agent's run.
  9. Use the Wacht Agents Platform

    The agents platform is included in all Wacht plans. Users must provide their own LLM API keys and storage (BYOK + BYO storage). During the beta period, sandbox compute is free; however, it will be metered in the future. Note that API key management for agents is only available on the Growth and Enterprise plans.
  10. Synchronize backend via Deployment Events

    Wacht provides deployment events via a webhook envelope contract to keep external backends in sync with platform changes.
  11. Integrate Wacht Backend JS with Bun, Deno, and Hono

    Wacht provides specific patterns for modern JS runtimes:

    • Bun: Support for Bun servers and background jobs, including protecting Request handlers and patterns for Elysia and Hono using JWT, API keys, or OAuth.
    • Deno: Support for Deno services with typed API access and patterns for Oak, Fresh, and Hono using JWT, API keys, or OAuth.
    • Hono: Cross-runtime support (Node and Edge) with reusable auth middleware and permission checks.
  12. Build a Notification System with Wacht

    Wacht's notification system handles scoped, severity-tagged messages through a read/archive/expiry lifecycle. Implementation patterns include:

    • Backend: Publishing notifications from domain events with stable metadata and CTAs.
    • Frontend: Building inboxes with pagination, scoped filters, and mutation actions using hooks.
    • Realtime: Handling notification streaming with reconnect and API reconciliation.