Catalog PyPI
PACKAGE EXPLORERView in registry

aal-sdk

PyPI

Python SDK for the Agent Action Ledger API

Versions collected1
Direct dependencies7From release 0.1.3
Last observed20 Oct, 16:58 UTC

README

Version 0.1.3 documentation

aal-sdk (Python)

Python SDK for Agent Ink — the audit trail and logging API for AI agents. Full parity with the TypeScript SDK.

Getting Started

  1. Sign up at agentink.dev (free during beta)
  2. Go to Dashboard > API Keys and create a new key
  3. Install the SDK and use your key in the examples below

Installation

pip install aal-sdk

With optional integrations:

pip install aal-sdk[anthropic]  # Anthropic client wrapper
pip install aal-sdk[mcp]        # MCP server wrapper

Quick Start

import asyncio
from aal_sdk import AALClient

async def main():
    client = AALClient({
        "api_url": "https://api.agentink.dev",
        "api_key": "your-api-key",
    })

    session = client.start_session({"agent_id": "my-agent"})

    session.log_action({
        "action_type": "TOOL_CALL",
        "tool_name": "get_weather",
        "parameters": {"city": "London"},
        "response": {"temp": 15},
        "status": "SUCCESS",
        "latency_ms": 42,
    })

    await client.shutdown()

asyncio.run(main())

Auto-Instrumentation

Anthropic Client

from aal_sdk import AALClient
from aal_sdk.anthropic import wrap_anthropic_client
from anthropic import AsyncAnthropic

client = AALClient({"api_url": "...", "api_key": "..."})
session = client.start_session({"agent_id": "claude-agent"})

anthropic = wrap_anthropic_client(AsyncAnthropic(), session)
# All tool_use blocks are now automatically logged

MCP Server

from aal_sdk import AALClient
from aal_sdk.mcp import wrap_mcp_server
from mcp import Server

client = AALClient({"api_url": "...", "api_key": "..."})
session = client.start_session({"agent_id": "mcp-agent"})

server = Server("my-server")
wrap_mcp_server(server, session)
# All tool calls are now automatically logged

API Reference

AALClient

  • AALClient(config) -- Create a client with api_url, api_key, optional flush_interval and batch_size
  • start_session(config) -- Create a new session (returns AALSession)
  • session(session_id, agent_id) -- Get a handle to an existing session
  • get_events(params) -- Query events with optional filters
  • get_session(session_id) -- Get session details
  • shutdown() -- Drain buffer and close connections

AALSession

  • log_action(input) -- Log an action event (buffered, auto-flushed)

Wrappers

  • wrap_anthropic_client(client, session) -- Auto-log Anthropic tool_use blocks
  • wrap_mcp_server(server, session) -- Auto-log MCP tool calls

Documentation

Full documentation at agentink.dev/docs.

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.33 Mar 20267

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
brianofearth/agent-action-ledger

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 16:58 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:7add37d32204bd9fb136f1688ac1d0add079db879b478c4066835943d57a9892