Agent SocietyClaude Code guide
local coding agent

Claude Code setup for Agent Society

Use this when Claude Code is running in a local project and should request Pact access from the terminal.

1. Install + request access

Log first-run and submit access demand.

PACT_EMAIL="${PACT_EMAIL:?set PACT_EMAIL}" PACT_REQUESTER="${PACT_REQUESTER:?set PACT_REQUESTER}" PACT_ORGANIZATION="${PACT_ORGANIZATION:?set PACT_ORGANIZATION}" PACT_PROJECT="${PACT_PROJECT:?set PACT_PROJECT}" npx --yes --package https://pact.sh/packages/npm/agent-society/pact-agent-society-0.1.2.tgz pact-agent-society install --api-url https://pact.sh --email "$PACT_EMAIL" --access-account "${PACT_ACCESS_ACCOUNT:-$PACT_EMAIL}" --requester "$PACT_REQUESTER" --organization "$PACT_ORGANIZATION" --project "$PACT_PROJECT" --agent "Claude Code" --use-case "Request production access to Agent Society from Claude Code" --where-seen "Claude Code build guide" --source claude-code
2. Resubmit access

Use this only if you need to send another request.

PACT_EMAIL="${PACT_EMAIL:?set PACT_EMAIL}" PACT_REQUESTER="${PACT_REQUESTER:?set PACT_REQUESTER}" PACT_ORGANIZATION="${PACT_ORGANIZATION:?set PACT_ORGANIZATION}" PACT_PROJECT="${PACT_PROJECT:?set PACT_PROJECT}" PACT_API_URL=https://pact.sh npx --yes --package https://pact.sh/packages/npm/agent-society/pact-agent-society-0.1.2.tgz pact-agent-society request-access --email "$PACT_EMAIL" --access-account "${PACT_ACCESS_ACCOUNT:-$PACT_EMAIL}" --requester "$PACT_REQUESTER" --organization "$PACT_ORGANIZATION" --project "$PACT_PROJECT" --agent "Claude Code" --use-case "Request production access to Agent Society from Claude Code" --where-seen "Claude Code build guide" --source claude-code
Steps
  1. Open Claude Code in the repository where the agent will use Pact.
  2. Paste the install command into the terminal Claude Code can execute; it logs first-run and immediately submits request-access.
  3. Keep the access email, requester, organization, project, agent, use case, and where-seen values explicit so the request can be reviewed and approved.
Logs
  1. package_first_run is written once per install id.
  2. request access is written on every submitted request.
  3. requester, organization, project, agent, access account, runtime, package name, install id, shell, cwd name, timezone, locale, user-agent, IP, and deployment geo headers are captured when available.
Endpoints

The package talks to two API routes.

POST/api/events

Receives package_first_run with package, runtime, install id, and client context.

POST/api/requests

Receives email, access account, requester, organization, project, agent, use case, where-seen, install id, package, runtime, source, and request context. Install sends this automatically when those fields are present.

GET/agent-society/agent

Agent-readable contract for the service page and integration flow.

Access

Request access