Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration

Akira configuration options and files.

Data Directory

Akira stores data in ~/.akira/:

~/.akira/
├── akira.db          # SQLite database
└── history           # Command history

Custom Location

Set AKIRA_DATA_DIR environment variable:

export AKIRA_DATA_DIR=/custom/path

Global Options

Set with setg command in console:

OptionTypeDefaultDescription
verboseboolfalseEnable verbose output
timeoutint30Request timeout (seconds)
max_retriesint3Maximum retry attempts
parallel_requestsint5Concurrent request limit

Example:

akira> setg verbose true
akira> setg timeout 60

Environment Variables

API Keys

export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-ant-..."
export HF_TOKEN="hf_..."

AWS Credentials

export AWS_ACCESS_KEY_ID="..."
export AWS_SECRET_ACCESS_KEY="..."
export AWS_DEFAULT_REGION="us-east-1"

Or use ~/.aws/credentials.

Akira Settings

export AKIRA_DATA_DIR="/custom/data/path"

Module Options

Each module has its own options. View with:

akira> show options

Common options across modules:

OptionDescription
canaryMarker string for detection
timeoutModule-specific timeout
use_fuzzingEnable payload fuzzing
fuzz_countNumber of fuzz variations
variantAttack variant to use

Target Configuration

Request Templates

JSON template with $payload placeholder:

{
  "messages": [
    {"role": "user", "content": "$payload"}
  ],
  "model": "gpt-4",
  "max_tokens": 500
}

Response Paths

Dot-notation path to extract response:

choices.0.message.content
data.response.text
output

Authentication Types

TypeHeader Sent
bearerAuthorization: Bearer <key>
api-keyX-API-Key: <key>
basicAuthorization: Basic <base64>
noneNo auth header

Custom header:

--auth-type api-key --auth-header X-Custom-Auth

Database Schema

SQLite database at ~/.akira/akira.db:

attack_history

ColumnTypeDescription
idINTEGERPrimary key
timestampREALUnix timestamp
moduleTEXTModule name
target_typeTEXTTarget type
target_urlTEXTTarget URL
successINTEGER0 or 1
confidenceREAL0.0 to 1.0
payloadTEXTPayload used
responseTEXTLLM response
details_jsonTEXTJSON metadata

target_profiles

ColumnTypeDescription
nameTEXTProfile name (PK)
target_typeTEXTTarget type
urlTEXTEndpoint URL
config_jsonTEXTJSON config
created_atREALUnix timestamp

prompt_cache

ColumnTypeDescription
keyTEXTCache key (PK)
prompt_textTEXTCached prompt
sourceTEXTSource identifier
updated_atREALUnix timestamp

response_cache

ColumnTypeDescription
request_hashTEXTSHA256 hash (PK)
responseTEXTCached response
created_atREALUnix timestamp
expires_atREALExpiration time