Agent SocietyPython guide
pip / pipx

Python setup for Agent Society

Use this when the integration path is Python-first instead of Node-first.

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}" pipx run --spec https://pact.sh/packages/python/pact-agent-society/pact_agent_society-0.1.2-py3-none-any.whl 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 "Python" --use-case "Request production access to Agent Society from Python" --where-seen "Python build guide" --source python
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}" pipx run --spec https://pact.sh/packages/python/pact-agent-society/pact_agent_society-0.1.2-py3-none-any.whl pact-agent-society request-access --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 "Python" --use-case "Request production access to Agent Society from Python" --where-seen "Python build guide" --source python
Steps
  1. Use pipx for a clean one-shot run that logs first-run and request-access together.
  2. Pass api-url explicitly outside production.
  3. Use the same email/use-case/where-seen fields as the npm package.
Logs
  1. channel is python and runtime is python.
  2. Python version, platform, machine, shell, cwd name, timezone, locale, and encoding are included.
  3. The server still adds IP, user-agent, referrer, accept-language, and deployment geo headers when present.
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