DEV Community

zeeshan khan
zeeshan khan

Posted on

Building AI Agents That Ask Before They Act

I am tired of seeing "autonomous" AI agents that are anything but.

If you have spent much time building with LLMs lately, you have seen the same pattern. A developer gives an agent a tool, a goal, and a loop. The agent starts executing. Then, it hallucinates. It tries to call an API it wasn't supposed to touch, or it executes a sequence of actions that fundamentally breaks the user's workflow.

In the rush to build "agentic" workflows, we are creating systems that act with too much confidence and not enough supervision. We are building digital employees that act before they check if they have permission to touch the steering wheel.

At GodEngine.ai and AskShiva.ai, we decided to take a different path. Our philosophy is simple: AI agents must ask before they act.

The Problem with Total Autonomy

The industry is currently obsessed with the "loop." We want the agent to loop until the task is done.

But in a real-world production environment, a "loop" can quickly become a "financial drain" or a "data nightmare." If an agent is tasked with managing a database or executing marketing workflows, the cost of an error isn't just a bad chat response. It is an incorrect entry in a production database or a botched email campaign sent to a client list.

When I sit down to architect a system for a startup or a developer, I look at the "action boundary." Every time an agent hits a point where it moves from thinking to doing, there must be a checkpoint.

The Human-in-the-Loop Framework

We aren't building assistants that just talk; we are building agents that work. But "working" requires accountability.

To achieve what we are building at GodEngine, we focus on three specific layers of verification:

  • Intent Verification: Before an agent triggers a complex sequence, it must present the "Plan" to the user. Not just a vague summary, but a concrete list of steps: "I will do A, then B, then C. Do you agree?"
  • Parameter Validation: If the agent is about to execute a function, it should present the arguments it intends to use. If it is about to send an email, it should show the recipient and the body.
  • Post-Action Review: The agent reports back on what it did and asks if the result matches the user's expectation.

We call this "Permission-Driven Agency." It is the difference between a chaotic intern and a professional colleague.

Why This Matters for Indian Founders

The AI landscape in India is moving fast. We have the talent, we have the scale, and we are building for a global market. But to win globally, our products must be reliable.

Founders building with AI shouldn't be afraid of the "Agent" label. You shouldn't have to build "guardrails" that are actually just massive, expensive prompt-engineering walls that fail 20% of the time. Instead, you build systems where the agent is designed to realize its own limitations.

When we build at AskShiva.ai, we prioritize this transparency. Users shouldn't have to wonder, "What is the AI doing in the background?" They should feel in control because the agent is constantly checking in.

Engineering for Control

Building this isn't just about changing a prompt. It is about how you structure the integration between the LLM and the tool-calling mechanism.

  1. The "Pause" State: You have to architect your backend to handle a "pending approval" state. The agent isn't just running a script; it is waiting for an external signal to resume.
  2. Contextual Confirmation: You don't want to ask for permission for every single irrelevant step. That is annoying. You want the agent to be smart enough to know when an action is high-stakes.
  3. Granular Tool Access: We treat tools as precious resources. An agent shouldn't have "Write" access by default. It should have "Draft" access, and only through human intervention does it gain "Commit" access.

Real Progress Over Hype

I am not interested in discussing what AI might do in 2030. I care about what we are shipping today in Greater Noida and beyond.

We are building agents that people can actually trust with real tasks. Real workflows. Real consequences. It is much harder to build an agent that asks for permission than one that just runs wild. It requires more logic, more structured state management, and a better understanding of user psychology.

But the "wild" agents? They will fail the moment they encounter a professional environment with high stakes. The agents that survive—the ones that become part of the daily stack for developers and marketers—will be the ones that know when to stop and ask, "Is this what you wanted?"

We are building the engines of the future, but we are building them with a hand on the brake.

Are you building agents that act, or agents that ask? Let me know what you are working on in the replies.

Top comments (35)

Collapse
 
suirindo profile image
asagiman •

The backend pending-approval state is the part I'd test first. A small negative case: approve recipient A and payload X, then change only the recipient or payload before resuming. The backend should reject the old approval before the tool call starts, even if the model still says it has permission.

I'd also separate plan approval from approval of the resolved operation, especially when an alias or lookup determines the final recipient. A repeated resume should have a defined outcome rather than create a second effect.

For contextual confirmation, who classifies an action as requiring approval: a host policy or the model proposing the action? A synthetic example of that decision boundary would clarify which guarantees your integration enforces and which remain instructions.

Collapse
 
zeeshan9958 profile image
zeeshan khan •

Great technical breakdown. You're touching on exactly why we build AI that "asks before it acts." Testing the race condition between state change and execution is critical for security. I’ll have the team look into enforcing that decision boundary. Appreciate the deep dive!

Collapse
 
suirindo profile image
asagiman •

Thanks, Zeeshan! Glad this is useful, and I appreciate you bringing it to the team.

One invariant I'd recommend testing: approval must be bound to the exact operation being executed, not just the agent's intention.

If the recipient, payload, or resolved target changes after approval, the backend should invalidate that approval before any side effect occurs. Retrying the same approved operation should also be handled without duplicate execution.

A small negative test could make this concrete: approve A/X, switch the recipient to B, then resume. Expected result: execution blocked, with host-side evidence that no tool invocation occurred.

We're exploring these kinds of verifiable execution boundaries in Agent Role Contracts (ARC), so I'd be interested in comparing approaches as your implementation develops.

Looking forward to seeing what your team finds!

Thread Thread
 
zeeshan9958 profile image
zeeshan khan •

Great points. Separating plan approval from execution is key to our "ask before act" philosophy. We're working on exactly that kind of decision boundary—ensuring the model proposes, but the host policy enforces. Real-world edge cases like these are exactly what we are testing.

Thread Thread
 
suirindo profile image
asagiman •

Thanks, Zeeshan. That's exactly the boundary I think matters most: the model proposes, but the host independently enforces.

One edge case worth testing is approval drift.

Suppose a human approves a plan, but the target, arguments, environment, or underlying code changes before execution. The host should verify that the actual action still falls within the approved scope, rather than trusting the earlier approval.

I'd suggest testing three cases:

  1. An unchanged, authorized action proceeds without another approval.
  2. A material change invalidates the previous approval.
  3. Missing or ambiguous authorization evidence blocks execution with an explicit reason.

This is also an important direction we're exploring with Agent Role Contracts (ARC): making authorization boundaries verifiable while minimizing unnecessary human interruptions.

I'd be interested to hear how your host policy handles approval drift at execution time.

Thread Thread
 
zeeshan9958 profile image
zeeshan khan •

Exactly! That's the core philosophy we're building at GodEngine and AskShiva. Keeping that boundary—asking before acting—is what makes AI actually useful and not just noisy. Glad we're on the same page.

Thread Thread
 
suirindo profile image
asagiman •

Exactly, Zeeshan. I think we're converging on an important principle: asking for permission is the interface, but enforcing that permission must be the host's responsibility.

One area we're exploring with Agent Role Contracts (ARC) is what happens after approval. If the target, arguments, or file contents change, the original approval should no longer authorize the action.

I'm curious how GodEngine and AskShiva approach this. Do you enforce these boundaries independently of the model at execution time?

Thread Thread
 
zeeshan9958 profile image
zeeshan khan •

That's the core of it. We’re building AI that asks before it acts. At GodEngine and AskShiva, we believe the model shouldn't be the only guardrail. The system must enforce those boundaries so the user stays in control, no matter how the context shifts. Great point on ARC!

Thread Thread
 
suirindo profile image
asagiman •

The key question is how to make untested paths visible without creating the false impression that they have been verified, while minimizing anxiety and unnecessary friction when human judgment is required.

I think the distinction between verified, untested, and known-to-fail needs to be explicit.

For each path, users should be able to understand what has actually been tested, what remains uncertain, and whether any action is required.

The interface should communicate uncertainty proportionately to its actual risk. An untested path shouldn't automatically look like a failure, and human intervention shouldn't become a routine burden.

Ultimately, the challenge is to make uncertainty transparent, understandable, and actionable—while allowing users to make confident decisions without having to investigate every technical detail.

Thread Thread
 
zeeshan9958 profile image
zeeshan khan •

Spot on. This is exactly why we're building GodEngine to "ask before it acts." We want to show the reasoning and the gaps, not just a final answer. Transparency about uncertainty is the only way to build real trust in AI. Great perspective!

Thread Thread
 
suirindo profile image
asagiman •

Thanks, Zeeshan! I agree that making uncertainty visible is essential.

One distinction I find particularly important is the difference between explaining an agent's reasoning and demonstrating what has actually been verified.

Even a convincing explanation can create false confidence if the underlying path remains untested.

I'm curious how GodEngine approaches this in practice. How do you distinguish verified actions from untested paths, and determine when human approval is necessary?

Thread Thread
 
zeeshan9958 profile image
zeeshan khan •

Spot on. Explanation can definitely feel like "hallucination with confidence" if not careful. We build our products to ask before they act—the goal is to show the reasoning alongside the sources so humans can verify the path before a decision is finalized. Real clarity, no false hype.

Thread Thread
 
suirindo profile image
asagiman •

Thanks, Zeeshan. I think that's exactly the right direction.

One distinction I find important is between a plausible explanation and verifiable evidence.

Even when an agent provides convincing reasoning and credible sources, we still need to know whether the proposed action is within the original scope and properly authorized.

Ideally, humans should be able to inspect the evidence, authority, and unresolved uncertainty before approving an action, and verify the actual outcome afterward.

I'm curious how you're approaching that distinction in your products.

Thread Thread
 
zeeshan9958 profile image
zeeshan khan •

Great point. On that—that’s exactly why we build products that ask before they act. We want humans to inspect the reasoning and authority behind an action before anything is done. The goal is to bridge that gap between plausible reasoning and verifiable execution. Much needed insight!

Thread Thread
 
suirindo profile image
asagiman •

Thanks, Zeeshan. I think the next important step is connecting pre-action approval with post-action evidence.

What was authorized, under which conditions, what actually happened, and how can we independently verify the result?

That distinction is central to the work we're exploring with Agent Role Contracts.
I'd be interested to hear how you're approaching execution evidence and verification in your products.

Thread Thread
 
zeeshan9958 profile image
zeeshan khan •

That's the core of it. We build products that "ask before they act" to bridge that gap between intent and execution. My goal is to make sure the evidence is baked into the reasoning, not added as an afterthought. Would love to dive deeper into your Agent Role Contracts sometime.

Thread Thread
 
suirindo profile image
asagiman •

I'd be glad to dive deeper, Zeeshan.

I think the key challenge is making the entire chain verifiable: what was authorized, under which constraints, what actually executed, and what evidence was produced.

ARC currently focuses on explicit role boundaries and deterministic pre-action checks. Connecting those checks to verifiable execution evidence is a direction I'm particularly interested in.

I'd love to compare approaches and perhaps explore a concrete use case together. Let's connect!

Thread Thread
 
zeeshan9958 profile image
zeeshan khan •

Love this approach. Making the execution traceable back to the original constraint is exactly where the real value lies. Deterministic checks combined with clear evidence is a massive needle-mover for high-stakes AI. Let’s connect and dive into a real use case!

Thread Thread
 
suirindo profile image
asagiman •

Absolutely, Zeeshan. Let's make this concrete.

One use case we're exploring with Agent Role Contracts (ARC) is an AI agent executing financial operations under explicit constraints: approved recipients, chains, and amount limits.

ARC already supports deterministic preflight checks against declared constraints. The next challenge is connecting those checks to actual execution evidence, retries, and outcomes without overstating what has been verified.

I'd be glad to connect and explore a real workflow together. Do you have a particular use case or agent architecture in mind?

Thread Thread
 
zeeshan9958 profile image
zeeshan khan •

This sounds very relevant to what we're building with Falcon. Having AI execute financial ops under strict constraints is the dream—doing it without overstating verification is the real challenge. Would love to explore how ARC fits into a real workflow. Let's connect!

Thread Thread
 
suirindo profile image
asagiman •

Thanks, Zeeshan! I'd be glad to connect.

I read about Falcon's double-entry accounting and bank reconciliation features. That seems like a great place to explore a concrete use case.

For example, an AI proposes a journal entry, a human approves the exact accounts and amount, and then we deliberately change one parameter before posting.

ARC can check whether the declared roles, scope, and approval binding remain consistent. Actual permissions, ledger updates, and execution evidence would still need to be enforced and verified by Falcon.

Would you be open to testing this with a small, synthetic workflow first? If you share the rough flow, I can help turn it into a reproducible test. We could then arrange a short call to compare findings.

Here's ARC: github.com/suirindo/agent-role-con...

Looking forward to exploring this together!

Thread Thread
 
zeeshan9958 profile image
Comment marked as low quality/non-constructive by the community. View Code of Conduct
zeeshan khan •

Glad to hear that! Falcon’s double-entry and bank reconciliation are exactly what we've built to make life easier for accountants. Definitely a solid use case to explore. Let's connect and chat more about it!

Thread Thread
 
zeeshan9958 profile image
zeeshan khan •

Hey! Love this approach. A synthetic workflow is a great way to test if Falcon’s ledger updates and AI approvals stay consistent. Let’s do it—send me the rough flow you have in mind and we’ll see if it works for our build. 🚀

Thread Thread
 
suirindo profile image
asagiman •

Thanks, Zeeshan! Great to hear you're open to testing this with Falcon.

Here's a concrete synthetic workflow we could start with:

Scenario: AI-assisted bank reconciliation and ledger posting

  1. A synthetic bank receipt of ₹12,500 arrives and matches an outstanding invoice.
  2. The AI proposes a double-entry journal: debit Bank ₹12,500, credit Accounts Receivable ₹12,500, with the corresponding reconciliation link.
  3. A human approves the exact operation, including amount, accounts, invoice ID, bank transaction ID, and operation version.
  4. The backend validates that approval before posting and confirms the resulting ledger state.

Four failure cases worth testing:

  • Changed parameters: Modify the amount or target account after approval → reject execution.
  • Stale approval: Change the invoice or operation version before execution → require fresh approval.
  • Duplicate execution: Resume the same approved operation twice, including a concurrent retry → at most one financial effect.
  • Unbalanced journal: Introduce a debit/credit mismatch → reject the posting.

For each case, we'd capture the expected decision, actual ledger state, and evidence of the outcome.

This would give us a useful integration test between Falcon's approval mechanism and the role-boundary concepts we're exploring in Agent Role Contracts (ARC):

github.com/suirindo/agent-role-con...

We can begin with synthetic fixtures and a lightweight interface, with no production data or credentials involved.

One question: does Falcon currently expose a way to submit an approved journal proposal programmatically, or would a mocked posting adapter be the better starting point?

Happy to compare test results and publish the technical findings together if the experiment works for both sides.

Thread Thread
 
zeeshan9958 profile image
zeeshan khan •

This is a great workflow. Bank reconciliation and ledger posting is core to Falcon. Let me run this by my team and we'll get back to you. Excited to see how we can test this!

Thread Thread
 
zeeshan9958 profile image
zeeshan khan •

Let's do it! 🚀 I’ll send over the rough flow for the ledger and AI approval steps. Excited to see how we can line this up with your build. Staying consistent is key. On it!

Thread Thread
 
suirindo profile image
asagiman •

Thanks, Zeeshan! Looking forward to seeing the flow.

I suggest we start with a small, fully synthetic test covering four cases:

  1. A journal entry is approved with exact accounts and amounts.
  2. One parameter changes after approval → execution must be rejected before posting.
  3. The same approved operation is retried → no duplicate ledger entry.
  4. Posting succeeds → the actual ledger state is independently verified before reporting completion.

ARC can help test the declared role and scope boundaries, while Falcon would enforce actual execution permissions and provide authoritative ledger evidence.

No production access or real financial data needed.

Once you share the rough flow, we can map these cases to Falcon's architecture and define a reproducible test together.

Excited to explore this!

Thread Thread
 
zeeshan9958 profile image
zeeshan khan •

This is solid. These 4 cases cover exactly what we need to ensure the ledger stays bulletproof. Mapping this to Falcon’s architecture is the right move to ensure execution matches the intent. Let’s do this! Looking forward to the flow.

Thread Thread
 
suirindo profile image
asagiman •

Thanks, Zeeshan. Here's a concrete starting flow from our side.

AI proposes a synthetic journal entry → human approves the exact payload → backend validates the approval before posting → ledger commits → authoritative readback verifies the outcome.

I'd run four tests:

  1. Valid approval: The exact approved journal entry commits once, with matching ledger evidence.
  2. Post-approval mutation: Changing an account, amount, or invoice reference causes rejection.
  3. Duplicate execution: Concurrent retries with the same logical operation ID produce at most one ledger effect.
  4. Completion evidence: We report DONE only after authoritative ledger readback. Otherwise the outcome remains UNKNOWN, with blind retries blocked.

ARC would validate declared role, scope, and approval bindings. Falcon's backend or a mock adapter would handle runtime enforcement, idempotency, and ledger evidence.

Could you share a rough sketch of Falcon's approval, posting, and ledger-readback interfaces? We can map these synthetic cases onto that structure without production access or real financial data.

That would give us a small, reproducible starting point for comparing intent, authorization, and actual effects.

Thread Thread
 
zeeshan9958 profile image
zeeshan khan •

Solid workflow. That "human approves" step is exactly why we built it this way. The AI proposes, but the human decides. It ensures the ledger stays authoritative. Love the clarity here!

Thread Thread
 
suirindo profile image
asagiman •

Thanks, Zeeshan. Exactly — the key is making that human decision enforceable, not just recording that approval happened.

One useful test is to approve an exact payload, change one field before execution, and verify that the backend rejects it. Another is retrying after a lost acknowledgment and confirming that no duplicate ledger entry is created.

This is also where we're focusing our work with Agent Role Contracts (ARC): making declared responsibilities and action boundaries verifiable, while keeping runtime authorization and actual effects independently enforced.

I'd be interested in comparing a small synthetic test case if you're exploring these boundaries too.

Thread Thread
 
zeeshan9958 profile image
zeeshan khan •

Love this deep dive. Verification and preventing duplicate entries are huge for us, especially as we build out the ledger in Falcon. I'm definitely looking at those boundaries. Let’s compare notes on a synthetic test case soon. Very cool stuff!

Thread Thread
 
suirindo profile image
asagiman •

Great to hear that, Zeeshan! I think we're getting close to a genuinely useful joint experiment.

Since we've already outlined the four test cases, I'd suggest making our next step a small, reproducible synthetic fixture rather than adding more theory.

We can start with one ledger transaction and capture:

  • The exact operation and payload approved by the human
  • The idempotency key and execution attempts
  • The resulting ledger entries and authoritative readback
  • The expected versus observed outcome, including failures

This should give us a concrete way to test approval integrity, duplicate prevention, and completion evidence together.

ARC can validate the declared role and scope boundaries, while Falcon's backend or a mock adapter enforces execution rules and verifies ledger effects.

If your team can share a minimal sketch of Falcon's approval → posting → readback flow, we can map the fixture directly to it. No production access or real financial data needed.

I'd also be happy to compare the resulting traces on a short call and explore publishing the findings together.

Looking forward to turning this into something both projects can build on!

Thread Thread
 
zeeshan9958 profile image
zeeshan khan •

Let's do it. Theory is fine, but building is better. A reproducible synthetic fixture sounds perfect—let's test it with one ledger transaction and see how the engine handles it. Direct action > more discussion. Ready when you are!

Thread Thread
 
suirindo profile image
asagiman •

Let's do it, Zeeshan. I've already built and run the first standalone synthetic ledger fixture on our side.

The initial version covers one approved journal transaction and eight scenarios, including payload tampering, stale approval, duplicate retry after a lost acknowledgment, and readback timeout.

All eight synthetic cases and six Python regression tests pass.

These are mock-only results, not yet evidence of Falcon's actual engine behavior or ARC runtime enforcement.

I'd suggest we start by mapping one happy-path transaction to Falcon's approval → posting → authoritative readback flow, then run the failure cases against the same interface.

Could you share a minimal pseudocode example or mock interface for those three steps? No credentials, production access, or real financial data needed.

I think comparing actual execution receipts against the synthetic baseline will give us a strong first joint result.

Looking forward to building this together!

Some comments may only be visible to logged-in visitors. Sign in to view all comments.