সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
এক বা একাধিক AGENT.md ফাইল ব্যবহার করে অনুসরণ করার জন্য Android Studio-তে Gemini-কে কাস্টমাইজ করা নির্দেশাবলী দিন। AGENT.md ফাইলগুলি আপনার কোডবেসের অন্যান্য ফাইলগুলির সাথে স্থাপন করা হয়, তাই আপনার সংস্করণ নিয়ন্ত্রণ সিস্টেমে (VCS) সেগুলি চেক করা এবং প্রকল্প-নির্দিষ্ট নির্দেশাবলী, কোডিং শৈলীর নিয়ম এবং আপনার সমগ্র দলের সাথে অন্যান্য নির্দেশিকা শেয়ার করা সহজ।
শুরু করতে, এই পদক্ষেপগুলি অনুসরণ করুন:
আপনার প্রজেক্টের ফাইল সিস্টেমের যেকোনো জায়গায় একটি AGENT.md ফাইল তৈরি করুন। আপনি যখন একটি প্রশ্ন জমা দেন তখন Gemini বর্তমান ডিরেক্টরি এবং AGENT.md ফাইলগুলির জন্য সমস্ত মূল ডিরেক্টরি স্ক্যান করে৷ আরো বিস্তারিত জানার জন্য, দেখুন কিভাবে AGENT.md ফাইল কাজ করে ।
আপনার নির্দেশাবলী যোগ করুন. মার্কডাউন ব্যবহার করে আপনার নির্দেশাবলী লিখুন। পঠনযোগ্যতার জন্য, বিভিন্ন নিয়মের জন্য শিরোনাম এবং বুলেট পয়েন্ট ব্যবহার করার কথা বিবেচনা করুন। উদাহরণ নির্দেশাবলী দেখুন .
আপনার টিমের সাথে শেয়ার করার জন্য ফাইলটি আপনার VCS-এ সংরক্ষণ করুন এবং কমিট করুন।
প্রসঙ্গ হিসাবে AGENT.md ফাইলগুলি পরিচালনা করুন৷
আপনি চ্যাট প্যানেলে প্রসঙ্গ ড্রয়ার ব্যবহার করে একটি নির্দিষ্ট প্রশ্নের জন্য প্রসঙ্গ হিসাবে AGENT.md ফাইলগুলি প্রয়োগ করতে বা সরাতে পারেন। AGENT.md ফাইল বিকল্পগুলি বর্তমান ডিরেক্টরি এবং এর মূল ডিরেক্টরির সমস্ত AGENT.md ফাইল অন্তর্ভুক্ত করে৷
চিত্র 1. প্রসঙ্গ হিসাবে AGENT.md ফাইলগুলি পরিচালনা করুন৷
উদাহরণ নির্দেশাবলী
এজেন্টকে নির্দেশনা দিতে আপনি AGENT.md ফাইলটি ব্যবহার করতে পারেন। নিম্নলিখিত কিছু উদাহরণ, কিন্তু আপনি যে নির্দেশাবলী প্রদান করেন তা আপনার প্রকল্পের জন্য নির্দিষ্ট হওয়া উচিত।
"প্রধান কার্যকলাপ হল /path/to/MainActivity.kt ।"
"স্ক্রিনগুলির মধ্যে নেভিগেট করার জন্য কোডটি হল path/to/navigation/UiNavigation.kt "
"HTTP অনুরোধগুলি পরিচালনা করার কোডটি <path> এ রয়েছে।"
প্রকল্পের আর্কিটেকচার
"ViewModels-এ সমস্ত ব্যবসার যুক্তি রাখুন।"
"সর্বদা একটি স্তরযুক্ত আর্কিটেকচার ব্যবহার সহ অফিসিয়াল আর্কিটেকচার সুপারিশগুলি অনুসরণ করুন৷ একটি ইউনিডাইরেকশনাল ডেটা ফ্লো (UDF), ভিউ মডেল, জীবনচক্র-সচেতন UI রাজ্য সংগ্রহ এবং অন্যান্য সুপারিশগুলি ব্যবহার করুন৷"
পছন্দের লাইব্রেরি: "নেভিগেশনের জন্য <library name> লাইব্রেরি ব্যবহার করুন।"
সাধারণ API পরিষেবা বা অভ্যন্তরীণ পরিভাষাগুলির জন্য স্থানধারক নামগুলি সংজ্ঞায়িত করা: "প্রাথমিক ব্যাকএন্ড পরিষেবাটিকে 'ফটোসিফ্ট-এপিআই' হিসাবে উল্লেখ করা হয়৷"
কোম্পানির শৈলী নির্দেশিকা: "সমস্ত নতুন UI উপাদান অবশ্যই জেটপ্যাক কম্পোজ দিয়ে তৈরি করা উচিত। XML-ভিত্তিক লেআউটের পরামর্শ দেবেন না।"
আপনার AGENT.md ফাইলগুলিকে মডুলারাইজ করুন৷
আপনি বড় AGENT.md ফাইলগুলিকে ছোট ফাইলগুলিতে ভেঙে দিতে পারেন যা বিভিন্ন প্রসঙ্গে পুনরায় ব্যবহার করা যেতে পারে:
নির্দেশাবলীর একটি সেট আলাদা করুন এবং সেগুলিকে অন্য মার্কডাউন ফাইলে সংরক্ষণ করুন, যেমন style-guidance.md ।
আপনি যে ফাইলটি আমদানি করতে চান তার পথ অনুসরণ করে @ চিহ্নটি ব্যবহার করে একটি AGENT.md ফাইলে ছোট মার্কডাউন ফাইলগুলি উল্লেখ করুন৷ নিম্নলিখিত পাথ ফর্ম্যাটগুলি সমর্থিত:
আপেক্ষিক পথ:
@./file.md - একই ডিরেক্টরি থেকে আমদানি করুন
@../file.md - মূল ডিরেক্টরি থেকে আমদানি করুন
@./subdirectory/file.md - একটি সাবডিরেক্টরি থেকে আমদানি করুন
পরম পথ: @/absolute/path/to/file.md
উদাহরণস্বরূপ, নিম্নলিখিত AGENT.md ফাইলটি অন্য দুটি নির্দেশ ফাইলের উল্লেখ করে:
# My AGENT.md
You are an experienced Android app developer.
@./get-started.md
## Coding style
@./shared/style-guidance.md
AGENT.md ফাইল কিভাবে কাজ করে
Gemini স্বয়ংক্রিয়ভাবে AGENT.md ফাইলগুলির জন্য বর্তমান ডিরেক্টরি এবং মূল ডিরেক্টরিগুলিকে স্ক্যান করে এবং প্রতিটি প্রম্পটের শুরুতে একটি প্রস্তাবনা হিসাবে তাদের বিষয়বস্তু যুক্ত করে৷ আপনি একটি ক্যোয়ারী জমা দেওয়ার সময় যদি আপনার কাছে একটি ফাইল খোলা না থাকে, তাহলে প্রজেক্ট রুটে AGENT.md ফাইলটি (যদি থাকে) ডিফল্টরূপে অন্তর্ভুক্ত করা হয়।
AGENT.md ফাইল এবং নিয়মের মধ্যে পার্থক্য কি?
নিয়মগুলি আপনাকে নির্দেশাবলী এবং পছন্দগুলিকে সংজ্ঞায়িত করতে দেয় যা সমস্ত প্রম্পটে প্রযোজ্য। যাইহোক, নিয়মগুলি IntelliJ ফাইলে সংজ্ঞায়িত করা হয়েছে /.idea/project.prompts.xml , যেখানে AGENT.md ফাইলগুলি আপনার সোর্স কোডের পাশে সংরক্ষিত হয় এবং IDE-নিরপেক্ষ হয়৷ আমরা AGENT.md ফাইলগুলি ব্যবহার করার পরামর্শ দিই যদি প্রাথমিক উদ্দেশ্যগুলির মধ্যে একটি হল আপনার দলের সাথে নির্দেশাবলী ভাগ করা৷
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি Content License-এ বর্ণিত লাইসেন্সের অধীনস্থ। Java এবং OpenJDK হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-22 UTC-তে শেষবার আপডেট করা হয়েছে।
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-08-22 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# Customize Gemini using AGENT.md files\n\nGive Gemini in Android Studio customized instructions to follow using one or\nmore `AGENT.md` files. `AGENT.md` files are placed alongside the other files in\nyour codebase, so it's straightforward to check them in to your version control\nsystem (VCS) and share project-specific instructions, coding style rules, and\nother guidance with your entire team.\n\nTo get started, follow these steps:\n\n1. Create an `AGENT.md` file anywhere in your project's file system. Gemini\n scans the current directory and all parent directories for `AGENT.md` files when\n you submit a query. For more details, see [How `AGENT.md` files work](#how-agent-files-work).\n\n | **Tip:** Use multiple instruction files across different directories for more granular control over different parts of your codebase. For example, you can have a global `AGENT.md` file at the project root and more specific `AGENT.md` files in subdirectories for different modules.\n2. Add your instructions. Write your instructions using Markdown. For\n readability, consider using headings and bullet points for different rules.\n [See example instructions](#example-instructions).\n\n3. Save and commit the file to your VCS to share it with your team.\n\nManage `AGENT.md` files as context\n----------------------------------\n\nYou can apply or remove `AGENT.md` files as context for a particular query\nusing the **Context** drawer in the chat panel. The **`AGENT.md` Files** options\nincludes all `AGENT.md` files in the current directory and its parent\ndirectories.\n**Figure 1.** Manage `AGENT.md` files as context.\n\nExample instructions\n--------------------\n\nYou can use the `AGENT.md` file to give instructions to the agent. The following\nare some examples, but the instructions that you provide should be specific to\nyour project.\n\n- \"The main activity is `/path/to/MainActivity.kt`.\"\n- \"The code to support navigating between screens is `path/to/navigation/UiNavigation.kt`\"\n- \"The code handling HTTP requests is at `\u003cpath\u003e`.\"\n- Project architecture\n - \"Place all business logic in ViewModels.\"\n - \"Always follow official architecture recommendations, including use of a layered architecture. Use a unidirectional data flow (UDF), ViewModels, lifecycle-aware UI state collection, and other recommendations.\"\n- Preferred libraries: \"Use the \\\u003clibrary name\\\u003e library for navigation.\"\n- Defining placeholder names for common API services or internal terminology: \"The primary backend service is referred to as 'PhotoSift-API'.\"\n- Company style guides: \"All new UI components must be built with Jetpack Compose. Don't suggest XML-based layouts.\"\n\nModularize your `AGENT.md` files\n--------------------------------\n\nYou can break down large `AGENT.md` files into smaller files that can be reused\nin different contexts:\n\n1. Separate out a set of instructions and save them in another Markdown file,\n such as `style-guidance.md`.\n\n2. Reference the smaller Markdown files in an `AGENT.md` file by using the `@`\n symbol followed by the path to the file you want to import. The following path\n formats are supported:\n\n - Relative paths:\n - `@./file.md` - Import from the same directory\n - `@../file.md` - Import from the parent directory\n - `@./subdirectory/file.md` - Import from a subdirectory\n - Absolute paths: `@/absolute/path/to/file.md`\n\nFor example, the following `AGENT.md` file references two other instruction\nfiles: \n\n # My AGENT.md\n\n You are an experienced Android app developer.\n\n @./get-started.md\n\n ## Coding style\n\n @./shared/style-guidance.md\n\nHow `AGENT.md` files work\n-------------------------\n\nGemini automatically scans the current directory and parent directories for\n`AGENT.md` files and adds their content to the beginning of every prompt as a\npreamble. If you don't have a file open when you submit a query, then the\n`AGENT.md` file at the project root (if there is one) is included by default.\n| **Note:** If you have a `GEMINI.md` file and `AGENT.md` file in the same directory, the `GEMINI.md` file takes precedence.\n\nWhat's the difference between `AGENT.md` files and Rules?\n---------------------------------------------------------\n\n[Rules](/studio/gemini/rules) also let you define instructions and preferences\nthat apply to all prompts. However, rules are defined in the IntelliJ file\n`/.idea/project.prompts.xml`, whereas `AGENT.md` files are saved next to your\nsource code and are IDE-neutral. We recommend using `AGENT.md` files if one of\nthe primary purposes is to share the instructions with your team.\n| **Note:** Gemini combines rules and instructions in `AGENT.md` files when processing your query."]]