Skip to main content

SDK for building agents that run within Sage Sanctum infrastructure

Project description

Sage Sanctum Agent SDK

SDK for building agents that run within the Sage Sanctum secure multi-agent execution platform.

Features

  • SPIFFE Authentication - Automatic JWT SVID management for agent identity
  • Transaction Tokens (TraT) - IETF-standard authorization for scoped transactions
  • LLM Gateway Integration - Route LLM calls through authenticated, policy-enforced gateways
  • Multi-Provider Support - OpenAI, Anthropic, and Google via unified interface
  • SARIF Output - Standard static analysis output format for GitHub Code Scanning
  • Testing Utilities - Mock gateway, LLM, and TraT clients for unit testing

Quick Start

from sage_sanctum import AgentContext, AgentRunner, SageSanctumAgent, AgentResult
from sage_sanctum.io.inputs import AgentInput, RepositoryInput
from sage_sanctum.io.outputs import SarifOutput, Finding, Location
from sage_sanctum.llm.model_category import ModelCategory


class MySecurityAgent(SageSanctumAgent):
    @property
    def name(self) -> str:
        return "my-security-agent"

    @property
    def version(self) -> str:
        return "0.1.0"

    async def run(self, agent_input: AgentInput) -> AgentResult:
        # Get an LLM client for analysis
        llm = self.context.create_llm_client(ModelCategory.ANALYSIS)

        # Your agent logic here...
        response = llm.invoke([...])

        return AgentResult(
            output=SarifOutput(
                tool_name=self.name,
                tool_version=self.version,
                findings=[...],
            ),
            exit_code=0,
        )


# Entry point
if __name__ == "__main__":
    import sys
    sys.exit(AgentRunner(MySecurityAgent).run())

Installation

pip install sage-sanctum-sdk

Architecture

Agents run in isolated containers with no direct network access. All external communication (LLM calls, MCP tools, packages) flows through authenticated gateways:

Agent Pod (seccomp: no AF_INET)
  └── Agent SDK
       ├── SPIFFE JWT (identity)
       ├── Transaction Token (authorization)
       └── Gateway Client (Unix socket)
            └── LLM Gateway → OpenAI / Anthropic / Google

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sage_sanctum_sdk-0.4.0.tar.gz (75.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sage_sanctum_sdk-0.4.0-py3-none-any.whl (46.2 kB view details)

Uploaded Python 3

File details

Details for the file sage_sanctum_sdk-0.4.0.tar.gz.

File metadata

  • Download URL: sage_sanctum_sdk-0.4.0.tar.gz
  • Upload date:
  • Size: 75.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sage_sanctum_sdk-0.4.0.tar.gz
Algorithm Hash digest
SHA256 dda3a0d1c426b76e3a968dac0a7c47e8dbdc137941628c33d08b3565d00b5abc
MD5 71a04be01c673f5230eb9ec891c4c54b
BLAKE2b-256 23d51da726c57b3ec5a47b653d74d1f0b1a36da0a7ebf9e791b83066f3abbff8

See more details on using hashes here.

File details

Details for the file sage_sanctum_sdk-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sage_sanctum_sdk-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ab37fba74e7d0aeb7f20a85c6ecbb4555b2b36770c2e97895b11d213e5da8ea9
MD5 3e7791e3f8c4d00b3bfaef595de60404
BLAKE2b-256 ed3a4f501e1b5d8632206145924f0402541d6e21dfde75b2e15e456c2f275429

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page