Marketplace Interop: External A2A as Tool Plugins
Problem
Three external projects have proposed agent-to-agent integrations with PraisonAI:
| Project |
Issue |
Pattern |
What it does |
| Pinchwork |
#1101 |
Delegate/Browse/Pickup/Deliver |
Agent marketplace β delegate tasks across frameworks |
| Joy Trust Network |
#1282 |
Trust score verification |
Trust verification layer before delegating to external agents |
| AgentID |
#1124 |
ECDSA P-256 certificates |
Cryptographic identity for cross-platform agent verification |
Currently there is no standard way to integrate these. Each would require custom code.
Design Principle
External A2A integrations are always Tools, never modifications to the Handoff core.
This keeps the core SDK lean and allows marketplace plugins to evolve independently.
Proposed Implementation
1. Pinchwork Marketplace Tool
from praisonaiagents import tool
@tool
def pinchwork_delegate(task: str, skills_required: list = None, budget: float = 0.0) -> str:
"""Delegate a task to the Pinchwork agent marketplace.
Args:
task: Description of the task to delegate
skills_required: List of required skills for the agent
budget: Maximum budget for the task
Returns:
Result from the marketplace agent that completed the task
"""
try:
import httpx
except ImportError:
raise ImportError("Install with: pip install praisonai-tools[pinchwork]")
# POST to Pinchwork API
response = httpx.post("https://api.pinchwork.com/delegate", json={
"task": task,
"skills": skills_required or [],
"budget": budget,
})
return response.json().get("result", "No result")
# Usage:
agent = Agent(
name="orchestrator",
tools=[pinchwork_delegate],
handoffs=[local_agent_b], # Mix local + remote
)
2. AgentID Verifier Hook
from praisonaiagents import tool
@tool
def verify_agent_identity(agent_url: str) -> dict:
"""Verify an external agent's identity using AgentID certificates.
Args:
agent_url: URL of the agent to verify
Returns:
Verification result with trust score and certificate details
"""
try:
import httpx
except ImportError:
raise ImportError("Install with: pip install praisonai-tools[agentid]")
response = httpx.get(f"https://getagentid.dev/api/verify?agent={agent_url}")
data = response.json()
return {
"verified": data.get("verified", False),
"trust_score": data.get("trust_score", 0),
"certificate": data.get("certificate_info", {}),
}
3. Joy Trust Network Score Check
@tool
def check_trust_score(agent_name: str) -> dict:
"""Check an agent's trust score on Joy Trust Network before delegation.
Args:
agent_name: Name/identifier of the agent to check
Returns:
Trust score and verification status
"""
try:
import httpx
except ImportError:
raise ImportError("Install with: pip install praisonai-tools[joy-trust]")
response = httpx.get(f"https://joy-connect.fly.dev/agents/discover?name={agent_name}")
return response.json()
4. Combined Usage Pattern
from praisonaiagents import Agent
agent = Agent(
name="secure_orchestrator",
instructions="Before delegating externally, always verify trust scores first.",
tools=[verify_agent_identity, check_trust_score, pinchwork_delegate],
handoffs=[local_researcher, local_writer], # Local agents via handoff
)
# Agent can now:
# 1. Use handoffs for local agent-to-agent (researcher, writer)
# 2. Use verify_agent_identity before trusting external agents
# 3. Use pinchwork_delegate to send tasks to marketplace
# 4. Use check_trust_score to verify trust before delegation
Where These Live
All three should be tool plugins in PraisonAI-Tools:
PraisonAI-Tools/praisonai_tools/
βββ marketplace/
β βββ __init__.py
β βββ pinchwork.py # pinchwork_delegate tool
β βββ agentid.py # verify_agent_identity tool
β βββ joy_trust.py # check_trust_score tool
Optional dependencies in pyproject.toml:
[project.optional-dependencies]
pinchwork = ["httpx>=0.24.0"]
agentid = ["httpx>=0.24.0"]
joy-trust = ["httpx>=0.24.0"]
marketplace = ["httpx>=0.24.0"] # all marketplace tools
Future: before_handoff Hook Event
For users who want automatic trust verification on every handoff (not just marketplace):
from praisonaiagents.hooks import add_hook
@add_hook("before_handoff")
def auto_verify_trust(event):
"""Automatically check trust before any handoff."""
if event.target_agent.is_remote:
score = check_trust_score(event.target_agent.name)
if score.get("trust_score", 0) < 0.5:
raise HandoffError(f"Agent {event.target_agent.name} has low trust score")
This requires adding a before_handoff event type to hooks/types.py β tracked separately.
Related Issues
Acceptance Criteria
Marketplace Interop: External A2A as Tool Plugins
Problem
Three external projects have proposed agent-to-agent integrations with PraisonAI:
Currently there is no standard way to integrate these. Each would require custom code.
Design Principle
This keeps the core SDK lean and allows marketplace plugins to evolve independently.
Proposed Implementation
1. Pinchwork Marketplace Tool
2. AgentID Verifier Hook
3. Joy Trust Network Score Check
4. Combined Usage Pattern
Where These Live
All three should be tool plugins in
PraisonAI-Tools:Optional dependencies in
pyproject.toml:Future:
before_handoffHook EventFor users who want automatic trust verification on every handoff (not just marketplace):
This requires adding a
before_handoffevent type tohooks/types.pyβ tracked separately.Related Issues
Acceptance Criteria
pinchwork_delegatetool implemented in PraisonAI-Toolsverify_agent_identitytool implemented in PraisonAI-Toolscheck_trust_scoretool implemented in PraisonAI-Tools