Inspiration

Buying professional services is rarely a simple checkout flow. Buyers often begin with an incomplete goal, refine requirements through conversation, wait for a quote, and then schedule a consultation. AI agents can accelerate this process, but consequential actions—such as submitting a lead or booking time—should remain under direct human control.

That tension inspired ClientWeave: an agent-native professional-services CPQ workspace where buyers and browser agents collaborate on the same scope, while the seller controls pricing and the buyer retains the final say.

What it does

ClientWeave creates a shared, attributed workspace for service discovery, scoping, pricing, and consultation booking.

A browser agent can:

  • Discover services relevant to the buyer’s goal
  • Create and update a structured scope
  • Calculate deterministic, seller-governed pricing
  • Find available consultation times
  • Finalize a confirmed lead or booking

Every scope change records whether it came from the buyer or the agent, making the process transparent and auditable.

The key safety boundary is intentionally simple: an agent cannot confirm an action on the buyer’s behalf. Before a lead is submitted or a consultation is booked, the buyer must directly confirm the exact current summary in the interface. If the scope or quote changes afterward, that confirmation becomes stale and finalization is rejected.

How we built it

ClientWeave is built with Next.js 16, React 19, TypeScript, Supabase, PostgreSQL, Drizzle ORM, Zod, and TanStack Query.

The application exposes six browser-native WebMCP tools:

  • discover_services
  • create_scope
  • update_scope
  • price_scope
  • find_consultation_slots
  • finalize_confirmed_scope

These tools are registered through document.modelContext.registerTool() with a compatibility fallback for older browsers. They use the same authenticated and audited HTTP boundaries as the regular user interface, so agent interactions do not bypass the application’s validation or security model.

The codebase separates deterministic domain rules from framework and infrastructure concerns. Pricing uses canonical inputs, versioned rules, integer minor units, and per-line rounding to ensure that the same scope always produces a reproducible quote.

Public scope links use restricted, expiring capabilities rather than owner-level access. We also added structured validation, origin checks, secure cookies, content security policies, rate limiting, redacted observability, audit events, and retention workflows.

Challenges we faced

The hardest challenge was designing collaboration without silently transferring authority from the person to the agent. Hiding a confirmation button from an agent was not enough; the server also needed to verify that a human directly confirmed the exact scope, quote, and intended action currently being finalized.

Another challenge was keeping state consistent across the visual interface, WebMCP tools, pricing engine, and database. An agent could update a scope while the buyer was reviewing it, so we needed freshness checks and clear invalidation rules to prevent stale quotes or confirmations from being used.

Designing safe public access was also demanding. Buyers should be able to participate without creating an account, but a private scope link must grant access to only one scope and must never provide workspace-owner privileges.

Finally, we wanted the agent experience to be reliable without depending on brittle DOM scraping. Creating narrow, well-described WebMCP tools—and ensuring they behaved exactly like the human-facing workflows—required careful contract and integration testing.

What we learned

We learned that agent-native software works best when agents receive structured capabilities rather than instructions to imitate clicks. WebMCP made the available actions explicit, typed, and easier to audit.

We also learned that human oversight should be enforced as a system invariant, not presented as a warning message. Direct confirmation, confirmation freshness, limited capabilities, and server-side authorization all work together to preserve meaningful human control.

Most importantly, attribution changes the quality of collaboration. When every change clearly shows whether it came from a person or an agent, users can review the process instead of merely trusting the final result.

What’s next

Next, we want to expand ClientWeave with richer seller-defined pricing rules, reusable scope templates, additional scheduling integrations, and collaborative comments. We also plan to explore approval policies for larger deals while preserving the same core principle: agents can help move work forward, but people remain responsible for consequential decisions.

Built With

Share this project:

Updates

Submission history