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:
- Connector - Connect to your data source
- Data Product - Create a governed interface to your data
- Agent - Get an API key for agent authentication
- Integration (optional) - Set up approval delivery channels
- Approval Route (optional) - Configure approval routing
- Policy (optional) - Define business rules
Step 1: Create a Connector
Connect to your data source (database or SaaS system):
- Go to Setup → Connectors in the 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 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:
- Go to Config → Data Products in the dashboard
- Click Create Data Product
- 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)
- 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)
- 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
- Product Name: Unique identifier (e.g.,
- (Optional) Attach policies that apply to all access
- Review and Create the data product
- 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:
- Go to Settings → Agents in the dashboard
- Click Create Agent
- Enter agent name (e.g.,
my-first-agent) - Click Create Credential
- Copy and save the API key (it's only shown once)
- 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:
- Go to Config → Integrations in the dashboard
- Click Create Integration
- 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
- Email: Configure SMTP/SES settings (from address, reply-to)
- Webhook: Provide webhook URL, events to subscribe to, timeout, and retry settings
- 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:
- Go to Config → Approval Routes in the dashboard
- Click Create Approval Route
- 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)
- Route ID: Unique identifier (e.g.,
- Click Create
Step 6: Create a Policy (Optional)
Define rules that determine if actions are allowed:
- Go to Config → Policies in the dashboard
- Click Create Policy
- Fill in:
- 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):
- Add input fields with name, type, and whether required
- Example:
proposed_discount(number, required)
- Define evaluation logic:
- Write rules that return
allow,deny, orrequires_exception - Example: If
proposed_discount <= 0.2thenallow, elserequires_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" } } ] } } - Write rules that return
- 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
- Click Save as Draft, then Publish when ready