Skip to main content

0rca Network SDK

PyPI version License: MIT

0rca Network SDK (orca-network-sdk) is a production-ready framework for building Sovereign, Monetizable, and Orchestrated AI Agents. It transforms standard AI agents (CrewAI, LangChain, Agno) into independent economic actors on the blockchain.

Every agent built with this SDK is paired with a Sovereign Vault (OrcaAgentVault.sol)—a dedicated smart contract that holds the agent's earnings and manages task escrows.

🚀 Key Features

  • Sovereign Vault Architecture: Each agent has its own on-chain Vault to receive payments and tasks.
  • Autonomous Monetization (x402): Built-in support for "Payment Required" flows.
  • TaskEscrow Integration: Agents can accept "Funded Tasks" (USDC locked in Vault) and automatically spend (claim) funds upon completion.
  • Sovereign Identity: Agents sign transactions with their own EVM identity key.
  • Multi-Backend support: Pluggable architecture for your favorite AI frameworks:

📦 Installation

pip install orca-network-sdk

🛠 Quick Start

1. Create your Agent

from orca_agent_sdk import OrcaAgent

# Initialize the Sovereign Agent
agent = OrcaAgent(
    name="MySovereignAgent",
    model="gpt-4",
    system_prompt="You are a helpful assistant.",
    
    # Financial Configuration
    price="0.1",       # 0.1 USDC per task
    wallet_address="0xYourWallet...", # Where you withdraw earnings to
    
    # Identity
    identity_wallet_path="agent_identity.json",
    
    # Vault (Optional - can be loaded from env AGENT_VAULT)
    vault_address="0xYourVaultAddress..." 
)

# Start the Agent Server
if __name__ == "__main__":
    agent.run(port=8000)

2. Fund a Task (Client Side)

Users (Orchestrators) interact with the agent by funding a task on its Vault.

# 1. User approves USDC to the Agent's Vault
# 2. User calls `createTask(taskId, amount)` on the Vault
# 3. User sends HTTP request to Agent with `X-TASK-ID`

3. Agent Execution (Server Side)

When the agent receives the request:

  1. It validates the tasks existence on-chain (or via x402 signatures).
  2. It executes the AI logic (CrewAI/Agno/etc).
  3. It calls spend(taskId, amount) on its Vault to claim the funds.

📜 Sovereign Agent Vault (OrcaAgentVault.sol)

The OrcaAgentVault is the financial heart of the agent.

  • createTask(bytes32 taskId, uint256 amount): Anyone can call this to lock USDC into the vault for a specific task.

  • spend(bytes32 taskId, uint256 amount): Only the Agent (via its private key) can call this to mark a task as complete and "claim" the funds into its internal balance.

  • withdraw(address recipient, uint256 amount): Only the Owner (Developer) can withdraw the claimed funds.

🧪 Development & Testing

Run the included test suite:

python -m unittest discover tests

📄 License

MIT License. See LICENSE for details.


Built with 💙 by 0rca Network

Metadata

Release files for orca-network-sdk 1.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for orca-network-sdk 1.0.9
File Size Uploaded Provenance Actions
orca_network_sdk-1.0.9.tar.gz 78.4 kB Without provenance Details for orca_network_sdk-1.0.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for orca-network-sdk 1.0.9
File Interpreter ABI Platform Actions
orca_network_sdk-1.0.9-py3-none-any.whl Python 3 none any Details for orca_network_sdk-1.0.9-py3-none-any.whl

Total release size: 166.5 kB

Release files / orca_network_sdk-1.0.9.tar.gz

Download URL orca_network_sdk-1.0.9.tar.gz
Size 78.4 kB
Tags Source
SHA-256 checksum
How to use checksums
481e9460e552c83ef9fc3d4a18682752d3b512f02cdb5ca63dd14caa88b51d9f
BLAKE2b-256 checksum
How to use checksums
90eb312c142cf133d06e9187b3fa658e9eed97e2b38c013ff8f4abdedbc9dabd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / orca_network_sdk-1.0.9-py3-none-any.whl

Download URL orca_network_sdk-1.0.9-py3-none-any.whl
Size 88.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d580a3f6850f20aed9fa132c54469a16427fa1f655e20af0191dabaf8eb581e9
BLAKE2b-256 checksum
How to use checksums
fec6dc9a3e780062757f3ddc1a5f5571ff16b65db0ea752ca85b780b2fe79827
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Security for orca-network-sdk 1.0.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page