Objective
An AI Agent system provides intelligent prospect qualification and lead generation through a multi-step, orchestrated workflow using multiple specialized deployments. This architecture demonstrates how to build a comprehensive lead generation pipeline where different AI agents handle specific stages: conversation, qualification, and CRM insertion. Each deployment is optimized for its specific task while working together to create a seamless prospect experience.Use Case
AI Agent is ideal for applications that need:- Multi-Stage Lead Processing: Break down prospect qualification into specialized steps handled by different agents
- Automated Prospect Qualification: Systematically collect prospect information and score leads based on qualification criteria
- CRM Integration: Automatically insert qualified leads directly into your sales pipeline
- Intelligent Routing: Route prospects through different workflows based on their responses and qualification level
- Sales Process Automation: Reduce manual lead processing while maintaining high-quality prospect data
Prerequisite
Before configuring an AI Agent, ensure you have:- Orq.ai Account: Active workspace in the Orq.ai Studio.
- API Access: Valid API key from Workspace Settings > API Keys.
- Model Access: At least one text generation model enabled in the Model Garden, such as gpt-4,claude-3-sonnet, orgpt-3.5-turbo.
- CRM API: Access to your CRM system API (Salesforce, HubSpot, Pipedrive, etc.) with authentication credentials for inserting new leads.
Multi-Agent Workflow Architecture

| Agent | Purpose | Tools | 
|---|---|---|
| 📞 Ingestion | Natural conversation & data collection | None | 
| 🔍 Qualification | Analyze conversation & score prospect | None | 
| 💾 Insertion | Validate data & insert into CRM | crminsert | 
Creating a CRM Insert Tool
First, create a tool for adding prospects to your CRM system. Head to the Orq.ai Studio:- Choose a Project and Folder and select the +button.
- Choose Tool.
- Create a crminserttool for adding prospects to your CRM
CRM Insert Tool Configuration
Configure the CRM tool with JSON schema for function calling:To learn more about Tools, see Creating a Tool.
Configuring Three Agent Deployments
Create three specialized deployments for the streamlined workflow:1. Ingestion Agent Deployment
Create the conversation and ingestion agent:- Choose Deployment → Name: ingestionAgent
- Select your preferred Model
- No tools required (conversation only)
- Configure System message:
2. Qualification Agent Deployment
Create the qualification and formatting agent:- Choose Deployment → Name: qualificationAgent
- Select your preferred Model
- No tools required (analysis only)
- Configure System message:
3. Insertion Agent Deployment
Create the CRM insertion agent:- Choose Deployment → Name: insertionAgent
- Select your preferred Model
- Add crminsert tool
- Configure System message:

CRM Agent ready
Learn more about tool configuration in Creating a Tool, and deployment setup in Creating a Deployment.
When ready with your Deployment choose Deploy, learn more about Deployment Versioning.
Integrating with the SDK
Choose your preferred programming language and install the corresponding SDK:Output
When going through the process, you’ll see the 3 agents at work:- The ingestion agent is progressively ingesting the conversation.
- The qualifying agent transforms and validates all the conversation.
- The insertion agent generates the correct payload.
Viewing Logs
Going back to the Deployment pages, you can view the calls made through your 3-agent prospect qualification system. Each agent deployment provides separate logs that you can analyze individually or collectively to understand the complete pipeline performance. You can view details for a single log by clicking on a log line. This opens a panel containing all the details for the log, including context, requests, and parameters sent to your Deployment.
Logs for the qualifying agent
To learn more about logs see Logs.
Key Benefits
- Simple: Linear 3-phase workflow (conversation → analysis → CRM)
- Efficient: Only 1 tool call across entire pipeline
- Scalable: Independent agents can be optimized separately
- Cost-effective: Minimal deployments and orchestration overhead
Next Steps: Learn about Logs and Tool Usage to monitor your pipeline.