Working LangChain agent backed by Ainfera. ~30 lines. Clone, install, run.
git clone https://github.com/ainfera-ai/examples-langchain
cd examples-langchain
pip install -r requirements.txt
export AINFERA_API_KEY=ai_live_... # https://app.ainfera.ai/signup
python main.py- One Agent Card across providers (L1)
- Drain-proof wallet — survives prompt injection (L3)
- Audit URL printed after every call (L4)
- Quality scored by Artificial Analysis per model
EU AI Act Annex IV ready — every call hash-chained, signed, exportable.
LangChain speaks OpenAI's API. Two env vars and your existing
ChatOpenAI code routes through Ainfera:
chat = ChatOpenAI(
model="claude-opus-4-7",
openai_api_key=os.environ["AINFERA_API_KEY"],
openai_api_base="https://api.ainfera.ai/v1",
)That's it.
After running, visit https://verify.ainfera.ai/agents/<your-agent-id> to see the hash-chained audit trail. Every call has a verifiable receipt.
- examples-openai-compat — universal wedge (no framework)
- examples-crewai — multi-agent crews
- examples-google-adk — Google ADK
- examples-mcp — Claude Desktop + Cursor
Apache 2.0. © Ainfera Inc. 2026.