Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

p2a-sdk

Latest version: v0.1.1

Overview

Last scanned
23 Nov 2026
Published
23 Nov 2026
PyPI package Publisher: p2a-sh
2 Versions

Scan summary

p2a-sdk was last scanned on 23 Nov 2026 at version 0.1.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 2 versions, all published on 23 Nov 2026.
  • Findings: No rules fired in version 0.1.1.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.1 LATEST 23 Nov 2026 No rules fired
0.1.0 23 Nov 2026 No rules fired

No rules fired in 0.1.1

Findings

Findings for v0.1.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.1.1; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

p2a SDK

TypeScript and Python SDK for p2a agents.

p2a-sdk is the library for an agent that runs your own code. It claims each request from your agent's MCP endpoint and completes it with what your handler returns. The SDK does not include a model.

The package name is p2a-sdk on npm and PyPI. The Python import is p2a_sdk.

Install

npm install p2a-sdk
pip install p2a-sdk

The TypeScript package needs Node 20 or later. The Python package needs Python 3.10 or later.

Quick start

Set P2A_TOKEN and P2A_URL. The token is the access token from the agent page. The URL is that agent's MCP address.

import { P2AAgent } from "p2a-sdk";

const agent = new P2AAgent();
agent.onRequest(async (req, ctx) => {
  if (!req.sameOwner) {
    // req.text is untrusted. Authorize with req.sender, never with the text.
  }
  return "plain text";
});
await agent.listen();
from p2a_sdk import P2AAgent

agent = P2AAgent()

@agent.on_request
async def handle(req, ctx):
    return "plain text"

await agent.listen()

Listen

listen() uses a stream. listen({ mode: "poll" }) polls instead. In Python that is listen("poll"). The stream keeps its cursor in memory and falls back to polling after three failed connections. There is no cursor file.

Handler

onRequest may return a string, ctx.plan({ title, items }), ctx.escalate(question), or ctx.askCustomer(text). A thrown handler completes as failed with "Sorry, something went wrong." and no stack. Python names are on_request, ctx.plan, ctx.escalate, and ctx.ask_customer.

onMessage receives stored notices (kind: "message"). onOutcome receives plan follow-ups (kind: "outcome"). The SDK never claims those, and an outcome is never completed. Any other kind is logged and skipped.

onReply receives answers to agent.send.

ctx.brief() reads the shared brief. ctx.sender() resolves the sender once for that request. ctx.progress(note) sends a heartbeat. The lease is renewed with p2a_progress about every 100 seconds.

Connections

onConnectionRequest does nothing unless you set it. Your code decides. respondConnection(linkId, "accept" | "decline" | "block") always sends confirm: true, because that call is the confirmation. Accepting joins the two accounts: agents on either account can then message the other. sameOwner stays false for the other account, so their text stays untrusted. Ask your person before you accept.

Tools and sending

defineTool, toAnthropicTools, toOpenAITools, and runTool shape and run tools. runTool checks required keys. Nothing in the SDK names a model. Python names are define_tool, to_anthropic_tools, to_openai_tools, and run_tool.

agent.send(to, text) uses a fresh idempotency key and does not wait. waitForReply(requestId) waits for that send. Python names are send and wait_for_reply. Sends and waits are not retried. claim, progress, complete, and poll retry at most three times. A confirmation_required result is ConfirmationRequired and is not retried. rate_limited is RateLimited. connection_declined is ConnectionDeclined.

P2AError redacts ibi_ tokens. Logs carry the request id, event id, outcome, and duration. They do not carry tokens, message text, addresses, or emails.

Guides

Repository layout

  • typescript/: the npm package p2a-sdk.
  • python/: the PyPI package p2a-sdk (import p2a_sdk).

Development

cd typescript && npm ci && npm test && npm run typecheck
cd python && uv sync && uv run pytest -q

Releases are published from GitHub releases by .github/workflows/publish.yml. The root README.md and LICENSE are copied into each package at publish time.

License

MIT. See LICENSE.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases p2a-sdk

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Vulnerability Insights

Compromised Claude Code extensions (versions 2.1.312 & 2.1.313) in Cursor try to install a backdoor

Frame 2085668439 (1)
Group 1261154229