Hone Python SDK
hone is the Python SDK for Hone, an AI-agent
observability platform. Use it to capture agent conversations and MCP tool
calls and send them to Hone's ingestion edge.
Install
uv add hone
# with MCP tool-call capture:
uv add "hone[mcp]"
Configuration
The SDK reads its configuration from arguments or the environment:
| Setting | Argument | Environment | Default |
|---|---|---|---|
| API key | honeai.init(api_key) |
HONE_API_KEY |
— (required) |
| Endpoint | honeai.init(endpoint=) |
HONE_ENDPOINT |
https://api.hone.dev |
API keys look like sk_<hex>. For local development, point the endpoint at
http://localhost:8080.
Quick start
import honeai
honeai.init("sk_...") # or rely on HONE_API_KEY
# A single turn you want to time and enrich:
turn = honeai.begin(user_id="user-123", agent_name="support-bot", input="How do I reset my password?")
turn.set_property("channel", "web")
turn.set_properties({"tier": "pro"})
turn.end("Head to Settings > Security to reset it.")
begin starts a new conversation (a fresh session_id) and records the start
time. end posts a capture-session (once per new conversation) plus a
capture-event with an auto-computed latency.
One-shot capture
honeai.track(
user_id="user-123",
input="What's my balance?",
output="Your balance is $42.",
agent_name="finance-bot",
)
Group several turns into one conversation by passing a shared
conversation_id:
convo = "9f8b..." # any stable id
honeai.track(user_id="u1", input="hi", output="hello", agent_name="bot", conversation_id=convo)
honeai.track(user_id="u1", input="bye", output="see you", agent_name="bot", conversation_id=convo)
User traits
Register traits that decorate the user's next session:
honeai.identify("user-123", {"plan": "enterprise", "name": "Ada"})
honeai.begin(user_id="user-123", agent_name="bot", input="hi").end("hello")
# ^ the session's user_data carries plan + name
MCP tool-call capture
Wrap a FastMCP server so every tool call is captured as a TOOL event:
from mcp.server.fastmcp import FastMCP
import honeai.mcp
server = FastMCP("my-server")
@server.tool()
def add(a: int, b: int) -> int:
return a + b
honeai.init("sk_...")
honeai.mcp.track(server) # instruments the server in place
Pass disable_input=True and/or disable_output=True to omit tool arguments
or return values from the captured events. mcp is an optional dependency; if
it is not installed, honeai.mcp.track logs a warning and returns the server
unchanged.
Error handling
Network and HTTP failures never raise into your hot path by default — they are
logged (via the hone logger) and dropped. For tests, construct a client with
raise_on_error=True:
from honeai.client import Client
client = Client("sk_test", raise_on_error=True)
Development
uv sync
uv run pytest
uv run ruff check
Metadata
Release files for asymmetric-hone 0.1.0
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 | |
|---|---|---|---|---|
| asymmetric_hone-0.1.0.tar.gz | 11.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| asymmetric_hone-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.3 kB
Release files / asymmetric_hone-0.1.0.tar.gz
| Download URL | asymmetric_hone-0.1.0.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b82b2267ff2154f1a66f1fdd34e8c999fe4d7ff6e90c1ae82a9940375959ead4
|
|
BLAKE2b-256 checksum How to use checksums |
190af6f7c1e8aa3094a493c53ba902a2a09a5226563bb69821e935ecd4a5d09b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Release files / asymmetric_hone-0.1.0-py3-none-any.whl
| Download URL | asymmetric_hone-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6dbd895b701bb1183cee260128a240cd3e5840a2741de8aa8c20856ce5a28c69
|
|
BLAKE2b-256 checksum How to use checksums |
efc93d9471c71310a8b0f5d1032367482e70f279ff58bab48a34a091c25f2daf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Security for asymmetric-hone 0.1.0
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.