Metadata-Version: 2.4
Name: osf-agentkit
Version: 0.1.1
Summary: Coinbase AgentKit action provider for OSF (Open Source Filings): provenance-stamped sanctions, entity, and CVE data for AI agents, paid per call over x402 (USDC on Base).
Project-URL: Homepage, https://api.osf-master-server.com
Project-URL: Source, https://github.com/onefreeman1337/osf-agentkit
Author: Corey Gallant
License: MIT
License-File: LICENSE
Keywords: agentkit,ai-agents,coinbase,cve,entity-resolution,kyb,kyc,ofac,provenance,sanctions,x402
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: coinbase-agentkit>=0.7.0
Requires-Dist: solana<0.40,>=0.36.6
Requires-Dist: x402<2.0.0,>=1.0.0
Description-Content-Type: text/markdown

# osf-agentkit

A [Coinbase AgentKit](https://github.com/coinbase/agentkit) action provider that gives AI agents three provenance-stamped "ground truth" tools, paid per call over [x402](https://docs.cdp.coinbase.com/x402) (USDC on Base):

| Action | Input | Returns | Price |
| --- | --- | --- | --- |
| `OSF_lookup_entity` | a company/person name or an identifier (NPI, LEI, FDIC cert, SEC CIK) | legal name, status, type, jurisdiction, identifiers, and a **provenance URL** to the official registry | $0.01 |
| `OSF_screen_entity` | a name | hit / no-hit against OFAC SDN, EU, and UK sanctions lists, with matched list, provenance URL, and an **audit receipt** | $0.05 |
| `OSF_check_cve_exploited` | a CVE id | CISA KEV actively-exploited status, EPSS score, CVSS severity, each with a **provenance URL** | $0.02 |

Every answer carries a link back to the authoritative primary source (US CMS NPI, GLEIF, FDIC, SEC EDGAR, OFAC, CISA), so an agent can **justify a decision to an auditor or regulator** instead of citing an opaque API. Payment is automatic and per-request: no API keys, no accounts, no subscriptions.

## Install

```bash
pip install osf-agentkit
```

## Quickstart (AgentKit)

Add the provider to your AgentKit config. The agent pays for each call from its own wallet, so you need an `EvmWalletProvider` funded with USDC on **Base mainnet**.

```python
from coinbase_agentkit import AgentKit, AgentKitConfig
from osf_agentkit import osf_action_provider

agent_kit = AgentKit(AgentKitConfig(
    wallet_provider=your_evm_wallet_provider,   # e.g. a CDP EVM wallet on base-mainnet
    action_providers=[
        osf_action_provider(),
        # ... your other providers
    ],
))
```

The agent now has `OSF_lookup_entity`, `OSF_screen_entity`, and `OSF_check_cve_exploited` available. See the [AgentKit docs](https://docs.cdp.coinbase.com/agent-kit/welcome) for wallet-provider setup.

## Use with LangChain

AgentKit actions convert to LangChain tools via the LangChain extension:

```bash
pip install coinbase-agentkit-langchain
```

```python
from coinbase_agentkit_langchain import get_langchain_tools

tools = get_langchain_tools(agent_kit)   # includes the three OSF tools
# pass `tools` to your LangChain / LangGraph agent
```

## Wallet, network, and spend caps

- **Network:** OSF settles on **Base mainnet** only. `supports_network` returns `False` for other networks, so the actions simply won't be offered off Base.
- **Funding:** the agent's wallet needs USDC on Base to pay per call.
- **Per-call spend ceilings** (atomic USDC, protective; the client refuses to pay more):
  - `lookup_entity` — $0.05
  - `screen_entity` — $0.15
  - `check_cve_exploited` — $0.10

  These sit above OSF's list prices so a small price change won't break calls, while capping runaway spend. If OSF ever reprices above a ceiling, bump the constants in `provider.py`.

## Configuration

Point the provider at a different base URL (e.g. for testing) if needed:

```python
osf_action_provider(base_url="https://api.osf-master-server.com/x402")
```

## How it works

Each action makes a single paid `GET` to the corresponding OSF endpoint using `x402_requests(wallet_provider.to_signer(), max_value=<cap>)`. When OSF replies `402 Payment Required`, the x402 client signs and settles the micropayment with the agent's wallet, then retries — all transparently. The action returns the JSON result plus the on-chain payment proof.

## About OSF

OSF (Open Source Filings) sells provenance-stamped US public-domain government and scientific data to autonomous agents over x402. Learn more at [api.osf-master-server.com](https://api.osf-master-server.com).

## License

MIT — see [LICENSE](LICENSE).
