1. Royan AB
  2. Services
  3. AI security

LLM security testing for chatbots, AI agents and apps.

AI security takes more than a careful prompt. Royan AB in Stockholm runs LLM security testing on your chatbot, AI agent or AI feature: we try to make it leak its instructions, expose data or misuse its tools, the way a real attacker would. You get the findings, the fixes and tests that keep them fixed.

What we test

What our LLM security testing covers.

We follow the risk areas of the OWASP Top 10 for LLM Applications and test them against your real setup: your prompts, your documents, your tools and your users.

Prompt injection

Direct attacks typed by a user, and indirect ones hidden in web pages, emails, PDFs or tickets that the model reads. We check whether text that should be data can act as an instruction.

System prompt leakage

We try to extract hidden instructions, business rules, tool names and internal URLs, including partial leaks through JSON fields, titles and forms, not only through the chat window.

Data and PII leakage

Can one user see another user's data, documents or chat memory? We test retrieval, access checks and answers for personal data, secrets and customer records.

Tool and agent abuse

Agents with tools can act, not only talk. We test for excessive agency: tools the agent should never reach, harmful arguments, and refunds, deletes or emails sent without approval.

Jailbreaks and policy bypass

Role play, translation, encoding and pressure over many turns. We measure how often your assistant breaks its own rules, and which layer should have stopped it.

Model and data flow

Which model, version and provider settings you run, what is logged, where the data goes, and what changes when someone swaps the model or adds a new data source.

Why it matters

The security risks of AI in a company are different.

A normal app checks permissions and calls APIs. An LLM app does that too, but it also reads natural language and decides which instructions to follow. That makes the line between trusted and untrusted text hard to see.

The model is not the security boundary

A well-written prompt helps the model behave, but it cannot replace access checks in code. We look for places where the prompt is the only thing between a user and your data.

Agents raise the stakes

A leaked prompt exposes information. A misused tool can move money, send email or delete records. The more an agent can do, the more its permissions matter.

Defenses decay

A changed prompt, a new model version or a new document source can quietly turn off a defense that worked last month. Security tests must run again after each change.

Report and fixes

Findings you can act on, and guardrails that last.

Every finding comes with the input that triggered it, what an attacker could gain and a concrete fix. The fixes come in layers, because no single check stops everything.

A clear report

Each finding with steps to reproduce it, its severity, the affected component and a recommended fix, written for developers and for the people who decide.

Layered guardrails

Input filters, a safety classifier, PII detection in and out, tool allowlists with argument checks, output checks and human approval for actions that cannot be undone. Each layer catches what another misses.

Tests that keep running

We turn the attacks into an automated test suite, so the next prompt change, model upgrade or new data source is checked before it reaches your users.

Mobile apps

Security review of mobile apps.

Many AI features live inside an iPhone or Android app. We have built and released native apps for years, so we also review the app around the model. See our mobile app development.

Code and configuration

API keys or secrets shipped inside the app, debug settings left on, unsafe storage of tokens and personal data, and network calls without certificate checks.

The app's AI features

How the app talks to the model or the agent backend, what it sends, what it keeps on the device, and whether the backend trusts the app more than it should.

A review, not a certified pentest

This is a security review by experienced app engineers, not a certified penetration test. If you need a certified test for compliance, the review is a good first step and shows what to fix before it.

How we work

Scope, test, fix.

We test only systems that you own or have the right to have tested, inside a scope that we agree in writing.

Scope

Before the test

We agree on what to test, in which environment, with which test accounts and what is off limits. A staging environment is best; production only with clear rules.

  • Written scope and permission
  • Test accounts and sample data
  • Your threat model and worst cases

Test

During the test

We run manual attacks and automated red-team suites against the agreed targets, and tell you at once if we find something serious.

  • Manual and automated attacks
  • Direct and indirect injection
  • Serious findings reported at once

Fix

After the test

You get the report and a fix plan. We can build the fixes with your team and then run the tests again to confirm them.

  • Report with steps to reproduce
  • Fix plan in order of risk
  • Test again after the fixes

Our writing

How we think about AI security.

Our founder, AmirHossein Teymoori, writes in detail about how LLM systems are attacked and how they are defended. These are the methods we bring to a test.

Guardrails in production

A layered guardrail stack for prompt injection, personal data and agents, and why defenses built only on regex or only on an AI judge both fail.

LLM guardrails that survive production

How chatbots get hacked

Prompt injection, system prompt leakage, model fingerprinting and tool discovery, with a red-team checklist for testing your own chatbot.

How LLM chatbots get hacked

Sandboxing agents

Why agents that run code need a real sandbox with no network and no credentials, and how to build one step by step.

Sandbox AI coding agents

FAQ

Questions about AI security.

What is prompt injection?

Prompt injection is an attack in which text makes a language model ignore its instructions. Direct injection comes from the user. Indirect injection is hidden in content the model reads, such as a web page, an email, a PDF or a tool result. Because instructions and data are both plain language, the model cannot always tell them apart.

What are the biggest security risks of AI in a company?

The most common ones are data leaks between users, leaked system prompts that reveal business logic, agents that use tools they should not, and personal data in prompts, logs or answers. The OWASP Top 10 for LLM Applications is a good map of the risk areas, and we test against it.

Can prompt injection be fully prevented?

No. No known method stops it completely. What works is limiting the damage: give the model only the tools it needs, check access in code, validate every tool argument, ask a person to approve actions that cannot be undone, and test again after every change.

How do you test an AI agent?

We list every tool the agent can call and what each one can change. Then we try to make the agent call the wrong tool, call the right tool with harmful arguments, or follow instructions hidden in the content it reads. Every attempt is logged, so you can see what the agent would have done.

Is this the same as a penetration test?

No. It is an AI and LLM security test, plus a review of the app around the model. It does not replace a certified penetration test of your network and infrastructure. Many teams do both, because the AI test covers risks that a classic pentest usually does not look at.

Do you need access to our source code?

Not always. We can test as an outside user with test accounts. With access to prompts, tool definitions and code, we find more in less time and the fixes are more precise. We agree on the level of access in the scope.

What does an AI security test cost?

It depends on what we test: how many assistants or agents, how many tools they can call, whether there is a mobile app, and how deep the test must go. After a free 30-minute call, we send a fixed quote for the scope we agreed on.

Can you help with documentation for the EU AI Act, GDPR or NIS2?

We can help you prepare the technical documentation: the test scope, the findings and fixes, what is logged and how personal data moves through the system. We do not give legal advice. Your legal adviser or data protection officer decides what the rules require of you.

Related

Build it safe from the start.

AI agents

Building an agent? We design narrow permissions, approval steps and audit logs in from the first version.

AI agent development

RAG systems

Answers from your own documents, with each user's access rights applied in the search step.

RAG system development

Consulting

Need a wider view of AI risk, architecture or code quality? Start with a review of fixed scope.

How we consult

Royan AB · Stockholm

Have a chatbot or an agent in production? Let us try to break it before someone else does.

Email us to book a call