athena-ptc-middleware
LangGraph agent middleware that surfaces Programmatic Tool Calling (PTC)
sub-events from Athena's sandboxed SDKs (athena-python-pptx,
athena-python-docx, athena-openpyxl, …) as nested sub-tool-cards on the
parent agent tool call.
The middleware:
- Runs a small in-process HTTP listener on
127.0.0.1:3101/ptc-events. - Publishes
ATHENA_PTC_URLinos.environat import time so any bash subprocess spawned by the parent agent inherits it. - For each tool call, claims a per-call buffer, drains buffered events to the
LangGraph stream writer as custom events (
ptc_subcall_event), and attaches the final event log to theToolMessage.artifact.subgraph_state.messagesshape consumed by Olympus.
Usage
from athena_ptc_middleware import PTCEventsMiddleware
from deepagents import create_deep_agent
graph = create_deep_agent(
model=...,
system_prompt=...,
backend=...,
tools=...,
middleware=[PTCEventsMiddleware()],
)
Sandboxed SDKs that emit PTC events read ATHENA_PTC_URL from their
environment and POST JSON events to it. As long as the env var is inherited
by the subprocess where the SDK runs (e.g. bash spawned by the agent), the
middleware will surface them.
Source of truth
This package is published from python-sdk/athena-ptc-middleware/ in the
Athena-Intel/demo-app-monorepo repo. The Athena developer agent
(sandbox/developer_agent/) consumes it from PyPI; do not re-vendor the
source into other locations.
Metadata
Release files for athena-ptc-middleware 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| athena_ptc_middleware-0.1.1.tar.gz | 6.0 kB | Without provenance | Details for athena_ptc_middleware-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| athena_ptc_middleware-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for athena_ptc_middleware-0.1.1-py3-none-any.whl |
Total release size: 11.2 kB
Release files / athena_ptc_middleware-0.1.1.tar.gz
| Download URL | athena_ptc_middleware-0.1.1.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b8fafeca8bc18fab9555f3be29f515b17a83309cb428f24329fee33f6d0f3a56
|
|
BLAKE2b-256 checksum How to use checksums |
22a6bb6e7c72b04e022b6f2fafed84ef29494bb4c3b7149c2f4b70bd36155599
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / athena_ptc_middleware-0.1.1-py3-none-any.whl
| Download URL | athena_ptc_middleware-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c1af62ec8b916a8c31cbc8e4d9d8717d678056058825081ceb23ae598796a203
|
|
BLAKE2b-256 checksum How to use checksums |
3e43df1a2c95ad4cab8f23b210d7e68169e5411601f3c02c30f0f3d6faa1c73b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for athena-ptc-middleware 0.1.1
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.