Setup Guide

Complete step-by-step guide to setting up TraceMem for your first agent workflow. This guide covers all the foundational components you need before agents can make decisions through TraceMem.

Overview

Before your agents can use TraceMem, you need to set up the foundational components. Complete these steps in order:

  1. Connector - Connect to your data source
  2. Data Product - Create a governed interface to your data
  3. Agent - Get an API key for agent authentication
  4. Integration (optional) - Set up approval delivery channels
  5. Approval Route (optional) - Configure approval routing
  6. Policy (optional) - Define business rules

Step 1: Create a Connector

Connect to your data source (database or SaaS system):

  1. Go to Setup → Connectors in the dashboard
  2. Click Create Connector
  3. Select your connector type:
    • Database: PostgreSQL or MySQL
    • SaaS: Salesforce (or other supported systems)
  4. Enter a descriptive name (e.g., "production_database")
  5. Configure connection:
    • For databases: Use a connection string (recommended):
      text
      postgresql://username:password@host:5432/database?sslmode=require
      
    • For SaaS: Enter instance URL and OAuth credentials
  6. Click Create and verify connection status is connected

The system will automatically discover your schema. Wait a few minutes for schema discovery to complete.

Step 2: Create a Data Product

Create a governed interface to your data:

  1. Go to Config → Data Products in the dashboard
  2. Click Create Data Product
  3. Select Source:
    • Select the operation type (read, insert, update, or delete)
    • Choose the connector you created in step 1
    • Select the resource (table/object) to expose (e.g., public.customers)
  4. Choose columns:
    • Select which columns/fields agents can access
    • Mark required columns (e.g., primary keys)
    • Set data classification for each field (identifier, business, pii, sensitive_business)
  5. Fill in details:
    • Product Name: Unique identifier (e.g., customer_data)
    • Description: What this data product provides
    • Set Allowed Purposes: Add purposes like order_processing, support_triage, renewal_context
      • Every read/write operation must specify one of these purposes
  6. (Optional) Attach policies that apply to all access
  7. Review and Create the data product
  8. Publish when ready

Important: Each data product supports exactly one operation. If you need multiple operations, create separate data products.

Step 3: Create an Agent and Get an API Key

Create an agent and get an API key for authentication:

  1. Go to Settings → Agents in the dashboard
  2. Click Create Agent
  3. Enter agent name (e.g., my-first-agent)
  4. Click Create Credential
  5. Copy and save the API key (it's only shown once)
  6. Grant the agent access to the data products you created

Step 4: Create an Integration (Optional)

If your policies will require human approvals, set up an integration to deliver approval requests:

  1. Go to Config → Integrations in the dashboard
  2. Click Create Integration
  3. Choose your integration type:
    • Slack: For Slack channel approvals
    • Email: For email-based approvals
    • Webhook: For custom webhook endpoints
  4. Configure the integration:
    • Slack: Provide workspace ID, bot token, signing secret
    • Email: Configure SMTP/SES settings (from address, reply-to)
    • Webhook: Provide webhook URL, events to subscribe to, timeout, and retry settings
  5. Click Create

Note: You can skip this step if you only need automatic policy approvals (no human intervention).

Step 5: Create an Approval Route (Optional)

Define how approvals are routed and delivered:

  1. Go to Config → Approval Routes in the dashboard
  2. Click Create Approval Route
  3. Fill in:
    • Route ID: Unique identifier (e.g., apr_route_finance_01)
    • Name: Descriptive name (e.g., "Finance approvals")
    • Integration: Select the integration you created in step 4
    • Route: Where to send (Slack channel like #finance-approvals, email address, or uses webhook URL from integration)
    • Require Rationale: Whether approvers must provide reasoning
    • Expires In Seconds: How long the approval request is valid (e.g., 86400 for 24 hours)
  4. Click Create

Step 6: Create a Policy (Optional)

Define rules that determine if actions are allowed:

  1. Go to Config → Policies in the dashboard
  2. Click Create Policy
  3. Fill in:
    • Policy ID: Unique identifier (e.g., discount_cap_v1)
    • Description: What this policy does
  4. Define inputs (what the policy needs to evaluate):
    • Add input fields with name, type, and whether required
    • Example: proposed_discount (number, required)
  5. Define evaluation logic:
    • Write rules that return allow, deny, or requires_exception
    • Example: If proposed_discount <= 0.2 then allow, else requires_exception
    json
    {
      "logic": {
        "type": "rule_set",
        "rules": [
          {
            "if": {
              "left": {
                "var": "proposed_discount"
              },
              "op": "<=",
              "right": 0.2
            },
            "then": {
              "outcome": "allow"
            }
          },
          {
            "then": {
              "outcome": "requires_exception",
              "reason_code": "DISCOUNT_CAP_EXCEEDED"
            }
          }
        ]
      }
    }
    
  6. Configure exception route (if policy can return requires_exception):
    • Enable exception route
    • Select the approval route you created in step 5
    • Set whether rationale is required
    • Set expiration time
  7. Click Save as Draft, then Publish when ready

Related Topics

    Next Steps

    TraceMem is trace-native infrastructure for AI agents