Why give your AI agent a CRM?
Because the most powerful agent is the one that can actually do things.
Zero-Code Integration
snx.
Pipe output to JSON automatically.
Built for Agents
Secure by Design
Full CRM Coverage
Composable
jq, Python, or another agent. Build entire workflows
in bash one-liners.
Works Everywhere
Works with Every AI Agent
Any tool that can execute shell commands can use SalesNexus CLI out of the box.
GitHub Copilot Agent Mode
VS Code
Copilot’s agent mode in VS Code can run terminal commands autonomously. Just ask it in natural language.
- Runs
snxdirectly in VS Code terminal - Reads JSON output and reasons over it
- Chains multi-step CRM workflows
- Built into VS Code — no setup needed
Claude Code (Anthropic)
Terminal
Anthropic’s agentic coding tool with full terminal access. Perfect for complex, multi-step CRM
operations.
- Autonomous shell command execution
- Parses JSON responses natively
- Handles errors and retries intelligently
- Ideal for bulk data operations
Cursor Agent
IDE
Cursor’s agent mode can run terminal commands and iterate on results, making CRM automation effortless.
- Composer agent runs shell commands
- Auto-iterates on CLI output
- Creates scripts that use
snx - Full IDE integration
Windsurf (Codeium)
IDE
Windsurf’s Cascade agent can execute terminal commands, read output, and plan follow-up actions.
- Cascade flow runs CLI commands
- Reads & interprets structured output
- Multi-step pipeline management
- Agentic context awareness
OpenAI Codex CLI
Terminal
OpenAI’s open-source coding agent runs in your terminal and can execute snx commands
directly.
- Sandboxed shell execution
- Supports full-auto mode
- Reads piped JSON natively
- Open-source, customizable
Custom Agents (LangChain, CrewAI, etc.)
Framework
Any agent framework with a shell tool can integrate SalesNexus in minutes.
- LangChain
ShellTool - CrewAI process agents
- AutoGen code executors
- Any
subprocess.run()wrapper
Real-World Agent Examples
See how agents use snx to automate CRM work that would take humans hours.
Lead Qualification & Enrichment
GitHub Copilot Agent Mode — VS Code
A sales manager asks Copilot to find unqualified leads and enrich them with pipeline info.
opportunity for each one in the “SMB Sales” goal and add a note saying they need a follow-up call.
IDs, then search for Texas contacts.
snx goals list –json
{ “data”: [{ “id”: 5, “name”: “SMB Sales”, “pipelines”: [{ “stages”: [{ “id”: 11, “name”: “Prospecting” }]
}] }] }
snx contacts list –all –json | jq ‘[.data[] | select(.state==”TX”)]’
[{ “id”: 101, “firstName”: “Jane”, “lastName”: “Doe”, “state”: “TX” }, { “id”: 205, “firstName”: “Mark”,
“lastName”: “Rivera”, “state”: “TX” }]
snx opps create –contact-id 101 –goal-id 5 –stage-id 11 –title “SMB Prospecting — Jane Doe”
snx notes create –contact-id 101 –text “AI: Unqualified lead in TX. Needs follow-up call.”
Texas (Jane Doe and Mark Rivera) and added follow-up notes to each. Both are now in the “Prospecting”
stage of SMB Sales.
Pipeline Review & Stalled Deal Alerts
Claude Code — Terminal
A VP of Sales asks Claude Code to analyze the pipeline and identify stalled deals.
flag them as stalled and create a high-priority task for the owner.
snx opps list –all –json
Found 3 opps over $25K not updated since before Jan 27, 2026:
• #200 “Acme Enterprise” — $50,000 — owner: user 3 — last update: Dec 15
• #215 “GlobalTech Renewal” — $32,000 — owner: user 7 — last update: Jan 10
• #220 “Meridian Expansion” — $28,500 — owner: user 3 — last update: Jan 5
snx opps update 200 –custom-field “deal_status=Stalled”
snx tasks create –title “STALLED: Acme Enterprise ($50K) — re-engage” –priority “High” –assigned-to 3
–opportunity-id 200 –date-from “2026-02-27T09:00:00”
$110,500 have been flagged as stalled. High-priority tasks have been assigned to the
respective owners with tomorrow’s date. Here’s the summary:
| Acme Enterprise | $50,000 | 72 days stalled | → User 3 |
| GlobalTech Renewal | $32,000 | 47 days stalled | → User 7 |
| Meridian Expansion | $28,500 | 52 days stalled | → User 3 |
Post-Event Lead Import & Campaign Assignment
Cursor Agent — Composer
After a trade show, a marketing manager asks their agent to bulk-import leads and assign them to a drip
campaign.
with lead_source=”Trade Show” and event=”Houston Tech Expo 2026″, then add them all to a new task for
our SDR team to follow up by March 5th.
snx contacts create -f “Sarah” -l “Chen” -e “sarah@techcorp.io” -c “TechCorp” –title “CTO” –city “Houston”
–state “TX” -F “lead_source=Trade Show” -F “event=Houston Tech Expo 2026”
snx contacts create -f “David” -l “Kim” -e “dkim@innovate.co” -c “Innovate LLC” –title “VP Eng” –city
“Austin” –state “TX” -F “lead_source=Trade Show” -F “event=Houston Tech Expo 2026”
snx contacts create -f “Lisa” -l “Patel” -e “lpatel@nexgen.com” -c “NexGen Solutions” –title “Director”
–city “Dallas” –state “TX” -F “lead_source=Trade Show” -F “event=Houston Tech Expo 2026”
snx contacts create -f “James” -l “Wu” -e “jwu@dataflow.ai” -c “DataFlow AI” –title “CEO” –city “Houston”
–state “TX” -F “lead_source=Trade Show” -F “event=Houston Tech Expo 2026”
IDs: 310, 311, 312, 313
snx tasks create –title “Follow up: Houston Tech Expo 2026 leads” –details “4 new leads from trade show
booth. Sarah Chen (TechCorp), David Kim (Innovate), Lisa Patel (NexGen), James Wu (DataFlow). All tagged.”
–type “Call” –priority “High” –date-from “2026-03-01T09:00:00” –date-to “2026-03-05T17:00:00”
–contact-id 310
each tagged with the trade show source. A high-priority follow-up task is scheduled for March 1–5. The
SDR team will see it on their dashboard.
Weekly Pipeline Report Generation
OpenAI Codex CLI — Full Auto Mode
A scheduled agent autonomously generates a weekly pipeline summary every Monday morning.
snx opps list –all –json | python3 -c ”
import json, sys
data = json.load(sys.stdin)[‘data’]
total = sum(o.get(‘amount’, 0) or 0 for o in data)
by_stage = {}
for o in data:
s = o.get(‘currentStageId’, ‘Unknown’)
by_stage[s] = by_stage.get(s, 0) + (o.get(‘amount’, 0) or 0)
print(json.dumps({‘total_pipeline’: total, ‘deals’: len(data), ‘by_stage’: by_stage},
indent=2))
“
{
“total_pipeline”: 487500.00,
“deals”: 23,
“by_stage”: { “11”: 85000, “12”: 142500, “13”: 210000, “14”: 50000 }
}
snx templates stats 42 –json
{ “sent”: 1250, “opens”: 487, “clicks”: 134, “bounces”: 12 }
📊 $487,500 total pipeline across 23 deals
• Prospecting: $85,000 (5 deals)
• Qualification: $142,500 (8 deals)
• Proposal: $210,000 (7 deals)
• Closed Won: $50,000 (3 deals)
📧 Last campaign: 39% open rate, 10.7% click rate
Report stored and emailed to the team.
Custom Agent: Automated Lead Scoring
LangChain + ShellTool — Python Script
A custom LangChain agent scores leads based on engagement data and updates the CRM automatically.
# lead_scoring_agent.py — LangChain agent with SalesNexus CLI from langchain.agents import initialize_agent, Tool from langchain_community.tools import ShellTool from langchain_openai import ChatOpenAI shell = ShellTool() tools = [Tool(name="snx", func=shell.run, description=""" Run SalesNexus CLI commands. Examples: - snx contacts list --all --json (list all contacts) - snx contacts get {id} --json (get contact details) - snx contacts update {id} --custom-field "score=85" - snx opps create --contact-id {id} --goal-id 5 - snx notes create --contact-id {id} --text "..." Returns JSON when piped. Use jq to filter. """)] llm = ChatOpenAI(model="gpt-4o", temperature=0) agent = initialize_agent(tools, llm, agent="zero-shot-react-description") agent.run(""" Score all contacts that were created in the last 7 days. Scoring rules: - Has email: +30 points - Has phone: +20 points - Has company: +20 points - Has title with "VP", "Director", "C-level": +30 points Update each contact's 'lead_score' custom field with the total. If score >= 70, create a high-priority task for user 3. """)
• 4 contacts scored 80+ → high-priority tasks created
• 5 contacts scored 50–70 → warm leads
• 3 contacts scored below 50 → need enrichment
All lead_score fields updated in SalesNexus.
Natural Language CRM Queries
Any Agent — Conversational
Users ask questions in plain English. The agent translates them into CLI commands instantly.
snx contacts list –all –json | jq ‘[.data[] | select(.state==”CA”)] | length’
snx opps list –all –json | jq ‘[.data[] | select(.closeDate >= “2026-02-01” and .closeDate <= “2026-02-28”
) | .amount // 0] | add’
today.
snx contacts list –search “Jane Doe” –json
snx contacts update 101 –custom-field “status=Customer”
snx notes create –contact-id 101 –text “Contract signed on Feb 26, 2026. Status updated to Customer.”
logged the contract signing note.
Command Cheat Sheet for Agents
Every command your agent needs, at a glance.
| Action | Command | Category |
|---|---|---|
| Check connection | snx ping |
Setup |
| List all contacts | snx contacts list --all --json |
Contacts |
| Search contacts | snx contacts list --search "Acme" --json |
Contacts |
| Get contact details | snx contacts get 101 --json |
Contacts |
| Create contact | snx contacts create -f "Jane" -l "Doe" -e "j@co.com" -c "Acme" |
Contacts |
| Update contact | snx contacts update 101 --title "VP Sales" -F "score=90" |
Contacts |
| Bulk update | snx contacts batch-update --ids "1,2,3" --field "status=Active" |
Contacts |
| Create opportunity | snx opps create --contact-id 101 --goal-id 5 --amount 50000 |
Deals |
| Move deal stage | snx opps update 200 --stage-id 13 |
Deals |
| Create task | snx tasks create --title "Follow up" --priority "High" -c 101 |
Tasks |
| Add note | snx notes create --contact-id 101 --text "Called, interested" |
Notes |
| List pipelines | snx goals list --json |
Pipeline |
| Get campaign stats | snx templates stats 42 --json |
Campaigns |
| List custom fields | snx fields list --json |
Schema |
| Export to CSV | snx --csv contacts list --all > contacts.csv |
Export |
How Agent Integration Works
Three properties make snx the perfect agent tool.
Auto-JSON Output
When called via subprocess (non-TTY), snx automatically outputs JSON on stdout. No special
flags needed. Status messages go to stderr.
$ snx contacts get 101 | cat { "id": 101, "firstName": "Jane", ... }
Structured Errors
Exit code 0 = success, 1 = error. Errors go to stderr with clear messages. Your
agent always knows what happened.
# stdout: empty (no JSON) # stderr: Error: HTTP 404: Contact not found. # exit code: 1
Auto-Retry
Rate limits (429) and transient errors (502, 503, 504) are retried automatically with exponential backoff.
Your agent never sees flaky failures.
# Agent runs 100 commands. # CLI handles retries silently. # Agent gets clean results every time. ✓ 100/100 commands succeeded
Get Started in 60 Seconds
Three commands and your AI agent is managing your CRM.