---
title: Logging
description: Provider logging and data retention policies
---

# Logging

Each AI provider on Agnic has its own data handling policies for logging and retention. This page explains how providers handle your data and how to control which providers can access it.

---

## Provider Policies

### Training on Prompts

Each provider has its own data handling policies. We track those policies and provide you with controls to filter providers based on their data practices.

**Your options:**

- **Allow all providers** - Use any provider regardless of training policy
- **No training providers only** - Only use providers that don't train on your data
- **Specific providers** - Manually select which providers to use

<Callout type="tip">
  You can set data policy preferences in your account settings or on a per-request basis using provider filtering.
</Callout>

### Data Retention & Logging

Providers have varying data retention policies, often for compliance reasons. The table below shows each provider's current policies.

---

## Provider Data Retention

| Provider | Trains on Data | Retention Period | Zero-Retention Option |
|----------|----------------|------------------|----------------------|
| **OpenAI** | No (API) | 30 days | Yes (enterprise) |
| **Anthropic** | No | 30 days | Yes |
| **Google** | No (API) | 30 days | Yes |
| **Meta (Llama)** | No | Varies by host | Depends on host |
| **Mistral** | No | 30 days | Yes |
| **DeepSeek** | No | 30 days | No |
| **Cohere** | No | 90 days | Yes (enterprise) |

<Callout type="info">
  Policies may change. Check each provider's terms of service for the most current information.
</Callout>

---

## Understanding Retention Periods

### What "30 days" Means

- Prompts may be stored for up to 30 days
- Used for abuse monitoring and debugging
- Automatically deleted after the retention period
- Not used for model training (for most providers)

### Zero-Retention Options

Some providers offer zero-retention:

- Prompts are not stored after processing
- Responses are not logged
- Typically available for enterprise customers

---

## Filtering by Data Policy

### Per-Request Filtering

Add provider requirements to individual requests:

```python
response = client.chat.completions.create(
    model="openai/gpt-4o",
    messages=[{"role": "user", "content": "Hello"}],
    extra_body={
        "provider": {
            "data_collection": "deny"  # Only use no-training providers
        }
    }
)
```

### Account-Wide Settings

Set default preferences in your account:

1. Go to **Settings** > **Privacy**
2. Choose your data policy preferences
3. Settings apply to all requests by default

---

## Agnic's Logging

### What Agnic Logs

| Data | Logged | Purpose |
|------|--------|---------|
| Request metadata | Yes | Billing, analytics |
| Token counts | Yes | Billing |
| Latency | Yes | Performance |
| Error codes | Yes | Debugging |
| Prompts | No* | Only if opted in |
| Responses | No* | Only if opted in |

*Unless you enable prompt logging in settings

### What Agnic Never Does

- **Never trains on your data** - Your prompts are never used to train models
- **Never sells your data** - Your data is never shared with third parties for profit
- **Never inspects content** - We don't read your prompts or responses

---

## Best Practices

### For Sensitive Data

1. Use providers with zero-retention policies
2. Avoid including PII in prompts
3. Consider self-hosted models for highly sensitive data

### For Compliance

1. Document which providers you use
2. Set account-wide data policy restrictions
3. Use API tokens with appropriate scopes
4. Enable audit logging if needed

### For Privacy

1. Review provider policies before use
2. Use provider filtering for sensitive requests
3. Disable prompt logging unless needed

---

## Provider Terms of Service

For complete details, see each provider's terms:

| Provider | Terms |
|----------|-------|
| OpenAI | [openai.com/policies](https://openai.com/policies) |
| Anthropic | [anthropic.com/legal](https://anthropic.com/legal) |
| Google | [ai.google.dev/terms](https://ai.google.dev/terms) |
| Mistral | [mistral.ai/terms](https://mistral.ai/terms) |

---

## Questions?

For privacy or data handling questions:

- **Email**: privacy@agnic.ai
- **Documentation**: [Privacy Overview](/docs/privacy)

<Cards>
  <Card title="Data Collection" href="/docs/privacy/data-collection" />
  <Card title="Authentication" href="/docs/authentication" />
</Cards>
