Skip to content
Contact Us
Start a Project info@nexlavision.com
Language & Reasoning

Agents with defined boundaries and an off switch

An agent is a model that can call tools and take several steps toward a goal. That is genuinely useful and genuinely risky, and the difference between the two is entirely in the boundary you draw around it. We spend more time on the boundary than on the reasoning.

Illustrative agent trace: an invoice exception is planned, two read-only tool calls gather the purchase order and goods receipt, the case is assembled, and the agent stops at a human approval step before changing anything, within a step budget.

The interesting engineering is the constraints

Getting an agent to attempt a task is easy. Getting one that cannot cause damage, cannot loop forever, and cannot spend your budget while nobody is watching takes deliberate design.

Workstation showing an operational interface across two displays
  1. 01

    Explicit tool contracts

    Each tool has a typed interface, validated inputs and a documented blast radius. Nothing is improvised at runtime.

  2. 02

    Approval gates

    Irreversible actions — payments, deletions, external messages — require a human decision before execution.

  3. 03

    Budgets and step limits

    Hard ceilings on steps, tokens and spend per task, enforced by the runtime rather than by the prompt.

  4. 04

    Full traceability

    Every decision, tool call and result recorded, so any outcome can be reconstructed afterwards.

What we build

01

Multi-step task execution

Research, gather, decide and act across several systems, with state that survives a restart mid-task.

02

Tool and API use

Agents calling your internal APIs, databases and third-party services through validated, permissioned interfaces.

03

Human-in-the-loop

Review and approval steps placed exactly where the cost of being wrong justifies the delay.

04

Multi-agent coordination

Specialised agents with narrow remits coordinating on larger work — used only where one agent genuinely will not do.

05

Failure handling

Retries, timeouts, dead ends and escalation defined up front, because agents fail in ways ordinary code does not.

06

Observability

Live and historical traces of reasoning, tool calls and cost, so behaviour is debuggable rather than mysterious.

How it is built

We treat an agent as a workflow engine with a language model choosing the next step, not as a chat loop with plugins attached. That framing brings state, retries and observability with it by default.

Typical stack

  • LLM APIs
  • Function calling
  • n8n
  • Python
  • FastAPI
  • PostgreSQL
  • Redis
  • Queue workers
  • OpenTelemetry
  • Docker
  1. L1

    Durable state

    Task state persisted at every step so a crash or deployment resumes rather than restarts.

  2. L2

    Typed tool layer

    Schema-validated inputs and outputs, with permissions enforced in the tool, never in the prompt.

  3. L3

    Policy engine

    Rules about what may run unattended, what needs approval and what is simply prohibited.

  4. L4

    Evaluation

    Scenario tests covering both successful paths and the failure modes that matter, run on every change.

Where it connects

Capability in isolation changes nothing. These are the systems this normally has to reach in order to be useful.

  • Internal APIs

    Your own services exposed as agent tools with scoped credentials per agent.

  • Business systems

    CRM, ERP, ticketing and finance systems, read-first with writes gated.

  • Workflow automation

    Agents as steps inside n8n workflows where deterministic orchestration should own the sequence.

  • Knowledge retrieval

    Grounding agent reasoning in your documented content rather than in recall.

What it looks like in operation

An invoice exception investigated automatically, stopping short of the action that needs a person.

  1. 01 Exception raisedtrigger
  2. 02 Plandecide steps
  3. 03 Query systemstools
  4. 04 Assemble caseevidence
  5. 05 Approval gatehuman
  6. 06 Executeand log

How we deliver it

The same six stages apply to every AI build we run. The evaluation set is created before development starts — without it there is no way to tell an improvement from a regression.

  1. 01

    Qualify

    Is a model the right instrument here? A deterministic rule is cheaper, faster and easier to audit when the problem allows one. We say so when it does.

  2. 02

    Prepare data

    Sources identified, access agreed, content parsed and indexed. Data quality sets the ceiling on everything after this point.

  3. 03

    Build the evaluation set

    Real examples with known-good outcomes, collected before any development. This is what makes later decisions measurable.

  4. 04

    Prototype and measure

    A working slice scored against the evaluation set — accuracy, latency and cost per request all measured rather than estimated.

  5. 05

    Integrate and guard

    Wired into the real system with permissions, rate limits, spend caps, fallbacks and human approval wherever the action is irreversible.

  6. 06

    Monitor

    Quality, cost and drift tracked after launch, with the evaluation set re-run whenever a prompt, model or data source changes.

The parts that decide whether it can go live

These are not add-ons quoted separately. They are the conditions under which a system like this is allowed near production data.

  1. 01

    Least privilege

    Each agent gets its own credentials, scoped to exactly the operations it needs and nothing adjacent.

  2. 02

    Irreversible actions gated

    Payments, deletions and outbound communication require explicit human approval by default.

  3. 03

    Prompt injection containment

    Content an agent reads can never expand what it is permitted to do.

  4. 04

    Kill switch

    A single control that halts all agent execution immediately, tested before go-live rather than during an incident.

Where this earns its place

  1. 01 Support

    End-to-end ticket resolution

    Diagnose, look up account state, apply a documented fix and close — escalating anything outside the playbook.

  2. 02 Finance

    Invoice exception handling

    Investigate a mismatch across systems, assemble the evidence and propose a resolution for a human to approve.

  3. 03 Sales

    Lead research and preparation

    Gather public context, enrich the record and draft a briefing before the call, without a person doing the tab-opening.

  4. 04 Operations

    Monitoring and triage

    Investigate an alert across logs and dashboards, correlate signals and summarise likely cause for the on-call engineer.

  5. 05 E-commerce

    Catalogue maintenance

    Detect gaps and inconsistencies across listings, propose corrections and apply the ones that are safely reversible.

  6. 06 Recruitment

    Candidate screening

    Assess applications against defined criteria and prepare a shortlist with reasoning a human reviews before contact.

AI Agents, answered plainly

For bounded, well-defined tasks with approval gates on anything irreversible, yes — and we have built them that way. For open-ended autonomy across critical systems, not yet, and we will say so. The determining factor is how tightly you can define success and how cheap failure is. Where failure is expensive, the agent prepares and a human commits.

Layered constraints: scoped credentials so it cannot reach what it should not, typed tool contracts that validate every call, an approval gate on irreversible operations, hard step and spend limits enforced by the runtime, and a kill switch. The prompt is never the security boundary — a document it reads could contradict it.

Deterministic automation follows a fixed path and is the right answer whenever the sequence is known. An agent decides the path at runtime, which matters when the steps depend on what it finds. Most real systems combine both: deterministic orchestration for the known sequence, an agent for the genuinely variable step.

Per-task step limits, token budgets and daily spend ceilings enforced in the runtime, plus routing simple decisions to smaller models. We measure cost per completed task during the prototype, because agent costs compound across steps in a way single-call systems do not.

Have a process too variable to script?

Describe it. We will tell you whether an agent fits, where the approval gates belong, and what it costs per task.

Free consultation

Free Consultation Available

Looking for a POS or ERP for your business?

Leave your name and number and tell us which product you are looking at. We will call or message you to understand what you need and prepare a quote.

Include the country code, for example +92 300 1234567

or

  • No obligation
  • English and Arabic
  • Six products