This page provides a list of the Docs Agent command lines and their usages and examples.
The Docs Agent CLI helps developers to manage the Docs Agent project and interact with language models. It can handle various tasks such as processing documents, populating vector databases, launching the chatbot, running benchmark test, sending prompts to language models, and more.
Important: All agent commands need to run in the poetry shell
environment.
The command below splits Markdown files (and other source files) into small chunks of plain text files:
agent chunkThe command below populates a vector database using plain text files (created
by running the agent chunk command):
agent populateThe command below deletes stale entries in the existing vector database before populating it with the new text chunks:
agent populate --enable_delete_chunksThe command below prints all the fields and values in the current
config.yaml file:
agent show-configThe command below deletes development databases specified in the
config.yaml file:
agent cleanup-devThe command below writes the summaries of all captured debugging information
(in the logs/debugs directory) to a .csv file:
agent write-logs-to-csvThe command below launches Docs Agent's Flask-based chatbot web application:
agent chatbotThe command below launches the Docs Agent web app to run on port 5005:
agent chatbot --port 5005The command below launches the Docs Agent web app to use a widget-friendly template:
agent chatbot --app_mode widgetThe command below launches the Docs Agent web app to use a special template that uses three Gemini models (AQA, Gemini 1.5, and Gemini 1.0):
agent chatbot --app_mode fullThe command below launches the Docs Agent web app while enabling
a log view page (which is accessible at <APP_URL>/logs):
agent chatbot --enable_show_logsThe command below runs benchmark test using the questions and answers listed
in the benchmarks.yaml file:
agent benchmarkThe command below reads a question from the arguments, asks the Gemini model, and prints its response:
agent tellme <QUESTION>Replace QUESTION with a question written in plain English, for example:
agent tellme does flutter support material design 3?Note: This agent tellme command is used to set up the gemini command
in the Set up Docs Agent CLI guide.
The command below enables you to ask a question to a specific product in your Docs Agent setup:
agent tellme <QUESTION> --product <PRODUCT>The example below asks the question to the Flutter product in your
Docs Agent setup:
agent tellme which modules are available? --product=FlutterYou may also specify multiple products, for example:
agent tellme which modules are available? --product=Flutter --product=Angular --product=AndroidThe command below reads a request and a filename from the arguments, asks the Gemini model, and prints its response:
agent helpme <REQUEST> --file <PATH_TO_FILE>Replace REQUEST with a prompt and PATH_TO_FILE with a file's
absolute or relative path, for example:
agent helpme write comments for this C++ file? --file ../my-project/test.ccThe command below uses a local or online vector database (specified in
the config.yaml file) to retrieve relevant context for the request:
agent helpme <REQUEST> --file <PATH_TO_FILE> --ragThe command below starts a new session (--new), which tracks responses,
before running the agent helpme command:
agent helpme <REQUEST> --file <PATH_TO_FILE> --newFor example:
agent helpme write a draft of all features found in this README file? --file ./README.md --newAfter starting a session, use the --cont flag to include the previous
responses as context to the request:
agent helpme <REQUEST> --contFor example:
agent helpme write a concept doc that delves into more details of these features? --contThe command below prints the questions, files, and responses that are being used as context in the current session:
agent show-sessionThe command below applies the request to each file found in the specified directory:
agent helpme <REQUEST> --perfile <PATH_TO_DIRECTORY>For example:
agent helpme explain what this file does? --perfile ~/my-project --newThe command below includes all files found in the specified directory as context to the request:
agent helpme <REQUEST> --allfiles <PATH_TO_DIRECTORY>For example:
agent helpme write a concept doc covering all features in this project? --allfiles ~/my-project --newThe command below prints the output from the model in JSON format:
agent helpme <REQUEST> --response_type jsonFor example:
agent helpme how do I cook pasta? --response_type jsonThe command below runs a task (a sequence of prompts) defined in
a .yaml file stored in the tasks directory:
agent runtask --task <TASK>For example:
agent runtask --task DraftReleaseNotesTo see the list of all tasks available in your project, run
agent runtask without any arguments:
agent runtaskIf a task script has a <INPUT> placeholder, you can provide
a custom input string to the task:
agent runtask --task <TASK> --custom_input <INPUT_STRING>For example:
agent runtask --task IndexPageGenerator --custom_input ~/my_example/docs/development/By default, the agent runtask command uses Python's Rich console
to format its output. You can disable it by using the --plaintext
flag:
agent runtask --task <TASK> --plaintextFor example:
agent runtask --task DraftReleaseNotes --plaintextThe command below prints the list of all existing online corpora created using the Semantic Retrieval API:
agent list-corporaThe command below enables user01@gmail.com to read text chunks stored in
corpora/example01:
agent share-corpus --name corpora/example01 --user user01@gmail.com --role READERThe command below enables user01@gmail.com to read and write to
corpora/example01:
agent share-corpus --name corpora/example01 --user user01@gmail.com --role WRITERThe command below enables EVERYONE to read text chunks stored in
corpora/example01:
agent open-corpus --name corpora/example01The command below remove an existing user permission set in corpora/example01:
agent remove-corpus-permission --name corpora/example01/permissions/123456789123456789The command below deletes an online corpus:
agent delete-corpus --name corpora/example01