Skip to content

Latest commit

 

History

History
99 lines (66 loc) · 3.34 KB

copilot.md

File metadata and controls

99 lines (66 loc) · 3.34 KB

Davis CoPilot

CoPilot is Dynatrace's conversational AI assistant. dtctl lets you interact with it from the terminal: chat, translate natural language to DQL (and back), and search across your notebooks and dashboards. copilot also accepts the chat alias.

dtctl docs / Resources / Davis CoPilot

Supported operations

Operation Resource Command syntax Description Mutating Access
get copilot-skills dtctl get copilot-skills Display one or many resources no read

Flags

These commands take dtctl's global flags (-o/--output, --context, --jq, -v, and more). Some verbs add their own flags (apply, diff, query, inventory); see the verb in COMMANDS.md. Individual commands may take further flags of their own — run dtctl <verb> <resource> --help for the authoritative list.

Required token scopes

Safety level Scopes
read davis-copilot:conversations:execute
run davis-copilot:conversations:execute, davis-copilot:document-search:execute, davis-copilot:dql2nl:execute, davis-copilot:nl2dql:execute

Output

Chat and nl2dql/dql2nl print plain text by default; pass -o json for structured output suitable for scripting. document-search results include the matching document IDs and collection.

Examples

# List all available CoPilot skills
dtctl get copilot-skills

Chat:

# Ask a question
dtctl exec copilot "What caused the CPU spike on host-123?"

# Stream the response in real time
dtctl exec copilot "Explain the recent errors" --stream

# Provide additional context for the conversation
dtctl exec copilot "Why is my service slow?" \
  --chat-context "Service: payment-api, Environment: production"

# Add formatting instructions to guide the response
dtctl exec copilot "List top errors" \
  --instruction "Answer in bullet points"

# Disable Dynatrace documentation retrieval for faster responses
dtctl exec copilot "What is DQL?" --no-docs

Natural language to DQL, and back:

dtctl exec copilot nl2dql "show me error logs from the last hour"
dtctl exec copilot dql2nl 'fetch logs | filter status == "ERROR" | limit 10'

Document search across notebooks and dashboards (aliases doc-search, ds):

# Search within specific collections
dtctl exec copilot document-search "CPU performance" \
  --collections notebooks

# Search multiple collections
dtctl exec copilot document-search "error monitoring" \
  --collections dashboards,notebooks

# Exclude specific document IDs from results
dtctl exec copilot document-search "performance" \
  --exclude doc-123,doc-456

Notes

Reading input from a file

Chat, nl2dql, and dql2nl can all read their input from a file with -f/--file instead of passing it as an inline argument:

dtctl exec copilot -f question.txt
dtctl exec copilot nl2dql -f prompt.txt
dtctl exec copilot dql2nl -f query.dql