Stigmer Python SDK — typed API client for all Stigmer platform resources
Project description
stigmer
Python SDK for the Stigmer platform. Provides typed API clients for all Stigmer resources with authentication, error handling, and cross-resource search.
Installation
pip install stigmer
stigmer-protos (generated protobuf stubs) is installed automatically as a dependency.
Quick Start
from stigmer import StigmerClient, AgentInput
with StigmerClient("sk_live_abc123") as client:
agent = client.agents.create(AgentInput(name="my-agent", org="my-org"))
print(agent.metadata.name)
Or without a context manager:
client = StigmerClient("sk_live_abc123")
agent = client.agents.get("agent-id")
client.close()
Resource Clients
Every resource type has a typed client accessible as a property on StigmerClient:
| Property | Resource |
|---|---|
agents |
Agent |
agent_executions |
AgentExecution |
agent_instances |
AgentInstance |
api_keys |
ApiKey |
environments |
Environment |
execution_contexts |
ExecutionContext |
iam_policies |
IamPolicy |
identity_accounts |
IdentityAccount |
identity_providers |
IdentityProvider |
mcp_servers |
McpServer |
organizations |
Organization |
projects |
Project |
sessions |
Session |
skills |
Skill |
workflows |
Workflow |
workflow_executions |
WorkflowExecution |
workflow_instances |
WorkflowInstance |
search |
Cross-resource search |
Common Operations
from stigmer import StigmerClient, AgentInput, ListParams, ResourceRef, Page
with StigmerClient("sk_live_abc123") as client:
# Create
agent = client.agents.create(AgentInput(
name="my-agent",
org="my-org",
description="Handles customer inquiries",
instructions="Be helpful and concise.",
))
# Get by ID
agent = client.agents.get("agent-id")
# Get by reference (org + slug)
agent = client.agents.get_by_reference(ResourceRef(org="my-org", slug="my-agent"))
# Update
updated = client.agents.update(AgentInput(
name="my-agent",
org="my-org",
description="Updated description",
))
# Delete
deleted = client.agents.delete("agent-id")
# List (search-backed)
results = client.agents.list(ListParams(
org="my-org",
query="customer",
page=Page(num=1, size=20),
))
Cross-Resource Search
from stigmer import StigmerClient, ApiResourceKind, SearchParams
with StigmerClient("sk_live_abc123") as client:
results = client.search.query(SearchParams(
kinds=[ApiResourceKind.agent, ApiResourceKind.skill],
org="my-org",
query="customer support",
))
Error Handling
All SDK operations raise StigmerError with structured error codes:
from stigmer import StigmerClient, StigmerError, is_not_found, is_retryable
with StigmerClient("sk_live_abc123") as client:
try:
agent = client.agents.get("nonexistent")
except StigmerError as err:
if is_not_found(err):
print("Agent not found")
elif is_retryable(err):
print("Transient error, retry later")
else:
print(f"Error [{err.code.value}]: {err}")
Error codes: not-found, permission-denied, unauthenticated, invalid-argument, already-exists, resource-exhausted, failed-precondition, internal, unavailable, cancelled, unknown.
Configuration
StigmerClient(
api_key: str, # Stigmer API key (required)
*,
base_url: str = "api.stigmer.ai:443", # gRPC target address
insecure: bool = False, # Skip TLS (local development only)
)
Code Generation
The resource clients in src/stigmer/_gen/ are generated from protobuf service schemas. To regenerate after proto changes:
cd sdk/python
make codegen
Handwritten code lives in src/stigmer/ (outside _gen/): _client.py, _transport.py, _interceptors.py, _search.py, and __init__.py.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stigmer-0.0.94.tar.gz.
File metadata
- Download URL: stigmer-0.0.94.tar.gz
- Upload date:
- Size: 24.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c19f3f4217626c25c75fe6c5600992696783cd0a532aeac1538a3d35b0208478
|
|
| MD5 |
6e7bd99a3b55a30ae9aecb2686d7f1b5
|
|
| BLAKE2b-256 |
92c45d994c529048f183a9294d520e9991b973e833fb6a038f50a587b1b3b61c
|
Provenance
The following attestation bundles were made for stigmer-0.0.94.tar.gz:
Publisher:
release.python-sdk.yaml on stigmer/stigmer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stigmer-0.0.94.tar.gz -
Subject digest:
c19f3f4217626c25c75fe6c5600992696783cd0a532aeac1538a3d35b0208478 - Sigstore transparency entry: 1376738523
- Sigstore integration time:
-
Permalink:
stigmer/stigmer@0ea25c7ffa91af90ea9e838e122aaabf5a1305ae -
Branch / Tag:
refs/tags/v0.0.94 - Owner: https://github.com/stigmer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.python-sdk.yaml@0ea25c7ffa91af90ea9e838e122aaabf5a1305ae -
Trigger Event:
push
-
Statement type:
File details
Details for the file stigmer-0.0.94-py3-none-any.whl.
File metadata
- Download URL: stigmer-0.0.94-py3-none-any.whl
- Upload date:
- Size: 44.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43e57a39cc1bc374302a07ac13c353313218949abea40e0433772efbd11b65ff
|
|
| MD5 |
a8ed087bdb47422d8162782e35e8bb99
|
|
| BLAKE2b-256 |
5d18ec6d830f26ed94cb1a6ab3279af3493e8cc209a065b4aaccced6c4b13f03
|
Provenance
The following attestation bundles were made for stigmer-0.0.94-py3-none-any.whl:
Publisher:
release.python-sdk.yaml on stigmer/stigmer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stigmer-0.0.94-py3-none-any.whl -
Subject digest:
43e57a39cc1bc374302a07ac13c353313218949abea40e0433772efbd11b65ff - Sigstore transparency entry: 1376738570
- Sigstore integration time:
-
Permalink:
stigmer/stigmer@0ea25c7ffa91af90ea9e838e122aaabf5a1305ae -
Branch / Tag:
refs/tags/v0.0.94 - Owner: https://github.com/stigmer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.python-sdk.yaml@0ea25c7ffa91af90ea9e838e122aaabf5a1305ae -
Trigger Event:
push
-
Statement type: