Maxim AI
Overview
Section titled “Overview”DeepIntShield provides comprehensive LLM observability through the Maxim plugin, enabling seamless tracking, evaluation, and analysis of AI interactions. The plugin automatically forwards all LLM requests and responses to Maxim’s platform for detailed monitoring and performance insights.

The Maxim plugin enables seamless observability and evaluation of LLM interactions by forwarding inputs/outputs to Maxim’s platform:
package main
import ( "context" deepintshield "github.com/maximhq/deepintshield/core" "github.com/maximhq/deepintshield/core/schemas" maxim "github.com/maximhq/deepintshield/plugins/maxim")
func main() { // Initialize Maxim plugin maximPlugin, err := maxim.Init(maxim.Config{ ApiKey: "your_maxim_api_key", LogRepoId: "your_default_repo_id", // Optional: fallback repository }) if err != nil { panic(err) }
// Initialize DeepIntShield with the plugin client, err := deepintshield.Init(context.Background(), schemas.DeepIntShieldConfig{ Account: &yourAccount, LLMPlugins: []schemas.LLMPlugin{maximPlugin}, }) if err != nil { panic(err) } defer client.Shutdown()
// All requests will now be traced to Maxim}For HTTP transport, configure via environment variables:
{ "plugins": [ { "enabled": true, "name": "maxim", "config": { "api_key": "your_maxim_api_key", "log_repo_id": "your_default_repo_id" } } ]}Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
ApiKey | string | ✅ Yes | Your Maxim API key for authentication |
LogRepoId | string | ❌ No | Default log repository ID (can be overridden per request) |
Repository Selection
Section titled “Repository Selection”The plugin uses repository selection with the following priority:
- Header/Context Repository - Highest priority
- Default Repository (from plugin config) - Fallback
- Skip Logging - If neither is available
ctx := context.Background()
// Use specific repository for this requestctx = context.WithValue(ctx, maxim.LogRepoIDKey, "project-specific-repo")# Use default repository (from config)curl -X POST http://localhost:8080/v1/chat/completions \ -d '{"model": "gpt-4", "messages": [...]}'
# Override with specific repositorycurl -X POST http://localhost:8080/v1/chat/completions \ -H "x-bf-maxim-log-repo-id: project-specific-repo" \ -d '{"model": "gpt-4", "messages": [...]}'Custom Trace Management
Section titled “Custom Trace Management”Trace Propagation
Section titled “Trace Propagation”The plugin supports custom session, trace, and generation IDs for advanced tracing scenarios:
ctx := context.Background()
// Prefer typed keys from the Maxim pluginctx = context.WithValue(ctx, maxim.TraceIDKey, "custom-trace-123")ctx = context.WithValue(ctx, maxim.GenerationIDKey, "custom-gen-456")ctx = context.WithValue(ctx, maxim.SessionIDKey, "user-session-789")
// Optionally set human-friendly namesctx = context.WithValue(ctx, maxim.TraceNameKey, "checkout-flow")ctx = context.WithValue(ctx, maxim.GenerationNameKey, "rerank-step")curl -X POST http://localhost:8080/v1/chat/completions \ -H "x-bf-maxim-trace-id: custom-trace-123" \ -H "x-bf-maxim-generation-id: custom-gen-456" \ -H "x-bf-maxim-session-id: user-session-789" \ -H "x-bf-maxim-trace-name: checkout-flow" \ -H "x-bf-maxim-generation-name: rerank-step" \ -d '{"model": "gpt-4", "messages": [...]}'Custom Tags
Section titled “Custom Tags”You can add custom tags to traces for enhanced filtering and analytics:
ctx := context.Background()
// Pass arbitrary tag key-values via context maptags := map[string]string{ "environment": "production", "user-id": "user-123", "feature-flag": "new-ui",}ctx = context.WithValue(ctx, maxim.TagsKey, tags)curl -X POST http://localhost:8080/v1/chat/completions \ -H "x-bf-maxim-environment: production" \ -H "x-bf-maxim-user-id: user-123" \ -H "x-bf-maxim-feature-flag: new-ui" \ -d '{"model": "gpt-4", "messages": [...]}'Reserved keys are session-id, trace-id, trace-name, generation-id, generation-name, log-repo-id. All other x-bf-maxim-* headers are treated as tags.
Supported Request Types
Section titled “Supported Request Types”The plugin supports the following DeepIntShield request types:
- Text Completion
- Chat Completion
Monitoring & Analytics
Section titled “Monitoring & Analytics”Once configured, monitor your AI apps in the Maxim Dashboard. Maxim is an end-to-end evaluation & observability platform built to help teams ship AI agents faster while maintaining high quality.
-
Experiment / Prompt Engineering Playground++ for prompt design: versioning, comparison (A/B), visual chaining, low-code tooling.
-
Simulation & Evaluation Test agents over thousands of scenarios, both automated (statistical, programmatic) and human-in-the-loop for edge cases. Custom and off-the-shelf evaluators.
-
Observability / Monitoring Real-time traces, logging, debugging of multi-agent workflows, live issue tracking, alerts when quality or performance degrade.
-
Data Engine & Dataset Management Support for multi-modal datasets, import & continuous curation, feedback/annotation pipelines, data splitting for experiments.
-
Governance, Security & Compliance Features like SOC 2 Type II compliance, enterprise security controls, permissions, auditability.
-
Alerts & SLAs: Threshold-based notifications to keep quality and latency in guardrails
Next Steps
Section titled “Next Steps”Now that you have observability set up with the Maxim plugin, explore these related topics:
- Tracing - Deep-dive into request/response logging and correlation
- Telemetry - Prometheus metrics, dashboards, and alerting
- Governance - Virtual keys, per-team controls, and usage limits