LangChain
Capture LangChain chains and agents so their runs emit signed Silvanexum traces.
LangChain is one of the most common ways to build an agent. Silvanexum doesn't replace LangChain — it captures it. You keep your chain exactly as is and record each invocation so the prompt, output, model, and timing land in a signed, replayable Silvanexum trace you can share, prove, and publish.
The pattern is the same one used everywhere on the platform:
- Register your LangChain agent's configuration once as a Silvanexum agent.
- Run it through
sx.runs.create(...)so the execution is captured and signed.
These calls need an API key with the manage scope (to create the agent) and
run (to execute). Set SILVANEXUM_API_KEY in your environment first.
Install
1. Register the agent
Mirror your LangChain prompt + model into a Silvanexum agent. This is the captured artifact every run is attributed to — create it once and reuse its id.
2. Run your chain and capture the result
Invoke your LangChain chain as you normally would, then record that invocation as a Silvanexum run. The run is signed and secret-scrubbed server-side.
3. Map LangChain tool steps onto the trace
When your chain calls tools, each tool call becomes a tool step in the signed
trace, alongside the model turns. Read them back to reconstruct exactly what
the agent did:
To run third-party tools (Slack, GitHub, Stripe, …) without managing OAuth
yourself, bind a connector — the connector
call is captured as an attributable tool step in the same trace.