Agents

How agents are built and run

Primitives, the supervisor → sub-agent pattern, tools and MCP policies, approvals, the run lifecycle, the agent library and the SDLC agent team.

Updated: September 2026

Primitives

In the visual agent builder every agent is composed from eight primitives. The Autonomous Agent uses the same primitives; an agent produced by dialogue runs and is observed exactly like one designed by hand.

PrimitiveRoleTypical use
AgentA specialist with its own model, tools and memoryCredit agent, claims agent, invoice agent
SupervisorBreaks the objective into steps, delegates, merges the resultEntry point of every multi-agent scenario
RouterBranches the process by intent, rule or scoreIntent classification, path choice by risk score
MemoryShares session and long-term context across agentsCustomer context, earlier turns
GuardrailChecks input and output against policy; blocks or masksPII masking, unauthorised requests, prompt injection
Human approvalPauses on critical decisions, presents to the approver, records the decisionAbove-threshold amounts, policy exceptions
Tool / MCPRead or write to an enterprise system; policy per toolCore, CRM, ERP, ticketing calls
Parallel & loopRuns independent steps simultaneously and repeated work until a condition is metMulti-source lookups, batch document processing

The supervisor → sub-agent → supervisor pattern

This is the core execution pattern of Aginies. The supervisor plans and merges results; specialist agents take narrow, well-defined tasks. Control returns to the supervisor after every step, so one sub-agent’s failure does not break the whole process.

  1. The supervisor receives the request and decomposes the objective into structured steps.
  2. It delegates each step to the right specialist; independent steps run in parallel.
  3. The sub-agent works with its own model and tools and returns the result with its rationale.
  4. The supervisor verifies, merges and decides the next step.
  5. Where approval is required the process pauses; the decision is recorded, then it resumes.
  6. On completion the outcome goes to the channel; the full trace is written to the audit log.

Execution is stateful: steps, intermediate results and tool responses are kept. When a dependency fails the supervisor retries, switches to the fallback model or escalates to a person; the process resumes where it stopped.

Tools and MCP policies

Agents reach enterprise systems through tools: REST APIs, databases and Model Context Protocol (MCP) servers. Every tool is classified as read or write and carries its own invocation policy. The MCP Hub catalogues approved servers only.

  • Read / write class: write tools are bound to an approval or threshold rule by default
  • Per-tool invocation policy: allowed parameters, rate limit, which agents may call it
  • Input and output masking: sensitive data to and from the tool is redacted
  • Every call appears in the trace: parameters, duration, response code and result
  • MCP Hub: approved servers, versions and access rights under central management
  • Agent-to-agent communication (A2A) works under the same policy framework
Rights on core systems open in stages: read first, then controlled write, then autonomous write. Each stage is measured and approved.

Approvals and thresholds

Human approval is a primitive of the agent definition. On a critical decision the process pauses, the decision is presented to the approver with context and rationale, and the outcome is written to the audit trail. Thresholds and approvers are set in the agent definition.

  • Amount threshold: transactions above a value go to the approver
  • Risk threshold: a score or guardrail signal triggers approval
  • Policy exception: out-of-policy requests always reach a person
  • Irreversible actions: mandatory approval for deletion, payment and contract changes
  • Approver role: defined roles such as branch manager, compliance team, release manager
  • Kill-switch: immediate stop and automation limit per agent or scenario
Example: in the card-debt payment agent, “amount > 100,000 → branch manager approval”. The rule lives in the agent definition; every decision leaves a trace.

Run lifecycle

Every run is made of nine step kinds. Each agent page in the library shows its steps with these kinds; the duration, token usage and touched system of every step are recorded in the trace.

  1. Ingest: the signal arrives; voice, email, API, message or event
  2. Plan: the supervisor decomposes and routes
  3. Retrieve: lookup in the knowledge base or database (RAG)
  4. Reason: classification, extraction, scoring
  5. Tool: a read call to an enterprise system or an MCP tool
  6. Verify: guardrail, policy and consistency checks
  7. Approval: the human-in-the-loop checkpoint
  8. Write: a state-changing action in an enterprise system
  9. Notify: customer or staff communication

A run starts with an ingest step and ends with a write or notify step. End-to-end latency is derived from the step durations; cost per run is computed from the token usage of model calls and attributed by scenario, unit and channel.

The agent library

The library holds 77 agents across 14 sectors. Each is a simulation derived from real agent definitions: supervisor, specialist agents, systems, steps and approval rule are all defined. Every one can be produced with the Autonomous Agent and adapted to the enterprise’s systems.

How to read an agent page:

  • Title and tagline: the agent’s purpose and outcome-oriented summary
  • Trigger and outcome: what starts the run and what is true when it finishes
  • Channels: voice, email, app, API, WhatsApp, web or batch
  • Supervisor and agents: each agent’s role, model and tools
  • Systems: the core, CRM, ERP, ticketing, payments and other systems touched
  • Steps: in execution order with kind, target system, duration and tokens
  • Approval rule: the threshold and approver of the human checkpoint, where present
  • Metrics: monthly runs, success rate, median duration, cost per run
  • Inspired by: the proven global pattern the agent mirrors
Metrics are realistic indicators for an enterprise deployment; they are recalculated in a discovery session for the enterprise’s volume and systems.

The full list of the library; every row is a scenario page.

ScenarioSectorChannelsAgentsSystemsApproval rule
Dialogue banking: voice and text transaction assistantBankingapp, voice, whatsapp45Limit increase > 60%, dispute amount > 5,000 or transfer to a new payee → operations approval
Merchant operations assistant: POS, settlement, refund and limitFintech & Paymentswhatsapp, web, voice45Refund > 25,000 or limit increase > 50% → risk team approval
End-to-end motor claim: from notice to paymentInsurancevoice, app45Estimate > 150,000, unclear fault share or overlap with prior damage → adjuster approval
Outfit stylist: a complete look by size, stock, budget and styleRetail & E-commerceapp, web, whatsapp45Discount outside campaign rules or a bespoke price request → customer service
Subscriber care assistant: bill, plan, fault and contractTelecomvoice, app, whatsapp45Contract cancellation, bill correction above 500 or technician priority → representative approval
Legacy module modernisation: analysis, tests, rewrite, PRSoftware Deliveryapi, batch44Production schema change or out-of-scope file → architect approval; PR merge always human
Patient journey coordinator: appointment, preparation, approval and resultsHealthcarewhatsapp, voice, app45Drug interaction, suspected contraindication or extra test need → physician approval
Line stoppage response: from alarm to work order and shift reportManufacturing & Automotiveapi, app45Schedule change > 2 hours or urgent purchase above 50,000 → shift lead approval
Control tower: delay prediction, rerouting, customer notice, SLALogisticsapi, email, whatsapp45Route cost increase > 15% or compensation > 10,000 → operations manager approval
Utility customer assistant: bill, outage, consumption and instalments in one dialogueEnergy & Utilitiesvoice, whatsapp, app45Instalments > 6 months, bill cancellation or meter suspicion → customer service approval
Citizen services assistant: application, documents, appointment and statusGovernment & Public Sectorwhatsapp, voice, web45Borderline eligibility, inconsistent document or another application in the household → officer review
Procure-to-pay desk: request, quotes, contract and invoice in one placeEnterprise Functionsemail, api45Amount > 250,000, single quote or non-framework supplier → procurement committee
Technical publication assistant: maintenance manual, parts, procedure and revision controlDefence & Aerospaceapp45Proposed deviation from the procedure → authorised engineer approval; export-controlled content → clearance required
Field device support assistant: telemetry, remote diagnosis, OTA and technicianIoT & Connected Deviceswhatsapp, web, api45Bulk OTA (>100 devices) or out-of-warranty device replacement → product-owner approval
Credit card limit increaseBankingapp, voice33Limit > 100,000 → branch manager approval
Digital account opening (KYC)Bankingapp, web45Sanctions/PEP fuzzy match score > 0.65 → compliance analyst approval
Card fraud alert triageBankingwhatsapp, sms, voice, api35Confirmed fraud loss > 2,500 → analyst approval before permanent cancellation
Chargeback dispute handlingBankingapp, email, branch34Amount > 2,500 → dispute team lead approval before provisional credit
Early-stage collections outreachBankingbatch, whatsapp, sms, voice34Plan balance > 25,000 or > 3 instalments → collections team lead approval
Mortgage document reviewBankingweb, email, branch34Loan > 3,000,000 or DTI > 45% → underwriting officer approval
Voice banking money transferBankingvoice44Amount > 50,000 or new payee → warm transfer to a call-centre agent
Credit card debt paymentBankingapp, voice34Amount > 100,000 → branch manager approval
Merchant KYB onboardingFintech & Paymentsweb, email45Risk tier high or UBO fuzzy match > 0.65 → compliance manager approval
AML transaction monitoring alert triageFintech & Paymentsapi, batch44Every alert → compliance analyst decision mandatory; the agent never files an STR or closes a case alone
BNPL instant instalment decisionFintech & Paymentsapi, app, sms45Basket > 15,000 or bureau score < 1,200 → underwriter approval
Payment reconciliation exceptionsFintech & Paymentsbatch, api, email35Single break > 10,000 or total > 50,000 → finance manager approval before adjustment
Voice claims intake (FNOL)Insurancevoice, whatsapp44Injury or reserve > 250,000 → warm transfer to a claims specialist
Policy renewal offerInsurancebatch, whatsapp, email, app34Premium increase > 20% or discount > 10% → renewal team lead approval
Underwriting document extractionInsuranceemail, web, batch34Loading ≥ 50% or sum assured > 5,000,000 → senior underwriter approval
Motor claim photo assessmentInsuranceapp, whatsapp34Estimate > 15,000 or model confidence < 80% → adjuster approval
Subrogation recoveryInsurancebatch, email, api34Recovery demand > 50,000 → subrogation counsel approval
Where is my order? (WISMO)Retail & E-commercewhatsapp, web, app, voice34—
Returns and refundsRetail & E-commerceapp, web, whatsapp, email34Refund > 2,500 or > 5 returns in 12 months → team lead approval
Product Q&A assistantRetail & E-commerceweb, app, whatsapp34—
Catalogue enrichment (batch)Retail & E-commercebatch, email34New category or supplier price deviation > 15% → category manager approval
Review response and quality escalationRetail & E-commerceweb, api331-star review replies and defect escalations → community manager approval
Bill dispute resolutionTelecomapp, voice, whatsapp33Goodwill credit > 75 → team lead approval
SIM swap fraud checkTelecombranch, app, api34Risk score ≥ 70 or credential change within 72 hours → fraud desk approval
Network outage communicationsTelecomsms, whatsapp, api, batch34Affected subscribers > 10,000 or P1 outage → network operations manager approval
Plan upgrade advisorTelecomapp, whatsapp, voice35Commitment-based or discounted bespoke offer → campaign manager approval
Feature delivery pipelineSoftware Deliveryapi, web44Every PR → at least 1 human code review approval; agents never push to main directly
CI/CD release pipelineSoftware Deliveryapi, batch44Every production deploy → release-manager approval mandatory; a critical CVE closes the gate automatically
Incident response and hotfixSoftware Deliveryapi, web45Every emergency production deploy → on-call engineer approval; the hotfix PR still gets a human review
Code review and security gateSoftware Deliveryapi, web44Every PR → human CODEOWNERS approval; a high SAST finding or coverage < 80% blocks the gate
Backlog grooming and estimationSoftware Deliverybatch, web, api34Sprint scope → product owner approval; agents only propose, never commit items to a sprint
iOS feature implementation (hired developer agent)Software Deliveryapi, app35Every PR is reviewed by a person; production deployment under the team lead’s approval
Regression test cycle (hired QA agent)Software Deliveryapi, batch34The release “go / no-go” decision stays with the release manager
Prior authorizationHealthcareapi, email, web34Surgical procedure or cost > 25,000 TL → utilisation management nurse approval
Patient intake and triageHealthcareapp, voice, whatsapp44A triage nurse confirms the urgency level on every case; "emergency" cases are directed to 112 immediately
Appointment scheduling and no-show reductionHealthcarewhatsapp, sms, batch33—
Supplier invoice three-way matchManufacturing & Automotiveemail, api, batch33Price deviation > 2% or > 1,000 TL → buyer approval
Maintenance ticket triageManufacturing & Automotiveapi, app, voice44Planned stop > 4 hours → shift supervisor approval
Warranty claim processingManufacturing & Automotiveweb, api, email34Warranty claim > 5,000 € → regional warranty manager approval
Shipment exception handlingLogisticsapi, email, whatsapp34Extra cost > 1,000 € → dispatch lead approval
Customs document preparationLogisticsapi, email, batch35HS confidence < 0.90 or duty difference > 2,000 € → customs specialist approval
Outage report handlingEnergy & Utilitiesvoice, app, whatsapp, web45Mass notification > 1,000 customers → control room dispatcher approval
Meter reading disputeEnergy & Utilitieswhatsapp, app, web34Credit / correction > 1,000 TL → billing team lead approval
Rooftop solar connection applicationEnergy & Utilitiesweb, email, api44The connection opinion is always signed by a network planning engineer
Demand response eventEnergy & Utilitiesapi, app, whatsapp, batch34Event > 10 MW → grid operator approval; settlement with an audit trail
Citizen request routingGovernment & Public Sectorweb, app, email, voice34Classification confidence < 0.85 or staff complaint → registry officer approval
Permit application checkGovernment & Public Sectorweb, email35Every permit decision is taken by the licensing officer; the system only pre-reviews
Public procurement bid file pre-checkGovernment & Public Sectorbatch, web33Conformity and elimination decisions always with the tender commission; the agent only prepares
Social assistance eligibility pre-assessmentGovernment & Public Sectorweb, app, voice, batch34The assistance decision is always with the case officer; the agent pre-assesses
Email classification and attachment checkEnterprise Functionsemail34—
Call centre quality monitoringEnterprise Functionsvoice, batch34Score < 60 or compliance breach → team leader review
Contract clause extractionEnterprise Functionsemail, web34High-risk deviation or contract value > 500,000 € → counsel approval
Employee onboardingEnterprise Functionsapi, email, app45Access outside the role template or admin rights → line manager approval
IT helpdesk L1Enterprise Functionsapp, voice, web33Access to a finance or production group → group owner approval
Accounts payable inboxEnterprise Functionsemail, batch34Non-PO invoice > 25,000 TL → cost centre owner approval
Sales lead qualificationEnterprise Functionsweb, api, email33Enterprise (> 1,000 employees) or suspected competitor → SDR lead acceptance
Month-end close and reconciliation (hired accountant agent)Enterprise Functionsbatch, email, api34Every posted entry and every filing with the accountant’s approval
Export control and end-user screeningDefence & Aerospaceapi, email, batch34Every controlled item → export compliance officer approval; the agent cannot make licence decisions
Platform maintenance (MRO) work order preparationDefence & Aerospaceapp, api, batch44Every work package affecting airworthiness → maintenance planner approval
Supplier security and compliance assessmentDefence & Aerospaceemail, web, api34The qualification decision always sits with the facility security manager; the agent only prepares
Device fleet anomaly triageIoT & Connected Devicesapi, batch, app35Bulk device command > 100 devices → fleet operations lead approval
Staged OTA update rolloutIoT & Connected Devicesapi, batch34Rollout to a critical fleet segment → product owner approval; automatic rollback if a health gate fails
Cold-chain excursion responseIoT & Connected Devicesapi, app, whatsapp35Product transfer or disposal decision → quality manager approval

The SDLC agent team

Within Code Aginies five roles work together in the CI/CD pipeline. They own the process from request to production; code review and the production decision always stay with people. Every step is traced in Jira, Git and CI records.

  • Project Manager Agent: triages requests, clarifies scope and dependencies
  • Analyst Agent: writes acceptance criteria and test scenarios
  • Architect Agent: produces the design and impact analysis
  • Developer Agent: implements on a branch and opens the PR
  • Tester Agent: generates and runs unit and integration tests, reports coverage

In the CI/CD pipeline SAST, dependency scanning and staging smoke tests run automatically. Production deployment goes to release-manager approval; for hotfixes the same gates apply on a shortened timeline.

Live example: an agent at work

banking

Credit card debt payment

SUPERVISORAGENTSSYSTEMSCard Supervisorplan · route · approveIntent Agentaginies-sunkar-1on-premPayment Agentaginies-tulpar-4on-premVoice Agentaginies-voice-tr-v3on-premCard ManagementCore BankingKnowledge Base ·kart_sss_v3OTP / SMS Gateway
run #41,287,202elapsed 0 mstokens 0est. cost $0.000status —Approval rule: Amount > 100,000 → branch manager approval
Agents in this run
Card Supervisorsupervisorplans, routes, approves
Intent Agentaginies-sunkar-1 · on-premUnderstands the request; extracts card, amount and payment type
Payment Agentaginies-tulpar-4 · on-premChecks balances, requests OTP, executes the payment in the core
Voice Agentaginies-voice-tr-v3 · on-premTranscribes speech and voices the reply on the voice channel
Audit trail00:00.00
  1. ■completed 

Simulation · derived from real agent definitions · every agent can be built by dialogue with the Autonomous Agent and validated with a test corpus