Observed since 20 Oct, 21:30 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
agentaudit-client
Audit & Compliance SDK for AI Agents
Official Python SDK for the AgentAudit API — audit logging and compliance monitoring for AI agents.
pip install agentaudit-client
With LangChain support:
pip install agentaudit-client[langchain]
from agentaudit import AgentAudit
# Initialize
audit = AgentAudit(api_key="aa_your_key_here")
# Log an agent action
audit.log(
action="prompt_submitted",
prompt="What is the weather?",
response="It is sunny today.",
metadata={"model": "gpt-4", "tokens": 150}
)
pip install agentaudit-client[langchain]
from agentaudit import AgentAuditCallbackHandler
from langchain_openai import ChatOpenAI
audit_handler = AgentAuditCallbackHandler(
api_key="aa_your_key_here",
agent_id="uuid-of-your-agent",
guard=True # default
)
# Use with any LangChain component
llm = ChatOpenAI(model="gpt-4o", callbacks=[audit_handler])
llm.invoke("What is the weather?")
# Automatically logged + guarded to AgentAudit!
Track multi-agent conversations and CrewAI workflows with distributed tracing:
import uuid
from agentaudit import AgentAudit
audit = AgentAudit(api_key="aa_your_key_here")
# Start a trace — e.g. when a CrewAI crew begins execution
trace_id = str(uuid.uuid4())
# Log the root event (crew start)
root = audit.log(
action="crewai_crew_start",
trace_id=trace_id,
metadata={"crew": "Research Crew", "task_count": 3}
)
# Log child events (tasks, agent actions) with parent_span_id
audit.log(
action="crewai_task_start",
trace_id=trace_id,
parent_span_id=root.id,
prompt="Research topic X",
metadata={"task_id": "task-1"}
)
# Query the full trace later
# (use the HTTP client or dashboard to query by traceId)
The CrewAI observer automatically manages trace IDs and parent span IDs:
from agentaudit_crewai import AgentAuditObserver
observer = AgentAuditObserver(api_key="aa_key", crew_name="My Crew")
# trace_id is generated automatically in on_crew_start
# every event shares the same trace_id with proper parent_span_id linking
Full API documentation: https://docs.agentaudit.io
MIT
This package is published automatically via GitHub Actions when you push a version tag:
PYPI_API_TOKENpypi-)# Update version in sdk/python/setup.py
git add sdk/python/setup.py
git commit -m "chore: bump Python SDK to v1.0.1"
git tag v1.0.1
git push origin v1.0.1
The publish-python.yml workflow will automatically build and upload to PyPI.
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
requestsEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.8",
"evaluation": "NOT_EVALUATED"
} | requests>=2.25.0 | runtime |
langchain-coreEnvironment{
"extras": "",
"marker": "extra == \"langchain\"",
"requires_python": ">=3.8",
"evaluation": "NOT_EVALUATED"
} | langchain-core>=0.2.0; extra == "langchain" | runtime |
pytestEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.8",
"evaluation": "NOT_EVALUATED"
} | pytest>=7.0; extra == "dev" | runtime |
pytest-asyncioEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.8",
"evaluation": "NOT_EVALUATED"
} | pytest-asyncio>=0.23.0; extra == "dev" | runtime |
blackEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.8",
"evaluation": "NOT_EVALUATED"
} | black; extra == "dev" | runtime |
mypyEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.8",
"evaluation": "NOT_EVALUATED"
} | mypy; extra == "dev" | runtime |
agentaudit-clientEnvironment{
"extras": "langchain",
"marker": "extra == \"dev\"",
"requires_python": ">=3.8",
"evaluation": "NOT_EVALUATED"
} | agentaudit-client[langchain]; extra == "dev" | runtime |
bdist_wheel · 11.73 KB · Python py3
sdist · 12.75 KB · Python source
Shared repository data · GitHub
Observed since 20 Oct, 21:30 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:d1dbc5ab1680faecdee6331ed47ff2ebed0fea234146f15d07491db060fca15d