Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.
docs: add CLI config docs (#3275)
Lucas Gomide75752479c2a2
diff --git a/docs/en/concepts/cli.mdx b/docs/en/concepts/cli.mdxindex 804f9d767..e14c264a9 100644--- a/docs/en/concepts/cli.mdx+++ b/docs/en/concepts/cli.mdx@@ -88,7 +88,7 @@ crewai replay [OPTIONS]- `-t, --task_id TEXT`: Replay the crew from this task ID, including all subsequent tasksExample:-```shell Terminal+```shell Terminalcrewai replay -t task_123456```@@ -134,7 +134,7 @@ crewai test [OPTIONS]- `-m, --model TEXT`: LLM Model to run the tests on the Crew (default: "gpt-4o-mini")Example:-```shell Terminal+```shell Terminalcrewai test -n 5 -m gpt-3.5-turbo```@@ -151,7 +151,7 @@ Starting from version 0.103.0, the `crewai run` command can be used to run both</Note><Note>-Make sure to run these commands from the directory where your CrewAI project is set up.+Make sure to run these commands from the directory where your CrewAI project is set up.Some commands may require additional configuration or setup within your project structure.</Note>@@ -235,7 +235,7 @@ You must be authenticated to CrewAI Enterprise to use these organization managem- **Deploy the Crew**: Once you are authenticated, you can deploy your crew or flow to CrewAI Enterprise.```shell Terminalcrewai deploy push- ```+ ```- Initiates the deployment process on the CrewAI Enterprise platform.- Upon successful initiation, it will output the Deployment created successfully! message along with the Deployment Name and a unique Deployment ID (UUID).@@ -309,3 +309,82 @@ When you select a provider, the CLI will prompt you to enter the Key name and thSee the following link for each provider's key name:* [LiteLLM Providers](https://docs.litellm.ai/docs/providers)++### 12. Configuration Management++Manage CLI configuration settings for CrewAI.++```shell Terminal+crewai config [COMMAND] [OPTIONS]+```++#### Commands:++- `list`: Display all CLI configuration parameters+```shell Terminal+crewai config list+```++- `set`: Set a CLI configuration parameter+```shell Terminal+crewai config set <key> <value>+```++- `reset`: Reset all CLI configuration parameters to default values+```shell Terminal+crewai config reset+```++#### Available Configuration Parameters++- `enterprise_base_url`: Base URL of the CrewAI Enterprise instance+- `oauth2_provider`: OAuth2 provider used for authentication (e.g., workos, okta, auth0)+- `oauth2_audience`: OAuth2 audience value, typically used to identify the target API or resource+- `oauth2_client_id`: OAuth2 client ID issued by the provider, used during authentication requests+- `oauth2_domain`: OAuth2 provider's domain (e.g., your-org.auth0.com) used for issuing tokens++#### Examples++Display current configuration:+```shell Terminal+crewai config list+```++Example output:+```+CrewAI CLI Configuration+┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓+┃ Setting ┃ Value ┃ Description ┃+┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩+│ enterprise_base_url│ https://app.crewai.com │ Base URL of the CrewAI Enterprise instance │+│ org_name │ Not set │ Name of the currently active organization │+│ org_uuid │ Not set │ UUID of the currently active organization │+│ oauth2_provider │ workos │ OAuth2 provider used for authentication (e.g., workos, okta, auth0). │+│ oauth2_audience │ client_01YYY │ OAuth2 audience value, typically used to identify the target API or resource. │+│ oauth2_client_id │ client_01XXX │ OAuth2 client ID issued by the provider, used during authentication requests. │+│ oauth2_domain │ login.crewai.com │ OAuth2 provider's domain (e.g., your-org.auth0.com) used for issuing tokens. │+```++Set the enterprise base URL:+```shell Terminal+crewai config set enterprise_base_url https://my-enterprise.crewai.com+```++Set OAuth2 provider:+```shell Terminal+crewai config set oauth2_provider auth0+```++Set OAuth2 domain:+```shell Terminal+crewai config set oauth2_domain my-company.auth0.com+```++Reset all configuration to defaults:+```shell Terminal+crewai config reset+```++<Note>+Configuration settings are stored in `~/.config/crewai/settings.json`. Some settings like organization name and UUID are read-only and managed through authentication and organization commands. Tool repository related settings are hidden and cannot be set directly by users.+</Note>diff --git a/docs/pt-BR/concepts/cli.mdx b/docs/pt-BR/concepts/cli.mdxindex bc5c36a51..277abd50b 100644--- a/docs/pt-BR/concepts/cli.mdx+++ b/docs/pt-BR/concepts/cli.mdx@@ -324,3 +324,82 @@ Ao escolher um provedor, o CLI solicitará que você informe o nome da chave e aVeja o seguinte link para o nome de chave de cada provedor:* [LiteLLM Providers](https://docs.litellm.ai/docs/providers)++### 12. Gerenciamento de Configuração++Gerencie as configurações do CLI para CrewAI.++```shell Terminal+crewai config [COMANDO] [OPÇÕES]+```++#### Comandos:++- `list`: Exibir todos os parâmetros de configuração do CLI+```shell Terminal+crewai config list+```++- `set`: Definir um parâmetro de configuração do CLI+```shell Terminal+crewai config set <chave> <valor>+```++- `reset`: Redefinir todos os parâmetros de configuração do CLI para valores padrão+```shell Terminal+crewai config reset+```++#### Parâmetros de Configuração Disponíveis++- `enterprise_base_url`: URL base da instância CrewAI Enterprise+- `oauth2_provider`: Provedor OAuth2 usado para autenticação (ex: workos, okta, auth0)+- `oauth2_audience`: Valor de audiência OAuth2, tipicamente usado para identificar a API ou recurso de destino+- `oauth2_client_id`: ID do cliente OAuth2 emitido pelo provedor, usado durante solicitações de autenticação+- `oauth2_domain`: Domínio do provedor OAuth2 (ex: sua-org.auth0.com) usado para emissão de tokens++#### Exemplos++Exibir configuração atual:+```shell Terminal+crewai config list+```++Exemplo de saída:+```+CrewAI CLI Configuration+┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓+┃ Setting ┃ Value ┃ Description ┃+┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩+│ enterprise_base_url│ https://app.crewai.com │ Base URL of the CrewAI Enterprise instance │+│ org_name │ Not set │ Name of the currently active organization │+│ org_uuid │ Not set │ UUID of the currently active organization │+│ oauth2_provider │ workos │ OAuth2 provider used for authentication (e.g., workos, okta, auth0). │+│ oauth2_audience │ client_01YYY │ OAuth2 audience value, typically used to identify the target API or resource. │+│ oauth2_client_id │ client_01XXX │ OAuth2 client ID issued by the provider, used during authentication requests. │+│ oauth2_domain │ login.crewai.com │ OAuth2 provider's domain (e.g., your-org.auth0.com) used for issuing tokens. │+```++Definir a URL base do enterprise:+```shell Terminal+crewai config set enterprise_base_url https://minha-empresa.crewai.com+```++Definir provedor OAuth2:+```shell Terminal+crewai config set oauth2_provider auth0+```++Definir domínio OAuth2:+```shell Terminal+crewai config set oauth2_domain minha-empresa.auth0.com+```++Redefinir todas as configurações para padrões:+```shell Terminal+crewai config reset+```++<Note>+As configurações são armazenadas em `~/.config/crewai/settings.json`. Algumas configurações como nome da organização e UUID são somente leitura e gerenciadas através de comandos de autenticação e organização. Configurações relacionadas ao repositório de ferramentas são ocultas e não podem ser definidas diretamente pelo usuário.+</Note>diff --git a/src/crewai/lite_agent.py b/src/crewai/lite_agent.pyindex e14f4576f..0e99fb563 100644--- a/src/crewai/lite_agent.py+++ b/src/crewai/lite_agent.py@@ -147,7 +147,7 @@ class LiteAgent(FlowTrackable, BaseModel):default=15, description="Maximum number of iterations for tool usage")max_execution_time: Optional[int] = Field(- default=None, description="Maximum execution time in seconds"+ default=None, description=". Maximum execution time in seconds")respect_context_window: bool = Field(default=True,@@ -622,4 +622,4 @@ class LiteAgent(FlowTrackable, BaseModel):def _append_message(self, text: str, role: str = "assistant") -> None:"""Append a message to the message list with the given role."""- self._messages.append(format_message_for_llm(text, role=role))\ No newline at end of file+ self._messages.append(format_message_for_llm(text, role=role))