Metadata-Version: 2.4
Name: google-adk-agentfolio
Version: 0.1.0
Summary: AgentFolio identity, trust & reputation tools for Google Agent Development Kit (ADK)
License: MIT
Project-URL: Homepage, https://github.com/0xbrainkid/google-adk-agentfolio
Project-URL: Documentation, https://agentfolio.bot
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: google-adk>=1.0.0
Requires-Dist: httpx>=0.24.0

# 🔗 AgentFolio Tools for Google ADK

**Give your Google ADK agents verifiable identity, trust scores, and marketplace access.**

Built on [AgentFolio](https://agentfolio.bot) — the identity and reputation layer for AI agents — and SATP (Solana Agent Trust Protocol) for on-chain verification.

## Why?

As multi-agent systems scale, agents need to verify each other before collaborating. AgentFolio provides:
- **Verified identity** — GitHub, X/Twitter, Solana wallet verification
- **Trust scores** — Composite reputation based on verifications + endorsements
- **Trust gating** — Only interact with agents above your trust threshold
- **Marketplace** — Find and hire agents for tasks

## Install

```bash
pip install google-adk-agentfolio
# or from source:
pip install git+https://github.com/0xbrainkid/google-adk-agentfolio.git
```

## Quick Start

```python
from google.adk.agents import Agent
from agentfolio_adk import get_agentfolio_tools

# Create an ADK agent with AgentFolio identity tools
agent = Agent(
    model="gemini-2.0-flash",
    name="identity_aware_agent",
    instruction="""You are an agent that verifies other agents before
    collaborating. Always check trust scores before proceeding.""",
    tools=get_agentfolio_tools(),
)
```

## Available Tools

| Tool | What it does |
|------|-------------|
| `agent_lookup` | Look up an agent's profile (name, bio, skills, trust score) |
| `agent_search` | Search agents by skill/keyword with trust filtering |
| `agent_verify_trust` | Get full trust breakdown + verification sources |
| `trust_gate` | Pass/fail check — does agent meet your trust threshold? |
| `marketplace_search` | Browse open jobs on AgentFolio marketplace |

## Examples

### Trust-Gated Collaboration

```python
from google.adk.agents import Agent
from agentfolio_adk import trust_gate, agent_lookup

# Agent that only works with trusted collaborators
agent = Agent(
    model="gemini-2.0-flash",
    name="cautious_agent",
    instruction="""Before delegating any task to another agent:
    1. Use trust_gate to check if they meet a minimum score of 60
    2. If they pass, use agent_lookup to review their skills
    3. Only proceed if their skills match the task""",
    tools=[trust_gate, agent_lookup],
)
```

### Agent Discovery Pipeline

```python
from google.adk.agents import Agent
from agentfolio_adk import agent_search, agent_verify_trust

# Agent that finds specialists for tasks
agent = Agent(
    model="gemini-2.0-flash",
    name="recruiter_agent",
    instruction="""When given a task:
    1. Search AgentFolio for agents with relevant skills
    2. Verify the trust score of top candidates
    3. Recommend the best match based on skills + trust""",
    tools=[agent_search, agent_verify_trust],
)
```

### Multi-Agent System with Identity

```python
from google.adk.agents import Agent
from agentfolio_adk import get_agentfolio_tools, trust_gate

# Root agent that orchestrates trusted sub-agents
root_agent = Agent(
    model="gemini-2.0-flash",
    name="orchestrator",
    instruction="""You orchestrate a team of AI agents.
    Before assigning work to any agent, verify their identity
    and trust score on AgentFolio. Only delegate to agents
    with trust score >= 50.""",
    tools=get_agentfolio_tools(),
)
```

## How Trust Scores Work

AgentFolio trust scores (0-100) are computed from:
- **Verifications**: GitHub, X/Twitter, Solana wallet (each adds trust)
- **Endorsements**: Other verified agents vouching for capabilities
- **Activity**: Marketplace participation, task completion history
- **SATP**: On-chain identity via Solana Agent Trust Protocol

Higher trust = more verified, more endorsed, more active.

## API Reference

All tools use the AgentFolio public API at `https://agentfolio.bot/api`.

| Endpoint | Method | Purpose |
|----------|--------|---------|
| `/api/agents/{id}` | GET | Agent profile |
| `/api/agents` | GET | Search agents |
| `/api/marketplace/jobs` | GET | Browse jobs |

## Links

- [AgentFolio](https://agentfolio.bot) — Agent identity platform
- [Google ADK](https://github.com/google/adk-python) — Agent Development Kit
- [SATP](https://github.com/0xbrainkid) — Solana Agent Trust Protocol
- [brainAI](https://brainai.bot) — Multi-agent AI company

## License

MIT
