# Character File

[Character Files](https://github.com/tars-sol/sona) (`src/types.ts`) define agent **personalities** and **capabilities** including biographical information, interaction styles, plugin configurations, and platform integrations.

The character file defines who your agent is - like a script for an actor. It includes:

* Biographical information and backstory
* Topics the agent can discuss
* Writing style and tone
* Which AI models to use
* Which plugins to load
* Which platforms to connect to

### Required Fields:

```
{
    "name": "character_name",           // Character's display name for identification and in conversations
    "modelProvider": "openai",          // AI model provider (e.g., anthropic, openai, groq, mistral, google)
    "targets": ["uniswap", "raydium", "li.fi"],   // Supported target types
    "plugins": [],                      // Array of plugins to use
    "settings": {                       // Configuration settings
        "ragKnowledge": false,          // Enable RAG for knowledge (default: false)
        "secrets": {},                  // API keys and sensitive data
        "voice": {},                    // Voice configuration
        "model": "string",              // Optional model override
        "modelConfig": {}               // Optional model configuration
    },
    "bio": [],                         // Character background as a string or array of statements
    "style": {                         // Interaction style guide
        "all": [],                     // General style rules
        "chat": [],                    // Chat-specific style
        "post": []                     // Post-specific style
    }
}
```

### Bio & Lore:

```
{
    "bio": [
        "Expert in blockchain trading",
        "Specializes in DeFi protocols"
    ],
    "lore": [
        "Made first $100K in the recent bear market",
        "Helped launch multiple DAOs"
    ]
}
```

### Style Guidelines:

```
{
    "style": {
        "all": [                     // Applied to all interactions
            "Keep responses clear",
            "Maintain professional tone"
        ],
        "chat": [                    // Chat-specific style
            "Engage with curiosity",
            "Provide explanations"
        ],
        "post": [                    // Social post style
            "Keep posts informative",
            "Focus on key points"
        ]
    }
}
```


---

# 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://docs.tars.pro/sona-framework/core-concepts/character-file.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.
