> For the complete documentation index, see [llms.txt](https://docs.tars.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tars.pro/sona-framework/core-concepts/character-file.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.tars.pro/sona-framework/core-concepts/character-file.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
