Rules engines that break on the unexpected
Flows and scripts handle the path somebody wrote down. A free-text email, an unfamiliar invoice layout or a request that fits no branch falls through to a person, and the queue grows anyway.
An AI agent is software that uses a language model to decide the next step in a task, calls your business systems through approved tools to take it, and checks the result before moving on. Twopir Consulting designs, builds and governs AI agents and intelligent automation that qualify leads, keep CRM records current, work service cases, process documents and move finance work across Salesforce, HubSpot, your ERP and your data. Access controls, business rules and human approvals are designed in from the first workflow.
Trusted by 500+ organizations, from growing and mid-market companies to enterprise teams, to connect and automate the systems their revenue runs on.
Platforms We Build Agents On
A demo agent that answers questions takes a week. An agent that can be trusted to change a CRM record, raise an invoice or reply to a customer takes architecture: clean data, scoped access, clear rules and a way to catch the cases it should not handle alone. These are the gaps we are most often asked to close.
Flows and scripts handle the path somebody wrote down. A free-text email, an unfamiliar invoice layout or a request that fits no branch falls through to a person, and the queue grows anyway.
An assistant that summarizes a record still leaves someone to update it, route it and follow up. Without tools connected to the systems of record, AI adds a step instead of removing one.
Duplicate accounts, stale fields and three versions of the customer across CRM and ERP. An agent grounded on that data makes confident decisions on the wrong record.
An agent running as an admin integration user can read and change far more than its task needs. Security and compliance teams stop the project, rightly, before it reaches production.
What happens when the agent is unsure, a tool call fails or a request falls outside policy? Without a designed hand-off, failures are silent or every edge case lands back on the team.
Without traces, evaluations and an audit trail, nobody can explain a decision, measure accuracy or prove the agent is improving. That is usually where a promising pilot gets quietly shelved.
AI agent development is the work of designing, building, testing and operating software agents that use a large language model to reason about a task, call business systems through defined tools, and complete multi-step work within rules and permissions you set. Unlike a chatbot, an agent acts: it reads a record, decides what is needed, updates Salesforce or HubSpot, calls an ERP API, drafts the reply, and asks a person to approve when the step carries risk.
Three parties are involved, and it helps to keep them apart. Model and platform providers, such as OpenAI, Anthropic, Salesforce, Microsoft, AWS and Google Cloud, supply the language models, agent frameworks and runtimes. Your business owns the processes, the data, the policies and the final say on what an agent may do. Twopir Consulting does the work in between: choosing the right pattern and platform, connecting the agent to your systems, writing the instructions and guardrails, designing approvals and exception paths, testing against real cases and monitoring after launch.
Not every process needs an agent. Where the steps are fixed and the inputs are structured, a well-built Flow or integration is cheaper, faster and easier to audit, and we will say so. Agents earn their place where the input is unstructured, the next step depends on judgment, or the work spans several systems that no single rule can coordinate.
Building on Salesforce specifically? Our AI agents for Salesforce practice covers Agentforce, and Agentforce AI agent development covers custom actions and multi-agent designs inside Salesforce. For HubSpot, see AI in HubSpot; for the connections every agent depends on, see our integration services.
Rule-based automation, AI-powered automation, autonomous AI agents and multi-agent systems are not competing products. They are levels of autonomy, and most enterprise processes use more than one. The right choice is the simplest level that handles the real variety of the work.
| Approach | How it decides | Best for | Watch for |
|---|---|---|---|
| Rule-based automation | Predefined if-then logic in tools such as Salesforce Flow, HubSpot workflows or an integration platform. The same input always produces the same output. | High-volume, structured, stable steps: field updates, assignments, approvals routing, system-to-system syncs. | Brittle on unstructured input; every new case needs a new branch somebody has to build. |
| AI-powered automation | A fixed workflow with a model inside one or more steps: classify an email, extract fields from a document, summarize a case, score a lead. | Known processes with messy inputs, where the path is fixed but one step needs language understanding. | Model output still needs validation rules and a fallback when confidence is low. |
| Autonomous AI agent | The model chooses the next action itself, calling tools in a loop until the goal is met or it hands off to a person. | Open-ended tasks with several possible paths: researching and qualifying a lead, resolving a service request, reconciling an exception. | Needs scoped tools, step limits, guardrails, approvals on risky actions and full tracing. |
| Multi-agent system | An orchestrator delegates parts of a task to specialist agents, or agents hand work to each other, each with its own instructions and tools. | Work that crosses domains or systems, such as a quote-to-cash exception touching sales, finance and fulfilment. | More moving parts to test and monitor; worth it only when one agent with more tools would become unreliable. |
A production agent is more than a prompt and a model. These six components decide whether it is reliable, safe and maintainable, and each one is designed and documented before anything is built.
The model, chosen for the task, and the instructions that define the agent's goal, scope, tone and the business rules it must follow.
The defined actions an agent may take: read or update a record, query a database, call an API, send a message. Each tool has a clear contract and validates its inputs.
Grounding in your own records, documents and policies, so answers and actions reflect your business rather than the model's general knowledge.
How work is split and routed: a single agent with several tools, a router that sends each request to the right specialist, or an orchestrator that delegates sub-tasks and assembles the result.
The controls that keep an agent inside policy: input and output checks, approval steps before high-impact actions, and a clear path to a person when the agent is unsure.
Every run traced, so each decision and tool call can be explained, measured and improved, with test sets that catch regressions before a change reaches production.
Agent orchestration is the design of who does what: which steps stay fixed, which are left to a model, how tasks are delegated between agents, and where a person takes over. We start with the simplest pattern that works and add agents only when the task demands it.
A fixed sequence of model steps, each checking the one before. Predictable, cheap and easy to audit.
One step classifies the request and sends it to the workflow or agent built for that type.
One agent decides which tools to call, in what order, until the task is done. The right first step for most use cases.
A manager agent breaks the task down, delegates each part to a specialist agent, and assembles the outcome.
Agents pass the conversation or task to one another as the work changes domain, carrying context with it.
One agent produces, another reviews against criteria, and the work loops until it passes or goes to a person.
The best first agents sit on a process with volume, a clear definition of done and a system of record that can be checked. These are the workflows we design most often, and where each one keeps a person involved.
Every inbound lead researched, scored against your ideal customer profile and routed, with the reasoning written to the record.
Meeting notes, emails and calls turned into structured record updates, so the pipeline reflects what actually happened.
Cases classified, answered from your knowledge base, and resolved or escalated with the full context attached.
Invoices, purchase orders, contracts and application forms read, validated and written into the right system.
Quote checks, order entry, invoice follow-up and collections reminders run across CRM and ERP without re-keying.
Multi-step work that spans Salesforce, HubSpot, ERP, databases and collaboration tools, coordinated by one orchestrator.
We are platform-neutral on models and agent frameworks, and Salesforce-first on the systems of record. The platform is chosen for where your data lives, what your security team will approve, and who will maintain the agent after launch.
Salesforce's own agent platform, grounded in CRM and Data 360 data and protected by the Salesforce Trust Layer. We configure the agents and build the Flow, Apex and API actions behind them: see AI agents for Salesforce and Agentforce automation.
API-led integration that gives agents governed access to ERP, finance and legacy data beyond the CRM. MuleSoft can also expose existing APIs as MCP tools, so one integration layer serves people, systems and agents. More on our MuleSoft integration practice.
HubSpot groups its agents in Agent Hub, built on HubSpot CRM data across marketing, sales and service. We implement, configure and extend them with scoring, guardrails and approval gates, as described in AI in HubSpot.
OpenAI models and its Agents SDK, where the agent loop, tools and hand-offs run inside your own application. We use it for custom agents that call Salesforce, ERP and document services through tools you control.
Claude models with tool use, connected to your systems directly or through Model Context Protocol (MCP), the open standard for linking AI applications to tools, data and workflows.
Microsoft's platform for building and managing custom agents and workflows with governance controls. A fit when the work centres on Microsoft 365 and Teams and has to reach your CRM.
Amazon Bedrock models and guardrails, with Amazon Bedrock AgentCore for deploying and operating agents built on open-source frameworks. Often paired with services such as Textract for document processing.
Gemini models and Google's open-source Agent Development Kit for multi-agent orchestration, plus the Agent2Agent (A2A) protocol that lets agents built on different platforms delegate work to each other.
When the work lives in one system, such as service cases in Salesforce or marketing contacts in HubSpot, an agent built on that platform's own agent tools inherits its data, permissions and audit trail.
Less to integrate and secure, and your admins can maintain most of it.
When an agent must coordinate CRM, ERP, databases and outside services, or needs a specific model or hosting arrangement, we build it on an agent framework and cloud platform, connected through APIs and integration middleware.
More flexibility, with access controls, logging and evaluation built in from the start rather than added later.
An agent should never be able to do more than the person who would otherwise do the job. We enforce that in the systems themselves, not only in the prompt, because instructions can be misread and permissions cannot.
| Control | How we enforce it |
|---|---|
| Least-privilege identity | Each agent runs as its own integration user or service identity, with profiles, permission sets and sharing rules that cover only its task. |
| Scoped tools | The agent can call only the actions it is given, and each action validates inputs and refuses writes outside its object, field or record scope. |
| Business rules in the system | Validation rules, approval processes and API-side checks stay in force, so a discount limit or credit rule applies to the agent exactly as it does to a person. |
| Human approval gates | Refunds, pricing changes, contract terms, outbound messages to key accounts and any irreversible step wait for a named approver. |
| Data protection | Sensitive fields masked or excluded from model context, data residency and retention agreed with your security team, and no secrets in prompts. |
| Exception handling | Failed tool calls retry safely or stop; low-confidence results and policy conflicts go to a queue with the full trace attached. |
| Audit and monitoring | Every run, tool call and approval is logged against the record it touched, with dashboards for accuracy, hand-off rate and cost. |
We start with one workflow, prove it on real cases with a person reviewing every action, and widen the agent's autonomy only as the evidence supports it. Timelines depend on the number of systems involved and the state of the data, and we scope them in discovery before you commit.
We map candidate workflows by volume, value, risk and data readiness, and pick the first one where an agent can be measured against today's baseline.
DeliverablePrioritized use cases and success measures
The automation level, orchestration pattern, platform, tools, data sources, permissions, approval points and exception paths, designed and signed off.
DeliverableAgent design and control matrix
Instructions, tools, integrations and guardrails built in a sandbox against your real systems, never directly in production.
DeliverableWorking agent in a sandbox, demoed end to end
The agent is run against an evaluation set built from real historical cases, including the awkward ones, until accuracy and hand-off behaviour meet the agreed bar.
DeliverableEvaluation report and business sign-off
Live in production with a person approving every consequential action, then with approvals narrowed to the steps that genuinely need them.
DeliverableLive agent, runbook and trained reviewers
Traces, accuracy, cost and hand-off rates watched over time, model and prompt changes regression-tested, and the next workflow added on the same foundation.
DeliverableMonitoring dashboards and roadmap
Most of the effort in an enterprise AI agent is not the model. It is the CRM data, the integrations, the permissions and the business rules the agent has to respect. That is the work we have been doing for 12+ years.
We decide the automation level, the orchestration pattern and the controls before choosing a model, and we recommend a rule-based Flow or integration when that is the better answer.
Our agents are built around the CRM data model, sharing rules and automation already in your org, so they strengthen the system instead of working around it. It is the same foundation behind our AI in Salesforce and revenue operations work.
ERP, middleware, databases and outside services are where agents usually fail. Integration, ERP and automation work is our everyday practice, and AI is the newest layer on it.
Clients across professional services, healthcare, real estate, SaaS and more, in markets from the US and Canada to the UK, the UAE, Australia and New Zealand.
Architects stay on the engagement from discovery to monitoring, and you get documented designs, evaluation sets and runbooks your team can own.
Use-case discovery and prioritization, then agent architecture: the automation level, orchestration pattern, platform, tools, data sources, permissions, approval points and exception paths. After that comes the build and integration with your CRM, ERP and other systems in a sandbox, evaluation against real historical cases, a supervised launch with human approvals, and ongoing monitoring and improvement. Choosing the model is a small part of it; most of the work is connecting the agent safely to the systems it acts in.
AI-powered automation keeps a fixed workflow and uses a model inside one or more steps, for example to classify an email or extract fields from an invoice. An AI agent decides the next step itself, choosing which tools to call and in what order until the task is done or it hands off to a person. Automation is more predictable and cheaper to run; an agent handles open-ended work with several possible paths. Most production systems combine both.
When one task spans several domains or systems and a single agent with every tool would become unreliable. In a multi-agent system an orchestrator delegates parts of the work to specialist agents, each with its own instructions and a narrow set of tools, or agents hand the task to one another as it changes domain. It adds testing and monitoring effort, so we start with a single agent and move to multiple agents only when the evidence shows it is needed.
Through defined tools: actions that read or update records, call APIs or run existing automation, each running under an identity with only the permissions its task needs. In Salesforce that can mean Agentforce actions built on Flow, Apex and APIs; in HubSpot, Agent Hub agents, workflows and the HubSpot APIs; for ERP systems and databases, APIs or integration middleware such as MuleSoft. The systems keep enforcing their own validation rules, sharing and approval processes, so the agent works inside the same business rules as your team.
We enforce control in the systems, not only in the prompt. Each agent runs as its own least-privilege identity, can call only the tools it is given, and every tool validates its inputs. Validation rules and approval processes stay in force, high-impact actions such as refunds, pricing changes or contract terms wait for a named approver, sensitive fields are masked or excluded from model context, and every run and tool call is logged against the record it touched.
If the work lives mainly in Salesforce, such as service cases, sales records or a customer portal, Agentforce is usually the right starting point because it inherits your Salesforce data, permissions and audit trail. A custom agent built on a framework from OpenAI, Anthropic, Microsoft, AWS or Google Cloud makes sense when the work spans many systems, needs a specific model or hosting arrangement, or sits outside the CRM. We are platform-neutral on models and recommend whichever your team can secure and maintain.
Against the baseline captured in discovery, using measures agreed before the build: accuracy on an evaluation set of real cases, the share of work completed without a hand-off, the rate of approvals that were edited or rejected, handling time, and cost per run. Every run is traced, so a wrong decision can be explained and turned into a new test case, and any change to the model or instructions is regression-tested before it reaches production.
A first conversation covers the process you want to automate, the systems it touches, your data and your approval rules: enough to say whether an agent, AI-powered automation or a simple Flow is the right fit, and what the first build would take. No obligation to proceed.
Talk to an architect who builds AI agents on Salesforce, HubSpot and your ERP