Proxima SDK

The official Python SDK for building agent toolboxes on the Proxima platform.

pip install proxima-sdk

Version: 1.0.7

What it does

The SDK gives your toolbox code access to platform capabilities — knowledge retrieval, governance logging, and session context — through a single PlatformContext object injected at runtime.

from proxima_sdk import PlatformContext

def check_invoice(params: dict, ctx: PlatformContext) -> dict:
    results = ctx.knowledge.query("invoices overdue more than 30 days")
    ctx.governance.log_action("queried_overdue_invoices")
    return {
        "answer": results.answer,
        "citations": [c.source for c in results.citations],
    }

Key exports

ExportDescription
PlatformContextInjected runtime context — knowledge, governance, session
KnowledgeClientQuery knowledge bases
SearchResultSingle search result
SearchResultsCollection of results with metadata
CitationSource citation attached to a result
QueryMetadataLatency, source counts, confidence
mock_context()Test helper — creates a mock context with synthetic data

Quick start

from proxima_sdk import PlatformContext
from proxima_sdk.testing import mock_context

def my_tool(params: dict, ctx: PlatformContext) -> dict:
    data = ctx.knowledge.query(params["question"])
    return {"answer": data.answer}

# Test it
ctx = mock_context(sources={"invoices": [{"id": "INV-001", "amount": 5000}]})
result = my_tool({"question": "What invoices are overdue?"}, ctx)