langchain - 💡(How to fix) Fix [Feature] Add partner integration for ai-audit-shelf [2 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

  • Pushing the integration to langchain-community.
  • Recommending users copy/paste a standalone callback file.
  • But these don't work because langchain-community is no longer the recommended path for specific vendor integrations, and standalone files lack the discoverability and versioning provided by official partner integrations.

Fix Action

Fixed

Code Example

from langchain_ai_audit_shelf import AIAuditCallbackHandler

handler = AIAuditCallbackHandler(
    api_url="http://localhost:8000",
    actor="my-langchain-agent",
    source="production-server"
)

# Pass the handler into any LangChain runnable
llm.invoke("Hello world", config={"callbacks": [handler]})
RAW_BUFFERClick to expand / collapse

Submission checklist

  • This is a feature request, not a bug report or usage question.
  • I added a clear and descriptive title that summarizes the feature request.
  • I used the GitHub search to find a similar feature request and didn't find it.
  • I checked the LangChain documentation and API reference to see if this feature already exists.
  • This is not related to the langchain-community package.

Package (Required)

  • langchain
  • langchain-openai
  • langchain-anthropic
  • langchain-classic
  • langchain-core
  • langchain-model-profiles
  • langchain-tests
  • langchain-text-splitters
  • langchain-chroma
  • langchain-deepseek
  • langchain-exa
  • langchain-fireworks
  • langchain-groq
  • langchain-huggingface
  • langchain-mistralai
  • langchain-nomic
  • langchain-ollama
  • langchain-openrouter
  • langchain-perplexity
  • langchain-qdrant
  • langchain-xai
  • Other / not sure / general

Feature Description

I would like LangChain to support a native partner integration for ai-audit-shelf.

This feature would allow users to easily pipe LLM execution telemetry, token usage, and tool activity directly into an ai-audit-shelf server (a localized SQLite-backed audit and compliance tool) using a standard LangChain BaseCallbackHandler.

I have already scaffolded the entire integration locally and it is ready for a Pull Request. It includes the libs/partners/ai_audit_shelf package structure, passing pytest integration and unit tests, and fully complies with LangChain's ruff and mypy formatting requirements. It has also been wired into the .github/ CI/CD workflows.

Use Case

As LLM applications move into production, compliance, security, and auditing become critical requirements. Currently, developers have to write custom callback handlers or parse complex LangSmith logs to extract simple, compliant audit trails that can be stored on-premise or locally.

This feature would help users easily fulfill compliance and debugging requirements by providing out-of-the-box telemetry logging tailored specifically for AI auditing workflows. It seamlessly bridges the gap between LangChain's powerful abstractions and ai-audit-shelf's localized compliance features.

Proposed Solution

I have implemented this by creating a new partner package langchain-ai-audit-shelf which exposes the AIAuditCallbackHandler.

The API looks like this:

from langchain_ai_audit_shelf import AIAuditCallbackHandler

handler = AIAuditCallbackHandler(
    api_url="http://localhost:8000",
    actor="my-langchain-agent",
    source="production-server"
)

# Pass the handler into any LangChain runnable
llm.invoke("Hello world", config={"callbacks": [handler]})

I am fully prepared to maintain this package moving forward. Could a maintainer please approve this request and assign this issue to me so I can open the Pull Request?

Alternatives Considered

  • Pushing the integration to langchain-community.
  • Recommending users copy/paste a standalone callback file.
  • But these don't work because langchain-community is no longer the recommended path for specific vendor integrations, and standalone files lack the discoverability and versioning provided by official partner integrations.

Additional Context

  • My local branch successfully passes make test, make lint, and make format based on the standard partner package templates.
  • I have already successfully tested both synchronous and asynchronous operations using requests and httpx.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING