Introduction: Why AI agents are essential for modern business workflows
Today’s businesses must respond to increasingly demanding customers, ever-changing regulations, and global competition. AI agents, powered by large language models (LLMs) and multimodal capabilities, offer a way to repeatedly automate tasks, extract critical information, and make consistent decisions. In this article, you’ll learn how to build practical AI agents for business workflows, with ready-to-use code examples and insights from the latest industry developments, such as TII’s new Falcon-ASR, Z.ai’s GLM-Legal, and Cloudflare’s Clef-omni multimodal model.
Step 1: Define the workflow and choose the right agent
Before writing a single prompt, map the process you want to automate. Ask yourself:
- What input data is needed? (text, audio, images, video?)
- What decisions need to be made? (classification, extraction, action?)
- What downstream systems need to be integrated? (ERP, CRM, databases...)
Example of workflow mapping
A typicalinvoice management workflowmight include:
- Acquisition:Receiving the invoice PDF via email or upload.
- Processing:Extracting invoice number, date, amount, vendor, and line items.
- Validation:Checking spending limits, compliance rules (e.g., GDPR, legal billing).
- Action:Automatic entry into the ERP system and approval via workflow.
By choosing an agent that excels at text extraction from images (PDFs) and a legal model like GLM-Legal for compliance, you achieve a balanced system between accuracy and safety.
Step 2: Create a results-oriented prompt
The prompt is the AI agent’s “work program.” A well-structured prompt includes:
- Role:Define the agent’s perspective (e.g., “You are an expert accountant processing invoices for a global company.”)
- Context:Provide relevant details (data structure, regulations, examples).
- Task:Request the specific action to be performed.
- Output format:Specify the desired output format (JSON, Markdown, bullet list).
Prompt template for invoice extraction
You are an accounting assistant extracting data from invoice images. Return a JSON object with fields: invoice_number, date, amount, vendor_name, line_items (list of {description, quantity, unit_price, total}).
If any field is missing, set it to null. Keep the output valid JSON only.
---
Invoice image:This template works with any LLM that understands text and can be combined with an optical character recognition (OCR) model to convert images to text before sending.
Step 3: Multimodal integration with agents like Clef-omni
Cloudflare’s new Clef-omni handles text, audio, images, and video in a single decision model. For business workflows, this means you can send a multimodal attachment (e.g., an audio file of a sales call) and get a single structured response.
Example: Lead acquisition agent from calls
1.Whisper(or TII’s Falcon-ASR for Arabic dialects) transcribes the call audio into text.
2.Clef-omnianalyzes the transcription, any visitor screen image captured during the call, and the lead profile text.
3. The agent returns a JSON with: lead name, email, qualification score, suggested next step.
The whole process can be orchestrated with a low-code workflow like LangChain or n8n, reducing time-to-insight from hours to seconds.
Step 4: Testing, iteration, and monitoring
AI agents are never “finished.” Implement a feedback loop:
- Manual sampling:Check a subset of outputs for accuracy.
- Performance metrics:WER for audio, extraction accuracy, response time.
- Prompt tuning:Refine role, context, or output format based on results.
Use a simple dashboard (e.g., Grafana + MLflow logs) to track these KPIs and automatically trigger model retraining when metrics fall below a defined threshold.
Practical use cases and ready-to-use code
1. IT support assistant (ticket-based)
# Pseudocode for a ticket triage agent
import openai
from pymongo import MongoClient
def triage_ticket(ticket_text, priority_keywords):
prompt = f"""
You are an IT support triage assistant. Given the ticket description below, classify it into:
- category: Incident, Request, Problem
- priority: High, Medium, Low
- suggested_action: brief step for the team
Ticket: {ticket_text}
"""
response = openai.ChatCompletion.create(model="gpt-4", messages=[{"role": "user", "content": prompt}])
parsed = json.loads(response.choices[0].message.content)
# Save to DB
MongoClient().tickets.insert_one({"ticket": ticket_text, "analysis": parsed})
return parsed2. Legal compliance check (based on GLM-Legal)
# Example compliance check for a contract
def check_compliance(contract_text):
prompt = f"""
You are a legal compliance agent. Review the contract below and flag any clauses that may violate EU GDPR, Italian privacy law, or industry-specific regulations.
Provide a list of issues with severity (high/medium/low).
Contract: {contract_text}
"""
response = zai.Client().chat(model="GLM-Legal", messages=[{"role": "user", "content": prompt}])
return response.choices[0].message.contentKey takeaways
- Define the business workflow, choose the right agent (text, audio, multimodal) and align with current trends like Falcon-ASR, GLM-Legal, and Clef-omni.
- Write clear prompts with role, context, task, and output format.
- Integrate agents with existing systems using APIs, queues, and monitoring dashboards.
- Continuously iterate based on metrics and feedback.
Next steps
Select a small repetitive process in your company (e.g., customer data entry). Create a trial AI agent using the prompt template above and connect it to a spreadsheet. Measure time savings and accuracy after one week. Success will give you the confidence to scale to larger processes.
Conclusion
Thanks to increasingly capable language models, specialized speech recognition like Falcon-ASR, and dedicated legal support from GLM-Legal, building AI agents for business workflows has never been more accessible. By following the steps of mapping, prompt engineering, integration, and iteration, you can transform manual operations into automated, secure, and data-driven processes. Start today, measure results, and scale automation across your organization.
IMPORTANT: We are in 2026. All temporal references must be current. Do not mention past years like 2024, 2023, etc. The content must be fresh and relevant to the present. CURRENT CONTEXT (October 2026): Here are some recent trends and news to inspire you: - TII Releases Falcon-ASR: 1.6B Arabic Speech Model Hits 20.92% WER: TII has released Falcon-ASR, a 1.6B speech recognition model for Arabic with an Emirati focus. It reports 20.92% average WER on 6 Arabic test sets, bu... [2026-10-12] - Top 12 AI Live Translation Tools in 2026: Latency, Languages, Pricing: We checked 12 AI live translation tools, including Palabra.ai, Google Live Translate, DeepL Voice, Teams Interpreter and Wordly, against official page... [2026-10-12] - Meet Cloudflare Clef-omni: A 30B-A3B Multimodal Decision Model for Audio, Video, Image and Text: Cloudflare released Clef-omni, an Apache-2.0 multimodal decision model built on Qwen3-Omni-30B-A3B. It scores text, images, audio and video in one cal... [2026-10-12] Use this current information as inspiration to create an original and relevant prompt for 2026.