Skip to content

Agentic IPC

What is Puruto IPC?

Puruto’s agentic IPC (Inter-Process Communication) allows one Puruto to delegate tasks to another Puruto in a controlled and traceable way.

One Puruto can tell another: “execute this action with this prompt” — and receive a structured response.

How to generate it

Ventana de terminal
python3 .claude/skills/puruto-generator/scripts/generate.py \
--name puruto-reservations \
--description "Reservation management" \
--ipc true

This generates in the repo:

  • .claude/skills/call/SKILL.md/call skill to invoke other Purutos
  • .puruto-ipc.json — allowlists and delegation limits
  • ipc.py — emits InvocationRequest and receives InvocationResult
  • invoker.py — local invoker scaffold

Contracts

InvocationRequest

{
"request_id": "req-20260224-001",
"correlation_id": "corr-20260224-001",
"caller": "puruto-reservations",
"target": "puruto-finance",
"action": "pay_invoice",
"prompt": "Pay invoice #123 for 50 EUR",
"timeout_sec": 120,
"hop": 0
}
FieldDescription
request_idUnique identifier for this request
correlation_idShared trace for chained calls
callerPuruto initiating the invocation
targetTarget Puruto
actionLogical name of the action
promptOperative prompt to be executed by the target
timeout_secTimeout in seconds
hopDelegation depth (0 = first call)

InvocationResult

Successful response:

{
"request_id": "req-20260224-001",
"correlation_id": "corr-20260224-001",
"status": "ok",
"duration_ms": 824,
"result": {
"summary": "Invoice #123 paid"
}
}

Error response:

{
"request_id": "req-20260224-001",
"correlation_id": "corr-20260224-001",
"status": "error",
"duration_ms": 15,
"error": {
"code": "DENIED",
"message": "Target not in allowlist",
"details": null
}
}

Error codes

CodeDescription
TARGET_NOT_FOUNDTarget Puruto doesn’t exist or isn’t available
DENIEDTarget is not in the allowed_targets allowlist
TIMEOUTExecution exceeded timeout_sec
INVALID_RESPONSETarget didn’t return a valid InvocationResult

Configuration: .puruto-ipc.json

{
"allowed_targets": ["puruto-finance", "puruto-data"],
"allowed_actions": {
"puruto-finance": ["pay_invoice", "check_balance"],
"puruto-data": ["read", "write"]
},
"max_hops": 3,
"default_timeout_sec": 120
}
FieldDescription
allowed_targetsList of Purutos that can be delegated to
allowed_actionsOptional map target → allowed actions
max_hopsMaximum delegation depth (prevents loops)
default_timeout_secDefault timeout for invocations

The /call skill

/call puruto-finance pay_invoice "Pay invoice #123 for 50 EUR"

The /call skill builds the InvocationRequest, validates that the target is in the allowlist, invokes the target Puruto and returns the InvocationResult.

Security and limits

  • Never delegate to a Puruto not in allowed_targets
  • The max_hops field prevents circular delegations
  • If hop reaches max_hops, the Puruto rejects the invocation with DENIED
  • Secrets never pass through InvocationRequest — use puruto-data to share sensitive data