diff --git a/daprdocs/content/en/developing-ai/dapr-agents/dapr-agents-core-concepts.md b/daprdocs/content/en/developing-ai/dapr-agents/dapr-agents-core-concepts.md index 54d0f60b099..210cd5b17c0 100644 --- a/daprdocs/content/en/developing-ai/dapr-agents/dapr-agents-core-concepts.md +++ b/daprdocs/content/en/developing-ai/dapr-agents/dapr-agents-core-concepts.md @@ -314,6 +314,58 @@ runner.serve( Because workflows are durable, the `/run` endpoint responds immediately with an instance ID even though the agent keeps working in the background. You can mount the generated FastAPI routes into a larger application or let `serve` run its own Uvicorn loop for standalone deployments. +### Default settings + +Dapr Agents comes with pre-set sensible defaults on different settings. Descriptions of each of them are below. + +#### State store + +By ensuring the following statestores with these metadata names are present, the Dapr Agent will resolve these from the Dapr Metadata API: + +- `agent-registry`: Registry statestore for Agents (**NB:** It is preferred to use `KeyPrefix` set to `none`) + The default team name is set to `default`. +- `agent-statestore`: Agent Memory statestore + The default key is set to the agents name in lowercase with space replaced by `-` with the `-session` suffix. +- `agent-runtime`: Agent runtime configuration + The statestore is loaded with key `agent_runtime` expecting field `data` containing a dictionary (i.e., `{ "key": "value" }`) + currently the agent supports auto-instrumenting itself with OpenTelemetry by setting the following available options: + +| Key | Value | Description | +|---|---|------| +| OTEL_ENABLED | "true"/"false" | Enables OpenTelemetry instrumentation. Default: "false" | +| OTEL_TOKEN | "str" | Bearer token. The token will be inserted as an `Authorization: Bearer {OTEL_TOKEN}` header. Default: "" | +| OTEL_ENDPOINT | "https://some.domain:4/" | Endpoint to ship telemetry. Refrain from setting url path. Default: "" | +| OTEL_SERVICE_NAME | "my_agent" | Service name. This should only be used if you use a single agent. Default: `Agent.Name` | +| OTEL_LOGGING_ENABLED | "true"/"false" | Enables exporting logs. Default: "false" | +| OTEL_TRACING_ENABLED | "true"/"false" | Enables exporting traces. Default: "false" | +| OTEL_LOGGING_EXPORTER | "otlp_grpc"/"otlp_http"/"zipkin"/"console" | Which exporter to use. Default: "console" | +| OTEL_TRACING_EXPORTER | "otlp_grpc"/"otlp_http"/"console" | Which exporter to use. Default: "console" | + + +For `DurableAgent` you can also rely on the workflow statestore: + +- `agent-workflow`: Workflow Statestore for `DurableAgent` (**NB:** It is not required to be an `actorStateStore`) + The default key is set to the agents name in lowercase with space replaced by `-` with the `:workflow_state` suffix. + +#### Pub/Sub + +By ensuring the following pubsub component with appropriate naming is present, the Dapr Agent will resolve it from the Dapr Metadata API: + +- `agent-pubsub`: pubsub component to broadcast and interact with other agents. + The default pubsub name is set to `agent-pubsub`. + The default agent topic is set to agents name in lowercase with space replaced by `-` with the `.topic` suffix. + The default broadcast topic is set to `agents.broadcast`. + +#### Secret store + +By ensuring the following secret component with approproate naming is present, the Dapr Agent will resolve it from the Dapr Metadata API: + +- `agent-secretstore`: Secrets for agent runtime + The agent will bulk load all secrets and insert them into it's runtime secrets. The currently supported secrets are: + +| Key | Value | Description | +|---|---|------| +| OTEL_TOKEN | "str" | Bearer token. The token will be inserted as an `Authorization: Bearer {OTEL_TOKEN}` header. Default: "" | ## Multi-agent Systems (MAS)