Current collected state Current
Observed since 20 Oct, 22:37 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Python SDK for agentlog - a local-first decision log daemon for agentic workflows
Python client for agentlog - a local-first decision log daemon for agentic workflows.
pip install agentlog-sdk
import agentlog
agentlog.write("decision", "Use PostgreSQL for persistence")
entries = agentlog.query("database")
agentlogd daemon (see the main project README)import agentlog
# Write a decision entry (session created automatically)
agentlog.write(
"decision",
"Use Redis for caching",
body="Redis provides sub-millisecond reads and built-in TTL support.",
tags=["infrastructure", "caching"],
files=["config/redis.yaml"],
)
# Supported entry types: decision, attempt_failed, deferred, assumption, question
agentlog.write("assumption", "All users have Python 3.9+")
agentlog.write("question", "Should we use async or sync HTTP client?")
# Full-text search
results = agentlog.query("database migration")
# Search with filters
results = agentlog.query("caching", type="decision", limit=5)
# List entries by type
entries = agentlog.log(type="decision")
# List entries by session
entries = agentlog.log(session="your-session-id")
# List entries by tag
entries = agentlog.log(tag="infrastructure")
# List entries from the last hour
entries = agentlog.log(since="1h")
# Get context by topic
context = agentlog.context(topic="authentication")
# Get context by file paths
context = agentlog.context(files=["internal/auth/jwt.go"])
# Combine both
context = agentlog.context(files=["internal/auth/jwt.go"], topic="authentication")
# Limit results
context = agentlog.context(topic="caching", limit=5)
print(context)
# Output:
# # Recent decisions
#
# ## [decision] Use JWT for API auth (2026-03-15 10:30)
# JWTs are stateless and work well with our microservices architecture.
# Tags: auth, api
# Files: internal/auth/jwt.go
from agentlog import AgentlogClient
# Custom socket path
client = AgentlogClient(agentlog_dir="/custom/path")
# Or explicit socket path
client = AgentlogClient(socket_path="/tmp/agentlogd.sock")
# All methods are available on the client instance
entry_id = client.write("decision", "Use gRPC for internal services")
The SDK looks for the daemon socket at ~/.agentlog/agentlogd.sock by default.
Override this with:
AGENTLOG_DIR environment variableagentlog_dir constructor argumentsocket_path constructor argument (takes precedence)from agentlog import AgentlogError, ConnectionError, DaemonNotRunning
try:
agentlog.write("decision", "Test entry")
except DaemonNotRunning:
print("Start the daemon first: agentlog start")
except ConnectionError as e:
print(f"Connection failed: {e}")
except AgentlogError as e:
print(f"Unexpected error: {e}")
# Install in development mode
pip install -e sdk/python/
# Run tests
python -m pytest sdk/python/tests/ -v
# Run only unit tests (no daemon required)
python -m pytest sdk/python/tests/test_client.py -v
pypistats · 48 observations shown. Missing days are unknown. Source category: overall: without mirrors.
| Date / source period | Value | Observed at |
|---|---|---|
| 2026-10-20 – 2026-10-20 | 2 | 2026-10-21T13:01:18.8935982Z |
| 2026-10-18 – 2026-10-18 | 4 | 2026-10-21T13:01:18.8935982Z |
| 2026-10-17 – 2026-10-17 | 9 | 2026-10-21T13:01:18.8935982Z |
| 2026-10-16 – 2026-10-16 | 2 | 2026-10-21T13:01:18.8935982Z |
| 2026-10-15 – 2026-10-15 | 6 | 2026-10-21T13:01:18.8935982Z |
| 2026-10-14 – 2026-10-14 | 1 | 2026-10-21T13:01:18.8935982Z |
| 2026-10-13 – 2026-10-13 | 1 | 2026-10-21T13:01:18.8935982Z |
| 2026-10-12 – 2026-10-12 | 1 | 2026-10-21T13:01:18.8935982Z |
| 2026-10-10 – 2026-10-10 | 4 | 2026-10-21T13:01:18.8935982Z |
| 2026-10-09 – 2026-10-09 | 2 | 2026-10-21T13:01:18.8935982Z |
| 2026-10-08 – 2026-10-08 | 1 | 2026-10-21T13:01:18.8935982Z |
| 2026-10-06 – 2026-10-06 | 1 | 2026-10-21T13:01:18.8935982Z |
| 2026-10-02 – 2026-10-02 | 1 | 2026-10-21T13:01:18.8935982Z |
| 2026-09-30 – 2026-09-30 | 1 | 2026-10-21T13:01:18.8935982Z |
| 2026-09-29 – 2026-09-29 | 1 | 2026-10-21T13:01:18.8935982Z |
| 2026-09-28 – 2026-09-28 | 2 | 2026-10-21T13:01:18.8935982Z |
| 2026-09-27 – 2026-09-27 | 1 | 2026-10-21T13:01:18.8935982Z |
| 2026-09-26 – 2026-09-26 | 1 | 2026-10-21T13:01:18.8935982Z |
| 2026-09-23 – 2026-09-23 | 2 | 2026-10-21T13:01:18.8935982Z |
| 2026-09-22 – 2026-09-22 | 1 | 2026-10-21T13:01:18.8935982Z |
| 2026-09-21 – 2026-09-21 | 1 | 2026-10-21T13:01:18.8935982Z |
| 2026-09-20 – 2026-09-20 | 8 | 2026-10-21T13:01:18.8935982Z |
| 2026-09-17 – 2026-09-17 | 2 | 2026-10-21T13:01:18.8935982Z |
| 2026-09-16 – 2026-09-16 | 2 | 2026-10-21T13:01:18.8935982Z |
| 2026-09-15 – 2026-09-15 | 1 | 2026-10-21T13:01:18.8935982Z |
| 2026-09-14 – 2026-09-14 | 6 | 2026-10-21T13:01:18.8935982Z |
| 2026-09-10 – 2026-09-10 | 2 | 2026-10-21T13:01:18.8935982Z |
| 2026-09-07 – 2026-09-07 | 7 | 2026-10-21T13:01:18.8935982Z |
| 2026-08-31 – 2026-08-31 | 2 | 2026-10-21T13:01:18.8935982Z |
| 2026-08-28 – 2026-08-28 | 1 | 2026-10-21T13:01:18.8935982Z |
| 2026-08-25 – 2026-08-25 | 1 | 2026-10-21T13:01:18.8935982Z |
| 2026-08-24 – 2026-08-24 | 5 | 2026-10-21T13:01:18.8935982Z |
| 2026-08-23 – 2026-08-23 | 3 | 2026-10-21T13:01:18.8935982Z |
| 2026-08-18 – 2026-08-18 | 2 | 2026-10-21T13:01:18.8935982Z |
| 2026-08-17 – 2026-08-17 | 2 | 2026-10-21T13:01:18.8935982Z |
| 2026-08-15 – 2026-08-15 | 2 | 2026-10-21T13:01:18.8935982Z |
| 2026-08-14 – 2026-08-14 | 4 | 2026-10-21T13:01:18.8935982Z |
| 2026-08-13 – 2026-08-13 | 5 | 2026-10-21T13:01:18.8935982Z |
| 2026-08-12 – 2026-08-12 | 1 | 2026-10-21T13:01:18.8935982Z |
| 2026-08-10 – 2026-08-10 | 2 | 2026-10-21T13:01:18.8935982Z |
| 2026-08-09 – 2026-08-09 | 3 | 2026-10-21T13:01:18.8935982Z |
| 2026-08-07 – 2026-08-07 | 1 | 2026-10-21T13:01:18.8935982Z |
| 2026-08-04 – 2026-08-04 | 2 | 2026-10-21T13:01:18.8935982Z |
| 2026-08-03 – 2026-08-03 | 2 | 2026-10-21T13:01:18.8935982Z |
| 2026-08-02 – 2026-08-02 | 1 | 2026-10-21T13:01:18.8935982Z |
| 2026-07-27 – 2026-07-27 | 2 | 2026-10-21T13:01:18.8935982Z |
| 2026-07-26 – 2026-07-26 | 1 | 2026-10-21T13:01:18.8935982Z |
| 2026-07-23 – 2026-07-23 | 3 | 2026-10-21T13:01:18.8935982Z |
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.2.0 | 17 Mar 2026 | 0 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 22:37 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:29a5166a9eaf2bd65cc0c6d94657d657dd55a48e0ceb06b45bb8142f356d02c7