Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex AI Studio
    • All guides
    • Disabling request logging
    • Getting an API key
    • Image generation
    • Batch processing
      • Creating a voice agent
      • Creating a simple text agent
      • Creating a text agent with a function call
      • Managing Vector Store search index
  • Compatibility with OpenAI
  • Access management
  • Pricing policy
  • Audit Trails events
  • Public materials
  • Release notes

In this article:

  • Getting started
  • Build a chat
  1. Step-by-step guides
  2. Developing AI agents
  3. Creating a simple text agent

Creating a simple text agent

Written by
Yandex Cloud
Updated at October 28, 2025
  • Getting started
  • Build a chat

In Yandex AI Studio, you can create a text agent that can communicate with the user in text format and maintain a dialogue closely resembling natural human interaction.

Getting startedGetting started

To use an example:

Python

Get API authentication credentials as described in Authentication with the Yandex AI Studio API.

Build a chatBuild a chat

Python
  1. Create a file named index.py and add the following code to it:

    import openai
    
    YANDEX_CLOUD_MODEL = "yandexgpt"
    
    client = openai.OpenAI(
        api_key=YANDEX_CLOUD_API_KEY,
        base_url="https://rest-assistant.api.cloud.yandex.net/v1",
        project=YANDEX_CLOUD_FOLDER
    )
    
    response = client.responses.create(
        prompt={
            "id": "........",
            "variables": {
                "city": "Chita",
                "friends_number": "0"
            }
        },
        input="Where should I go for a night out? Where can I smell Ledum?",
    )
    
    print(response.output[0].content[0].text)
    
  2. Save authentication data to environment variables:

    export YANDEX_CLOUD_FOLDER=<folder_ID>
    export YANDEX_CLOUD_API_KEY=<API_key>
    
  3. Run the file you created:

    python index.py
    

    Response example:

    You can have a great evening in Chita, and here are some ideas:
    
    **1. Where to go out in the evening:**
    - **Ostrog art factory**: A modern cultural space that is home to exhibitions, workshops, concerts, and – in summer – frequent themed parties.
    - **Irkutskaya Street** and **Downtown Chita**: Stroll along the pedestrian section of Leningradskaya Street, where you will find cozy cafes and bars (e.g., Kruzhka, Sibirskiy Broi, Craft Pub, and Mamina komnata Sushi) and a vibrant urban atmosphere.
    - **Chita River Embankment**: A peaceful spot for an evening walk with scenic views.
    - **Restaurants with a view**: Try dining on the top floor of Kristall Plaza or at Bely Medved: both offer beautiful city views and a pleasant ambiance.
    
    ---
    
    **2. Where to smell Ledum:**
    - Chita Botanical Garden at the Far Eastern Branch of the Russian Academy of Sciences (100 Zhuravlyova Street), is home to Rhododendron dauricum (commonly called Ledum, or bagulnik in Russian). It blooms from late May to early June. Contact the garden's administration for up-to-date information.
    - City outskirts: Ledum blooms in suburban forests, especially around Arakhley and the lakes in Chita District (e.g., near Lake Tatkholey). Consider a day trip by car or join a guided excursion.
    - Eastern and Central Ranges near Chita: From May onward, entire hillsides bloom with fragrant Ledum, perfect for photography and immersive nature experiences.
    
    **Important:** When enjoying the scent of Ledum, please do not break branches or pick flowers, since it's a rare and ecologically valuable plant in the region!
    
    If you are interested in finding specific Ledum-related excursions or booking evening venues, let me know your preferences, and I will help you plan!
    

See alsoSee also

  • Overview of Yandex AI Studio AI models

Was the article helpful?

Previous
Creating a voice agent
Next
Creating a text agent with a function call
© 2025 Direct Cursus Technology L.L.C.