HomeInicio/Docs/Getting startedPrimeros pasos

Getting startedPrimeros pasos

Getting startedPrimeros pasos

Pacta is a marketplace where AI agents hire real-world businesses under contracts that enforce themselves - escrow holds the money, providers stake real collateral, and fulfillment is proven against official public registries. This page gets it running on your machine and walks the whole loop end to end.

Pacta es un marketplace donde agentes de IA contratan negocios del mundo real bajo pactos que se cumplen por diseño: el depósito en garantía retiene el dinero, los proveedores ponen colateral real y el cumplimiento se prueba contra registros públicos oficiales. Esta página lo pone a correr en tu máquina y recorre el ciclo completo de principio a fin.

This is a working proof of concept. The demo data - the Costa Rican firms, the money - is fictional; the mechanics behind it (the ledger, the state machine, staking, slashing, registry checks) are fully implemented and tested.
Es una prueba de concepto funcional. Los datos del demo - las empresas costarricenses, el dinero - son ficticios; la mecánica detrás (el libro contable, la máquina de estados, el staking, el slashing, la verificación de registros) está completamente implementada y probada.

RequirementsRequisitos

You need Node.js 22.5 or newer - Pacta uses the built-in node:sqlite module, so there is no database to install. No Docker, no external services, no API keys. The whole thing runs from one repository.

Necesitas Node.js 22.5 o superior - Pacta usa el módulo integrado node:sqlite, así que no hay base de datos que instalar. Sin Docker, sin servicios externos, sin llaves de API. Todo corre desde un solo repositorio.

Run it locallyCórrelo localmente

Install dependencies once, then start the full Pacta server with trust mechanics enabled:

Instala las dependencias una vez y luego arranca el servidor completo de Pacta con la mecánica de confianza activada:

npm install
npm run start:pacta   # Pacta with full trust mechanics
# open http://localhost:3220

The start:pacta server is Pacta proper: staking, escrow, slashing, and registry-anchored proof. Two other entry points are handy while you explore:

El servidor start:pacta es Pacta como tal: staking, garantía, slashing y prueba anclada a registros. Hay otros dos puntos de entrada útiles para explorar:

CommandComando What it startsQué arranca
npm run start:pacta Pacta with full trust mechanics - http://localhost:3220Pacta con la mecánica de confianza completa - http://localhost:3220
npm start Baseline marketplace, no staking - http://localhost:3210Marketplace base, sin staking - http://localhost:3210
npm run start:all Both servers at once, on both portsAmbos servidores a la vez, en ambos puertos

To confirm the mechanics hold, run the tests: npm test exercises 17 API tests against the ledger and state machine, and npm run test:e2e runs 11 Playwright tests through the dashboard.

Para confirmar que la mecánica se sostiene, corre las pruebas: npm test ejecuta 17 pruebas de API contra el libro contable y la máquina de estados, y npm run test:e2e corre 11 pruebas de Playwright a través del panel.

The three rolesLos tres roles

Every engagement on Pacta involves three parties. The web dashboard lets one human step into any of them; AI agents connect over MCP instead of clicking.

Cada engagement en Pacta involucra a tres partes. El panel web deja que una persona asuma cualquiera de ellas; los agentes de IA se conectan por MCP en lugar de hacer clic.

AgentAgente

The buyer. An AI agent (or a human standing in for one) that needs real-world work done, funds the escrow, and verifies the proof before releasing payment.

El comprador. Un agente de IA (o una persona que lo representa) que necesita trabajo del mundo real, financia la garantía y verifica la prueba antes de liberar el pago.

SMBNegocio

The provider. A small or medium business that stakes collateral to become vetted, accepts contracts, does the work, and submits registry-anchored proof.

El proveedor. Un negocio pequeño o mediano que pone colateral para volverse verificado, acepta contratos, hace el trabajo y presenta prueba anclada a registros.

ArbiterÁrbitro

The neutral. Called only when a delivery is disputed. Rules release, refund, or split - and that ruling is what decides whether a provider's stake gets slashed.

El neutral. Se invoca solo cuando una entrega se disputa. Falla liberación, reembolso o división - y ese fallo es lo que decide si el colateral del proveedor se recorta.

Agents drive Pacta programmatically through the Model Context Protocol. See MCP integration for the tool surface.

Los agentes operan Pacta de forma programática mediante el Model Context Protocol. Consulta Integración MCP para conocer las herramientas.

The lifecycleEl ciclo de vida

Every engagement moves through a fixed state machine enforced on the server - no client can skip a step or reorder it. Money only moves at the transitions the state machine allows.

Cada engagement recorre una máquina de estados fija impuesta en el servidor - ningún cliente puede saltarse un paso ni reordenarlo. El dinero solo se mueve en las transiciones que la máquina de estados permite.

draft  agreed  funded  in_progress  submitted  completed
                                                         disputed  resolved

draft → agreeddraft → agreed

Terms are proposed and both sides accept. This is where the provider's exposure cap is checked - an over-exposed provider cannot agree.

Se proponen los términos y ambas partes aceptan. Aquí se revisa el tope de exposición del proveedor - uno sobreexpuesto no puede aceptar.

funded → in_progressfunded → in_progress

The agent moves the price into a per-engagement escrow account. The work begins only against funded escrow.

El agente traslada el precio a una cuenta de garantía propia del engagement. El trabajo empieza solo con la garantía financiada.

submitted → completedsubmitted → completed

The provider submits proof; the agent verifies it and releases escrow. Payment lands and the volume counts toward the provider's proven track record.

El proveedor presenta la prueba; el agente la verifica y libera la garantía. El pago llega y el volumen cuenta para el historial probado del proveedor.

disputed → resolveddisputed → resolved

If the agent contests delivery, the arbiter rules. Release, refund, or split - and the stake is slashed accordingly.

Si el agente objeta la entrega, el árbitro falla. Liberación, reembolso o división - y el colateral se recorta según corresponda.

The trust modelEl modelo de confianza

Pacta does not verify that a provider is honest. It makes honesty the most profitable strategy and lets self-interest do the work. Three mechanisms carry it:

Pacta no verifica que un proveedor sea honesto. Hace que la honestidad sea la estrategia más rentable y deja que el interés propio haga el trabajo. Tres mecanismos lo sostienen:

StakeColateral

A provider posts real collateral to publish offers. "Vetted" stops meaning "someone reviewed it" and starts meaning "it has its own money bet on its performance." Vetted holds exactly while stake is above zero.

El proveedor pone colateral real para publicar ofertas. "Verificado" deja de significar "alguien lo revisó" y pasa a significar "tiene su propio dinero apostado a su desempeño". El estatus se mantiene mientras el colateral sea mayor que cero.

EscrowGarantía

The buyer's money moves into a per-engagement escrow account on a double-entry, integer-cents ledger - neither side can touch it until the work is verified, and money can never silently appear or vanish.

El dinero del comprador entra a una cuenta de garantía propia del engagement, sobre un libro de partida doble en centavos enteros - ninguna parte puede tocarlo hasta que el trabajo se verifique, y el dinero nunca puede aparecer ni desaparecer en silencio.

Registry proofPrueba de registro

Fulfillment steps can require a reference into an official public registry. The platform checks the record exists and its kind matches; the buying agent can re-verify independently before paying.

Los pasos de cumplimiento pueden exigir una referencia a un registro público oficial. La plataforma comprueba que el registro existe y que su tipo coincide; el agente comprador puede reverificar de forma independiente antes de pagar.

The stake is not just a deposit - it also sizes how much open work a provider is allowed to hold at once. A provider's exposure is capped relative to its stake and the volume it has already proven, so it can never hold more open value than it would hurt to lose.

El colateral no es solo un depósito - también dimensiona cuánto trabajo abierto puede sostener un proveedor a la vez. Su exposición se limita según su colateral y el volumen que ya ha probado, así que nunca puede sostener más valor abierto del que le dolería perder.

Losing a dispute slashes the stake in favor of the agent: 20% of the contract price on a full-refund ruling, 10% on a split, and 0% when the provider wins - always bounded by the remaining stake. A provider whose stake hits $0 loses vetted status automatically.

Perder una disputa recorta el colateral a favor del agente: 20% del precio del contrato si el fallo es reembolso total, 10% en una división y 0% cuando el proveedor gana - siempre acotado por el colateral restante. Un proveedor cuyo colateral llega a $0 pierde el estatus de verificado automáticamente.

Try the agent demoPrueba el demo del agente

Two commands run the whole loop autonomously - the agent shops, funds, verifies, and pays without a human in the loop. They are self-contained on port 3230 and start their own server.

Dos comandos corren el ciclo completo de forma autónoma - el agente compra, financia, verifica y paga sin humano en el circuito. Son autocontenidos en el puerto 3230 y arrancan su propio servidor.

npm run demo:agent          # scripted autonomous agent
npm run demo:agent:claude   # the same loop, driven by Claude

Each run ends with an independent audit of the ledger and state machine - it should report a clean 8/8.

Cada corrida termina con una auditoría independiente del libro contable y la máquina de estados - debe reportar un 8/8 limpio.

Next stepsSiguientes pasos

MCP integrationIntegración MCP

Wire your own AI agent into Pacta over the Model Context Protocol - the tools, the payloads, the verification flow.

Conecta tu propio agente de IA a Pacta sobre el Model Context Protocol - las herramientas, los payloads, el flujo de verificación.

Read the MCP guide →Leer la guía de MCP →

FAQ

Escrow, slashing numbers, why a provider would ever stake, what happens in a dispute - the short answers to the common questions.

Garantía, cifras de slashing, por qué un proveedor pondría colateral, qué pasa en una disputa - las respuestas cortas a lo que más se pregunta.

Read the FAQ →Leer las preguntas frecuentes →