Misar IO Docs

AI Sales Agent

Autonomous AI agent that monitors replies, detects intent, and takes follow-up actions on your behalf

AI Sales Agent

The AI Sales Agent watches your CRM inbox for new replies, classifies each one by intent, and — when confidence is high enough — takes action automatically: sending a follow-up, booking a meeting, sharing a pricing offer, or flagging the conversation for human review.

All agent actions are logged and auditable. You stay in control.

Auth: Session cookie (dashboard UI).


How It Works

  1. A lead replies to one of your campaigns
  2. Agent reads the reply and classifies intent (interested, objection, booking, etc.)
  3. Agent decides on an action based on your configured playbook (confidence threshold, offer, cal link)
  4. If auto_send is enabled and confidence ≥ threshold → action is taken automatically
  5. If below threshold → conversation is flagged for human review (flagged_human: true)
  6. Every action is logged in the agent actions audit log

Agent Configuration

The agent has one configuration row per user. Configure it once via the dashboard or API.

| Field | Default | Description | |-------|---------|-------------| | enabled | false | Master switch — must be true for the agent to act | | cal_link | — | Calendly / cal.com URL shared when a lead wants to book | | offer_price | 0 | Price for your offer in paise (₹10,000 = 1000000) | | offer_description | — | Short description of your product / service | | max_replies_per_day | 20 | Daily cap on automated replies | | confidence_threshold | 0.65 | Minimum confidence (0–1) required to auto-send |


Agent Actions

| Action | When Triggered | |--------|----------------| | reply | General follow-up to a positive or question reply | | ask_for_meeting | Lead signals interest — agent offers your cal link | | send_offer | Lead asks about pricing — agent shares offer details | | close_deal | Lead confirms they want to proceed | | human_handoff | Confidence below threshold or complex situation detected |


Endpoints

| Method | Path | Description | |--------|------|-------------| | GET | /api/v1/sales-agent/config | Get your agent configuration | | PATCH | /api/v1/sales-agent/config | Update agent configuration | | GET | /api/v1/sales-agent/actions | List agent action audit log | | GET | /api/v1/sales-agent/actions/:id | Get a single action |


GET /api/v1/sales-agent/config

curl https://api.misar.io/mail/v1/sales-agent/config \
  -H "Cookie: sb-access-token=YOUR_SESSION"

Response

{
  "success": true,
  "config": {
    "enabled":               false,
    "cal_link":              "https://cal.com/priya/30min",
    "offer_price":           1999900,
    "offer_description":     "MisarMail Pro — unlimited outreach for ₹19,999/mo",
    "max_replies_per_day":   20,
    "confidence_threshold":  0.70,
    "updated_at":            "2026-04-01T00:00:00Z"
  }
}

PATCH /api/v1/sales-agent/config

Update one or more config fields.

curl -X PATCH https://api.misar.io/mail/v1/sales-agent/config \
  -H "Cookie: sb-access-token=YOUR_SESSION" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled":              true,
    "cal_link":             "https://cal.com/priya/30min",
    "confidence_threshold": 0.70
  }'

Setting enabled: true activates autonomous replies. The agent will send emails on your behalf up to max_replies_per_day. Make sure offer_description and cal_link are configured before enabling.


GET /api/v1/sales-agent/actions

List the agent's action history, newest first.

curl "https://api.misar.io/mail/v1/sales-agent/actions?page=1&per_page=25" \
  -H "Cookie: sb-access-token=YOUR_SESSION"

Query Parameters

| Param | Default | Notes | |-------|---------|-------| | auto_sent | — | true or false to filter by automated vs. suggested actions | | flagged_human | — | true to see only conversations needing review | | action | — | Filter by action type: reply, ask_for_meeting, send_offer, close_deal, human_handoff | | page | 1 | | | per_page | 25 | Max 100 |

Response

{
  "success": true,
  "actions": [
    {
      "id":              "action-uuid-...",
      "conversation_id": "conv-uuid-...",
      "action":          "ask_for_meeting",
      "reason":          "Lead expressed strong interest and asked about next steps",
      "confidence":      0.89,
      "reply_sent":      "Hi Priya, I'm glad this resonates! You can book a 30-min call here: https://cal.com/priya/30min",
      "auto_sent":       true,
      "flagged_human":   false,
      "created_at":      "2026-04-13T09:15:00Z"
    },
    {
      "id":              "action-uuid-2...",
      "conversation_id": "conv-uuid-2...",
      "action":          "human_handoff",
      "reason":          "Reply contains a legal question about data residency — below confidence threshold",
      "confidence":      0.41,
      "reply_sent":      null,
      "auto_sent":       false,
      "flagged_human":   true,
      "created_at":      "2026-04-13T09:20:00Z"
    }
  ],
  "pagination": { "page": 1, "per_page": 25, "total": 84 }
}

Action Audit Fields

| Field | Description | |-------|-------------| | action | Action taken or recommended | | reason | Agent's explanation for the decision | | confidence | Model confidence score (0–1) | | reply_sent | The actual message sent (null if auto_sent: false) | | auto_sent | Whether the action was taken automatically | | flagged_human | Whether the conversation is queued for manual review |


Reviewing Flagged Conversations

When the agent flags a conversation for human review, it appears in your CRM inbox with a "Needs Review" badge. You can:

  • Approve the agent's suggested reply and send it
  • Edit the reply before sending
  • Dismiss and handle the conversation manually
  • Train the agent by marking its suggestion as good or bad (improves future confidence scores)