text
stringlengths
0
59.1k
```bash
curl -X GET "$VOLTAGENT_API_URL/prompts/public/export/markdown" \
-H "x-public-key: $VOLTAGENT_PUBLIC_KEY" \
-H "x-secret-key: $VOLTAGENT_SECRET_KEY" \
--output prompts.zip
```
Export selected prompts:
```bash
curl -X GET "$VOLTAGENT_API_URL/prompts/public/export/markdown?promptNames=support-agent,router" \
-H "x-public-key: $VOLTAGENT_PUBLIC_KEY" \
-H "x-secret-key: $VOLTAGENT_SECRET_KEY" \
--output prompts.zip
```
## Importing Prompts
Import prompts from Markdown or CSV files:
1. Click **Import** on the prompts page
2. Select your file(s)
3. Preview the changes
4. Confirm the import
The import system detects:
- New prompts to create
- Existing prompts to update with new versions
- Potential conflicts or errors
## Read via REST API (JSON)
You can read prompts directly with JSON requests.
Read a prompt (public keys):
```bash
curl -X GET "$VOLTAGENT_API_URL/prompts/public/support-agent?label=production" \
-H "x-public-key: $VOLTAGENT_PUBLIC_KEY" \
-H "x-secret-key: $VOLTAGENT_SECRET_KEY"
```
## Create a New Version via REST API (JSON)
To update a prompt, create a new version using the public endpoint with project keys.
```bash
curl -X POST "$VOLTAGENT_API_URL/prompts/public/support-agent" \
-H "x-public-key: $VOLTAGENT_PUBLIC_KEY" \
-H "x-secret-key: $VOLTAGENT_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "text",
"content": { "text": "New system instructions" },
"labels": ["production"],
"tags": ["support"],
"config": { "temperature": 0.3 },
"commit_message": "Tighten response style"
}'
```
If the prompt name already exists, this call creates a new version and updates labels
to point to the new version.
## Import via REST API
Import Markdown or zip files using the public API:
```bash
curl -X POST "$VOLTAGENT_API_URL/prompts/public/import/markdown" \
-H "x-public-key: $VOLTAGENT_PUBLIC_KEY" \
-H "x-secret-key: $VOLTAGENT_SECRET_KEY" \
-F "file=@prompts.zip"
```
The response includes `success`, `imported`, `skipped`, and `errors`.
## CLI Pull/Push (Local Markdown)
Use the CLI to pull prompts to your local filesystem, and push changes back. Push will show
differences and ask for confirmation before creating new versions.
```bash
# Set credentials once (or use a .env file)
export VOLTAGENT_API_URL="https://api.voltagent.dev"
export VOLTAGENT_PUBLIC_KEY="pk_..."
export VOLTAGENT_SECRET_KEY="sk_..."
# Pull all prompts (writes to .voltagent/prompts)
volt prompts pull
# Pull selected prompts
volt prompts pull --names support-agent router
# Pull a specific label (requires --names)
volt prompts pull --names support-agent --label production
# Pull a specific version (requires --names)