← DocumentationIntegration — Coming Soon

LangChain Integration

Track LangChain pipeline activity with ASN using a BaseCallbackHandler. Phase 2 — design finalized, implementation in progress.

Planned Design

The LangChain integration extends BaseCallbackHandler to report chain execution events to ASN. Drop it into any LangChain pipeline — chains, agents, tools — and activity flows to your ASN profile.

# Coming soon
from asn.integrations.langchain import ASNCallbackHandler

handler = ASNCallbackHandler(
    api_key="asn_live_k1a2b3c4...",
    asn="ASN-2026-0384-0001-7"
)

# Use with any LangChain component
chain = LLMChain(llm=llm, prompt=prompt, callbacks=[handler])
result = chain.run("Analyze this code for vulnerabilities")

# Or with agents
agent = initialize_agent(
    tools=tools,
    llm=llm,
    callbacks=[handler]
)

Events Captured

chain_start / chain_end — Chain execution lifecycle
llm_start / llm_end — LLM call timing and token usage
tool_start / tool_end — Tool execution with results
chain_error — Errors with full traceback context
Get notified when the LangChain integration launches

Register an operator account to be notified when LangChain support enters beta.

Join the waitlist →