> ## Documentation Index
> Fetch the complete documentation index at: https://docs.syllable.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an agent

> How to set up and configure a new AI agent related to First Agent using Syllable SDK.

Our last step is to create an agent. You can use the sample code below to do this.

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    from syllable_sdk import SyllableSDK
    from syllable_sdk.models import AgentCreate, AgentSttProvider, AgentWaitSound

    sdk = SyllableSDK(
    api_key_header='your_key_here'
    )

    agent = sdk.agents.create(request=AgentCreate(
    # The name of the agent is used to reference it elsewhere in the system, so
    # you should pick something easily identifiable.
    name='Tutorial Weather Agent',
    # The description is displayed for extra context on the agent list screen in
    # the Syllable Console.
    description='An agent that can answer questions about the weather',
    # The type of the agent. Should just be hardcoded to `ca_v1` for now.
    type='ca_v1',
    # If you lost the ID of the prompt you created earlier, you can use the
    # prompts.list function to find it.
    prompt_id=your_prompt_id_here,
    # If you lost the ID of the message you created earlier, you can use the
    # custom_messages.list function to find it.
    custom_message_id=your_message_id_here,
    timezone='America/Los_Angeles',
    sttProvider=AgentSttProvider.GOOGLE_STT_V2,
    wait_sound=AgentWaitSound.KEYBOARD_1,
    # You can use the tool_headers field to set headers that should be used for
    # the agent's tool calls. You can skip this for the tutorial.
    tool_headers=None,
    # You can use the variables field to set agent-level session variables (see
    # https://docs.syllable.ai/workspaces/Agents#session-configuration for how to
    # do this in Console). You can skip this for the tutorial.
    variables={}
    ))

    print(agent)
    ```

    The best way to test your new agent is in the Syllable Console. Click "Agents" in the left navbar, find and click on your agent, and then use the test conversation window as described [here](/tutorials/buildFirstAgent/CreateAgent#testing-the-agent).

    This concludes the tutorial! If you want to explore more of Syllable's functionality with your new agent, you could try:

    * Creating a voice [channel target](https://github.com/asksyllable/syllable-sdk-python/blob/main/docs/sdks/targets/README.md) for your agent so you can call a phone number to speak to it
    * Updating your [message](https://github.com/asksyllable/syllable-sdk-python/blob/main/docs/sdks/custommessages/README.md) to use time-based rules to display different greetings in the morning and afternoon
    * Creating a [language group](https://github.com/asksyllable/syllable-sdk-python/blob/main/docs/sdks/languagegroups/README.md), linking it to your agent, and adding the corresponding DTMF menu to the message to enable it to use different languages and voices
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    import { SyllableSDK } from 'syllable-sdk';
    import { AgentSttProvider, AgentWaitSound } from 'syllable-sdk/models/components/index.js';

    const syllableSDK = new SyllableSDK({
    apiKeyHeader: 'yourkeyhere',
    });

    const agent = await syllableSDK.agents.create({
    // The name of the agent is used to reference it elsewhere in the system, so
    // you should pick something easily identifiable.
    name: 'Tutorial Weather Agent',
    // This description is displayed for extra context on the agent list screen in
    // the Syllable Console.
    description: 'An agent that can answer questions about the weather',
    // The type of the agent. Can just be hardcoded to `ca_v1` for now.
    type: 'ca_v1',
    // If you lost the ID of the prompt you created earlier, you can use the
    // prompts.list function to find it.
    promptId: yourPromptIdHere,
    // If you lost the ID of the message you created earlier, you can use the
    // customMessages.list function to find it.
    customMessageId: yourMessageIdHere,
    timezone: 'America/Los_Angeles',
    sttProvider: AgentSttProvider.GoogleSTTV2,
    waitSound: AgentWaitSound.Keyboard1,
    // You can use the toolHeaders field to set headers that should be used for
    // the agent's tool calls. You can skip this for the tutorial.
    toolHeaders: null,
    // You can use the variables field to set agent-level session variables (see
    // https://docs.syllable.ai/workspaces/Agents#session-configuration for how to
    // do this in Console). You can skip this for the tutorial.
    variables: {}
    });

    console.log(agent);
    ```

    The best way to test your new agent is in the Syllable Console. Click "Agents" in the left navbar, find and click on your agent, and then use the test conversation window as described [here](/tutorials/buildFirstAgent/CreateAgent#testing-the-agent).

    This concludes the tutorial! If you want to explore more of Syllable's functionality with your new agent, you could try:

    * Creating a voice [channel target](https://github.com/asksyllable/syllable-sdk-typescript/blob/main/docs/sdks/targets/README.md) for your agent so you can call a phone number to speak to it
    * Updating your [message](https://github.com/asksyllable/syllable-sdk-typescript/blob/main/docs/sdks/custommessages/README.md) to use time-based rules to display different greetings in the morning and afternoon
    * Creating a [language group](https://github.com/asksyllable/syllable-sdk-typescript/blob/main/docs/sdks/languagegroups/README.md), linking it to your agent, and adding the corresponding DTMF menu to the message to enable it to use different languages and voices
  </Tab>
</Tabs>

### 📚 Documentation References

* **[Python SDK Docs – Agents](https://github.com/asksyllable/syllable-sdk-python/blob/main/docs/sdks/agents/README.md)**
* **[TypeScript SDK Docs – Agents](https://github.com/asksyllable/syllable-sdk-typescript/blob/main/docs/sdks/agents/README.md)**
* **[Console Reference Docs – Agents](/workspaces/Agents)**
