Setup Guide
Complete step-by-step guide to setting up TraceMem for your first agent workflow.
Overview
Before your agents can use TraceMem, you need to set up the foundational components. Complete these steps in order:
Step 1: Create a Connector
Connect to your data source (database or SaaS system):
- Navigate to Setup → Connectors in the TraceMem dashboard
- Click Create Connector
- Select your connector type:
- Database: PostgreSQL or MySQL
- SaaS: Salesforce (or other supported systems)
- Enter a descriptive name (e.g., "Production Database")
- 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
- For databases: Use a connection string (recommended):
- Click Create and test the connection
The system will automatically discover your schema. Wait a few minutes for schema discovery to complete.
Step 2: Create an Approval Integration (If Needed)
If your policies will require human approvals, set up an integration:
- Navigate to Config → Integrations in the dashboard
- Choose your integration type:
- Slack: For Slack channel approvals
- Email: For email-based approvals
- Webhook: For custom webhook endpoints
- Configure the integration:
- Slack: Provide workspace ID, bot token, signing secret, and default channel
- Email: Configure SMTP/SES settings
- Webhook: Provide webhook URL, events, timeout, and retry settings
- Click Create
Note: You can skip this step if you only need automatic policy approvals (no human intervention).
Step 3: Create an Approval Route
Define how approvals are delivered:
- Navigate to Config → Approval Routes in the dashboard
- Click Create Approval Route
- Enter:
- Route ID: Unique identifier (e.g.,
apr_route_finance_01) - Name: Descriptive name (e.g., "Finance approvals")
- Channel: Select the integration type (Slack, email, or webhook)
- Route: Where to send (Slack channel like
#finance-approvals, email address, or webhook URL) - Require Rationale: Whether approvers must provide reasoning
- Expires In Seconds: How long the approval request is valid (e.g., 86400 for 24 hours)
- Route ID: Unique identifier (e.g.,
- Click Create
Step 4: Create a Policy
Define rules that determine if actions are allowed:
- Navigate to Config → Policies in the dashboard
- Click Create Policy
- Enter:
- Policy ID: Unique identifier (e.g.,
discount_cap_v1) - Description: What this policy does
- Policy ID: Unique identifier (e.g.,
- Define inputs (what the policy needs to evaluate):
text
{ "inputs": [ { "name": "proposed_discount", "type": "number", "required": true } ] } - Define evaluation logic:
text
{ "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" } } ] } } - Configure exception route (if policy can return
requires_exception):- Enable exception route
- Select the approval route you created in step 3
- Set whether rationale is required
- Set expiration time
- Click Save as Draft, then Publish when ready
Step 5: Create a Data Product
Create a governed interface to your data:
- Navigate to Config → Data Products in the dashboard
- Click Create Data Product
- Enter:
- Product ID: Unique identifier (e.g.,
customer_data) - Description: What this data product provides
- Product ID: Unique identifier (e.g.,
- Select sources:
- Choose the connector you created in step 1
- Select the resource (table/object) to expose (e.g.,
public.customers)
- Define exposed schema:
- Select which columns/fields agents can access
- Set data classification for each field (identifier, business, pii, sensitive_business)
- Set allowed purposes:
- Add purposes like
order_processing,support_triage,renewal_context - Every read/write operation must specify one of these purposes
- Add purposes like
- Configure allowed operations:
- Enable read, write, insert, update, delete as needed
- (Optional) Attach policies that apply to all access
- Click Save as Draft, then Publish when ready
Step 6: Get Your API Key
Create an agent and get an API key:
- Navigate to Settings → Agents in the TraceMem dashboard
- Create an agent (if you haven't already)
- Create a credential to get an API key
- Save the API key securely (it's only shown once)
- Grant the agent access to the data products you created