# Create a Custom Data Type

Akto comes with 50+ built-in data types. Create custom types for business-specific patterns in your agent systems.

## Common Agentic Custom Data Types

* Transaction IDs (e.g., "TXN\_12345")
* Agent IDs or session tokens
* Custom API key formats
* Tool invocation signatures
* Context window identifiers

## How to Create

1. Go to **Agentic Discovery > Sensitive Data**
2. Click **Create Custom Data Type**
3. Enter name (e.g., "AGENT\_SESSION\_ID")
4. Define key and value conditions
5. Save

## Add Key Conditions

Define how Akto should detect the key:

* **Equals to**: Exact match (e.g., key = "agent\_id")
* **Matches regex**: Pattern match (e.g., key matches `agent_.*`)
* **Contains**: Partial match

## Add Value Conditions

Define how Akto should detect the value:

* **Matches regex**: Pattern for value (e.g., `\bagent_[a-z0-9]{16}\b`)
* **Equals to**: Exact value match
* **Length**: Value length constraints

## AktoGPT

Use AktoGPT to generate regex patterns automatically:

1. Click **AktoGPT** button
2. Describe your pattern (e.g., "agent session ID with prefix")
3. Review generated regex
4. Add to Akto

## Example: Agent Session ID

**Key Condition**: Equals to "agent\_session" **Value Condition**: Matches regex `\bagt_[a-f0-9]{32}\b`

This detects patterns like: `agent_session: "agt_a1b2c3d4..."`

## Best Practices

* Test regex patterns before adding
* Document custom data types for your team
* Review detected instances to verify accuracy
* Use AktoGPT for complex patterns


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ai-security-docs.akto.io/akto-argus-agentic-ai-security-for-homegrown-ai/agentic-ai-discovery/how-to/create-a-custom-data-type.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
