Skip to content

onefreeman1337/osf-agentkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

osf-agentkit

A Coinbase AgentKit action provider that gives AI agents three provenance-stamped "ground truth" tools, paid per call over 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

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.

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 for wallet-provider setup.

Use with LangChain

AgentKit actions convert to LangChain tools via the LangChain extension:

pip install coinbase-agentkit-langchain
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:

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.

License

MIT — see LICENSE.

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages