Skip to main content

SparkNotes for your AI agents — log runs to AgentNotes with one pip install and env vars.

Project description

AgentNotes Python SDK

SparkNotes for your AI agents. Install once, set env vars, call AgentNotes.from_env().

Install (PyPI)

pip install aiagentnotes

Optional local .env support:

pip install "aiagentnotes[dotenv]"

Environment variables

See ENV.md for the full list.

Minimum:

export AGENTNOTES_API_KEY="an_xxxxxxxx"
export AGENTNOTES_AGENT_ID="my-bot-slug"
export AGENTNOTES_BASE_URL="https://your-agentnotes.vercel.app"

Quick start

from aiagentnotes import AgentNotes

notes = AgentNotes.from_env()

@notes.track("handle_request")
def handle_request(req):
    notes.log("received", data={"id": getattr(req, "id", None)})
    notes.complete_run({"summary": "Done"})

Optional: logging only when configured

from aiagentnotes import get_client

notes = get_client()
if notes:
    notes.log("bot started")

API

Method Description
AgentNotes.from_env() Build client from AGENTNOTES_* env vars
get_client() Same, or None if not configured
require_client() Same, or raise with setup instructions
notes.log(message, ...) Log an event
notes.complete_run(result) Finish run
notes.track("step") Decorator for a step

Development (this monorepo)

cd sdk && pip install -e ".[dev,dotenv]"

Publish to PyPI

See ../docs/PUBLISHING.md.

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

aiagentnotes-0.1.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

aiagentnotes-0.1.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file aiagentnotes-0.1.0.tar.gz.

File metadata

  • Download URL: aiagentnotes-0.1.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for aiagentnotes-0.1.0.tar.gz
Algorithm Hash digest
SHA256 af8c26d3e897ea921b9fe8b503e9e0440ad6dcd2ed43a16a9d5ac9a5e9f366f4
MD5 cf53247950bd9754fa74b41197c8ff27
BLAKE2b-256 47def3b4972b81af3ba12883dfef1eb56840d6467b1decf694b1bbad47cd290d

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiagentnotes-0.1.0.tar.gz:

Publisher: publish-pypi.yml on mattmerrick/agentnotes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aiagentnotes-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: aiagentnotes-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for aiagentnotes-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a9be0bb620f1d97bcac74eb9a150b0b627d8b7fd4ef0bd056f05e7557be56bd6
MD5 8a2d49d6fd0b5a9bb412c3722be73bd5
BLAKE2b-256 6f07ddab0d9d9d3929e1f8b187fd604ab3a637e98b82867ec15dbee50fe7a0f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiagentnotes-0.1.0-py3-none-any.whl:

Publisher: publish-pypi.yml on mattmerrick/agentnotes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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