Your agent chooses the startup changes and verifies the signals your application emits. Give it the application repository and access to its secret configuration.
Start with ingest key setup. Keep credentials in your deployment secret store.Call Or start it without changing code:By default the SDK covers your whole service. If your service already has its own OpenTelemetry setup, Struct adds its exporters to your tracer and logger providers and still instruments the supported AI libraries, but adds no full-app instrumentation, no logging bridge and no host metrics. Send host metrics through Any OpenTelemetry SDK or Your own collector. Pass
Configure instrumentation
Install the SDK with theauto extra, plus the extra for each AI library you use: anthropic, openai, langchain, claude-agent-sdk or pydantic-ai.With struct-sdk 0.4.12 or newer the SDK also instruments OpenAI Chat Completions and streaming calls, and agent frameworks: the openai-agents, mcp, google-genai, litellm, llamaindex and autogen extras, plus CrewAI (1.15.13 or later) and AG2 0.x, which need no extra. Check pip index versions struct-sdk: older versions lack some of these, and before 0.4.3 OpenAI coverage is non-streaming Responses calls only.struct.init() once in each service process, before you import framework classes or create your web app or AI clients. Servers that fork workers (Gunicorn, uWSGI) call it in each worker:auto_instrument=False to send only AI agent calls. AI prompt and answer capture is off unless you turn on content_capture; that setting does not filter your app’s own log messages, which full-app mode sends.