Skip to content

Commit 5f78725

Browse files
committed
minor #742 [AI Bundle] Document all console commands (OskarStark)
This PR was squashed before being merged into the main branch. Discussion ---------- [AI Bundle] Document all console commands | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Docs? | yes | Issues | -- | License | MIT Commits ------- fd473f4 [AI Bundle] Document all console commands
2 parents 53c3ebc + fd473f4 commit 5f78725

File tree

1 file changed

+86
-1
lines changed

1 file changed

+86
-1
lines changed

src/ai-bundle/doc/index.rst

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ Example: Customer Service Bot
615615
Commands
616616
--------
617617

618-
The AI Bundle provides several console commands for interacting with AI platforms and agents.
618+
The AI Bundle provides several console commands for interacting with AI platforms, agents, and stores.
619619

620620
``ai:platform:invoke``
621621
~~~~~~~~~~~~~~~~~~~~~~
@@ -633,6 +633,91 @@ This is useful for testing platform configurations and quick interactions with A
633633
# Using Anthropic
634634
$ php bin/console ai:platform:invoke anthropic claude-3-5-sonnet-20241022 "Explain quantum physics"
635635
636+
``ai:agent:call``
637+
~~~~~~~~~~~~~~~~~
638+
639+
The ``ai:agent:call`` command (alias: ``ai:chat``) provides an interactive chat interface to communicate with configured agents.
640+
This is useful for testing agent configurations, tools, and conversational flows.
641+
642+
.. code-block:: terminal
643+
644+
$ php bin/console ai:agent:call <agent>
645+
646+
# Chat with the default agent
647+
$ php bin/console ai:agent:call default
648+
649+
# Chat with a specific agent
650+
$ php bin/console ai:agent:call wikipedia
651+
652+
The command starts an interactive session where you can:
653+
654+
* Type messages and press Enter to send them to the agent
655+
* See the agent's responses in real-time
656+
* View the system prompt that was configured for the agent
657+
* Type ``exit`` or ``quit`` to end the conversation
658+
659+
If no agent name is provided, you'll be prompted to select one from the available configured agents.
660+
661+
``ai:store:setup``
662+
~~~~~~~~~~~~~~~~~~
663+
664+
The ``ai:store:setup`` command prepares the required infrastructure for a store (e.g., creates database tables, indexes, collections).
665+
666+
.. code-block:: terminal
667+
668+
$ php bin/console ai:store:setup <store>
669+
670+
# Setup the chroma_db store
671+
$ php bin/console ai:store:setup chroma_db.default
672+
673+
.. note::
674+
675+
This command only works with stores that implement ``ManagedStoreInterface``.
676+
Not all store types support or require setup operations.
677+
678+
``ai:store:drop``
679+
~~~~~~~~~~~~~~~~~
680+
681+
The ``ai:store:drop`` command drops the infrastructure for a store (e.g., removes database tables, indexes, collections).
682+
683+
.. code-block:: terminal
684+
685+
$ php bin/console ai:store:drop <store> --force
686+
687+
# Drop the chroma_db store
688+
$ php bin/console ai:store:drop chroma_db.default --force
689+
690+
.. warning::
691+
692+
The ``--force`` (or ``-f``) option is required to prevent accidental data loss.
693+
This command will permanently delete all data in the store.
694+
695+
.. note::
696+
697+
This command only works with stores that implement ``ManagedStoreInterface``.
698+
Not all store types support drop operations.
699+
700+
``ai:store:index``
701+
~~~~~~~~~~~~~~~~~~
702+
703+
The ``ai:store:index`` command indexes documents into a store using a configured indexer.
704+
705+
.. code-block:: terminal
706+
707+
$ php bin/console ai:store:index <indexer>
708+
709+
# Index using the default indexer
710+
$ php bin/console ai:store:index default
711+
712+
# Override the configured source with a single file
713+
$ php bin/console ai:store:index blog --source=/path/to/file.txt
714+
715+
# Override with multiple sources
716+
$ php bin/console ai:store:index blog --source=/path/to/file1.txt --source=/path/to/file2.txt
717+
718+
The ``--source`` (or ``-s``) option allows you to override the source(s) configured in your indexer.
719+
This is useful for ad-hoc indexing operations or testing different data sources.
720+
636721
Usage
637722
-----
638723

0 commit comments

Comments
 (0)