TheDocumentation Index
Fetch the complete documentation index at: https://docs.trulayer.ai/llms.txt
Use this file to discover all available pages before exploring further.
demo-go repository contains a curated set of standalone programs that show every public surface of the Go SDK end-to-end. Each example covers one concept — copy a pattern straight into your own service.
Status: alpha. The demo programs currently pin the SDK from a local sibling path while we cut the first public release. Standalone clones will fail to build until
github.com/trulayer/client-go v0.1.0 is tagged. Track the release in the demo-go repo. Once v0.1.0 ships, this notice will be removed.What’s in the repo
- 5 runnable examples under
examples/, one per SDK concept (manual tracing, auto-instrumentation, RAG pipeline, agent loop, feedback). - A local mock ingestion server in
smoke/for offline runs.
Clone and run
Representative examples
basic_trace
Manual
NewTrace and NewSpan around a synthetic LLM call — the smallest possible end-to-end example.openai_auto
InstrumentOpenAI — wraps the OpenAI client so every chat completion becomes a span automatically.rag_pipeline
Embed → retrieve → generate, captured as three typed spans (
retrieval, llm) inside one trace.agent
Tool-calling agent loop with one span per tool invocation and one per LLM turn.
feedback
Trace an answer, then attach a
FeedbackData record to it via SubmitFeedback.Basic LLM trace
The pattern below manually instruments a single LLM call. Use this when auto-instrumentation is not available for your provider.Multi-span pipeline
Use multiple spans to break a complex operation into observable steps.Attaching feedback
Capture the trace ID inside your handler and submit feedback later — for example, when the user clicks thumbs up.Label values: "good", "bad", "neutral". You can also pass a numeric Score (*float64) and arbitrary Metadata.
Where to go next
Tutorial
Build the same patterns from scratch with a step-by-step walkthrough.
Reference
Every public export, with signatures and types.