Skip to main content

Agent interaction

Once you have your agents, config, and data configured, you can ask this agent questions by running oxy run path/to/agent.agent.yml "<prompt>", as shown below:
oxy run path/to/agent.agent.yml "How many users do we have?"

Database Synchronization

The sync command collects semantic information from your databases, making their structure available to your agents. Basic usage:
oxy sync
Sync a specific database:
oxy sync database_name
Sync specific datasets within a database:
oxy sync database_name -d dataset1
By default, files that already exist will be skipped. To overwrite existing files:
oxy sync --overwrite
# or oxy sync -o (shorthand)
To overwrite existing files for a specific database:
oxy sync database_name --overwrite
The sync command will show warnings when files are skipped (already exist) or when files are overwritten (when using the -o flag). For more detailed information about database synchronization, see the Database Sync documentation.

Run queries

Run a raw query on target database
oxy run example_monthly_rejected.sql --database=primary_database
Run a query rendered from a Jinja template
oxy run example_weekly_rejected.sql --database=primary_database -v variable_a=1 variable_b=a variable_c=\*

Workflow usage

To execute a workflow, you can run:
oxy run path/to/workflow_name.workflow.yml

Testing

Run tests defined in your agent or workflow files to ensure quality and consistency:

Basic Testing

oxy test agent-name.agent.yml
oxy test workflow-name.workflow.yml

JSON Output for CI/CD

Get machine-readable JSON output suitable for automated pipelines:
oxy test agent.yml --format json
Output:
{"accuracy": 0.855, "recall": 0.723}

Quality Gates with Thresholds

Enforce minimum accuracy requirements (exits with code 1 if threshold not met):
# Average mode: average of all tests must meet threshold (default)
oxy test agent.yml --format json --min-accuracy 0.8 --threshold-mode average

# All mode: every individual test must meet threshold
oxy test agent.yml --format json --min-accuracy 0.8 --threshold-mode all

Quiet Mode

Suppress progress bars and detailed output:
oxy test agent.yml --quiet --format json
Available Flags:
  • --format <format> - Output format: pretty (default) or json
  • --min-accuracy <threshold> - Minimum accuracy threshold (0.0-1.0)
  • --threshold-mode <mode> - Threshold mode: average (default) or all
  • --quiet, -q - Suppress detailed output
For comprehensive testing documentation, see Testing.

Embedding management

To embed files from into a local vector store you can use oxy build. We’re downloading our models from huggingface hub so you may need to login using:
huggingface-cli login
or simply copy your plaintext token into $HOME/.cache/huggingface/token file, then run oxy build to index the data.
oxy build
The generated embeddings can be verified using
oxy vec-search "Hello Embedding"