Terraform Two-Sided Marketplace

A two-sided market modelled the way a recruitment agency works: two agents, one per side - a Talent Partner that works for candidates and a Client Partner that works for hiring companies - over a shared external matching engine they reach with the fetch action.

terraform
infrastructure-as-code
two-sided-marketplace
1098

This example models a two-sided market the way a recruitment agency works: one side has people to place, the other has roles to fill, and the market clears between them. It deploys two agents, one per side - a Talent Partner that works for candidates, and a Client Partner that works for hiring companies.

The matching engine stays out of the agents. The role index, talent pool, submissions, and the placement fee live in your own marketplace service, and both agents reach it with the fetch action. ChatBotKit is the conversational and identity tier on each side; your API is the shared system of record. This is the right division for a marketplace: the proprietary logic and the money stay in a service you control, and the agents are thin clients over it.

The two agents never talk to each other. They have opposite loyalties, so they meet only through shared state. The Talent Partner submits a candidate into a role; that submission surfaces in the Client Partner's review queue; the Client Partner advances it to interview, offer, or placement. The advance is a deterministic server-side transaction - the agent requests it, the API decides and records it - which keeps consent, auditability, and billing in the core.

Identity uses one shared gateway token plus a personal OAuth secret per side. Both desks present the same shared service token to get past the marketplace gateway, so the core sees one stable caller. Each desk attributes actions to a different human - the candidate on one side, the employer contact on the other - through its own personal OAuth secret, so the core enforces what that person may see and do.

This is the pattern for any two-sided product - hiring, freelance work, lending, rentals, B2B procurement - where supply and demand each deserve their own agent and the matching belongs to a service both sides share.

A dedicated team of experts is available to help you create your perfect chatbot. Reach out via or chat for more information.