Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: publish-pypi

on:
workflow_dispatch:
push:
tags:
- "v*"

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Build distribution
run: |
python -m pip install --upgrade pip
python -m pip install build
python -m build

- name: Upload dist artifact
uses: actions/upload-artifact@v4
with:
name: python-dist
path: dist/

publish:
runs-on: ubuntu-latest
needs: build
permissions:
contents: read
steps:
- name: Download dist artifact
uses: actions/download-artifact@v4
with:
name: python-dist
path: dist/

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
skip-existing: true
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ The AXME Python SDK gives you a fully typed client for the AXME platform. You ca
## Install

```bash
pip install axme-sdk
python -m pip install "git+https://github.com/AxmeAI/axme-sdk-python.git"
```

PyPI publication target: `axme` (pending registry credentials and first public release).
For local development from source:

```bash
Expand Down Expand Up @@ -118,11 +119,18 @@ for event in client.observe(intent["intent_id"]):

```python
# Fetch pending approvals for an agent
pending = client.list_inbox({"owner_agent": "agent://manager", "status": "PENDING"})

for item in pending["items"]:
# Approve with a note
client.resolve_approval(item["intent_id"], {"decision": "approved", "note": "LGTM"})
pending = client.list_inbox(owner_agent="agent://manager")

for item in pending.get("items", []):
thread_id = item.get("thread_id")
if not thread_id:
continue
# Approve the inbox thread with a note
client.approve_inbox_thread(
thread_id,
{"note": "LGTM"},
owner_agent="agent://manager",
)
```

---
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["hatchling>=1.25.0"]
build-backend = "hatchling.build"

[project]
name = "axme-sdk"
name = "axme"
version = "0.1.0"
description = "Official Python SDK for Axme APIs."
readme = "README.md"
Expand All @@ -15,5 +15,8 @@ dependencies = ["httpx>=0.27.0,<1.0.0"]
[project.optional-dependencies]
dev = ["pytest>=9.0.0,<10.0.0"]

[tool.hatch.build.targets.wheel]
packages = ["axme_sdk"]

[tool.pytest.ini_options]
testpaths = ["tests"]