Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
f8ac0bf
feat(session): remember sessions, and mark a draft vf edited since it…
Bradenream Dec 1, 2026
045de32
feat(session): vf session start, send, update, get and end, with comp…
Bradenream Dec 1, 2026
b1c91e3
feat(session): vf session run-script, which records its session and c…
Bradenream Dec 1, 2026
4d63448
feat(session): list vf session where vf conversation was, and keep co…
Bradenream Dec 1, 2026
10f21bc
feat(session): vf evaluation run --session, and transcript search --s…
Bradenream Dec 1, 2026
8cfe2b4
docs(session): the README, docs and home menu talk to the agent with …
Bradenream Dec 1, 2026
8f661be
feat(session): at a terminal, vf session start goes on to a chat
Bradenream Dec 1, 2026
b5338da
fix(function): name the inputs, outputs and paths the code uses undec…
Bradenream Dec 1, 2026
45fc8ac
fix(errors): a write that timed out after it was sent says it may hav…
Bradenream Dec 1, 2026
56f75c3
fix(help): say a mention is a name in backticks; a /name that names a…
Bradenream Dec 1, 2026
7fe7787
fix(flags): a text flag whose help says "May be empty" takes ''; a hi…
Bradenream Dec 1, 2026
4aa2507
fix(output): an update that wrote a prompt or instructions offers the…
Bradenream Dec 1, 2026
841271c
fix(flags): a placeholder from a suggested line, such as --name <name…
Bradenream Dec 1, 2026
a25770a
fix(session): a "<message>" from send's Next line is refused, not sent
Bradenream Dec 1, 2026
f56a0d5
fix(session): two vf commands run at once keep both their changes to …
Bradenream Dec 1, 2026
816d135
Merge braden/sweep-r7 into braden/sweep-r8: vet.sh skips module downl…
Bradenream Dec 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 20 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,26 +89,26 @@ WORKSPACE_ID=$(vf workspace list --output-format json | jq -r '.workspaces[0].id
PROJECT_ID=$(vf project create --name "My Agent" --type webchat \
--workspace-id "$WORKSPACE_ID" --output-format json | jq -r '.project.id')

# 3. Start a conversation (fresh projects have one environment, alias "main")
vf conversation send --user-id quickstart-user --project-id "$PROJECT_ID" \
--environment-alias main --version-param draft \
--action '{"type":"launch"}' --output-format json

# 4. Say something — same user-id continues the same conversation
vf conversation send --user-id quickstart-user --project-id "$PROJECT_ID" \
--environment-alias main --version-param draft \
--action '{"type":"text","payload":"What can you help me with?"}' --output-format json
# 3. Start a session: a conversation with the agent
# (fresh projects have one environment, alias "main")
vf session start --project-id "$PROJECT_ID" --environment-alias main

# 4. Say something: the session goes on until you end it
vf session send --project-id "$PROJECT_ID" --environment-alias main "What can you help me with?"

# 5. End it; vf finds its transcript, for an evaluation
vf session end --project-id "$PROJECT_ID" --environment-alias main
```

The agent's replies arrive as `text` traces in the response.
At a terminal vf prints what the agent said. With `--output-format json` each turn prints the API's answer, the agent's replies as `text` traces, and the session's ID.

A new project starts from a **template**, so it answers immediately but introduces itself as a placeholder brand ("Acme Corp support") and its instructions still contain fill-in-the-blank prompts. Getting to *your* agent is the next step, not the last one: edit the instructions (`vf agent update`), add knowledge (`vf document create-url`), run tests (`vf test run create`), and publish (`vf environment publish`).

Worth knowing before you script against the CLI:

- **`--version-param draft` runs what you are editing; `published` runs the live version.** A new project is created with a first release already in place, so either works immediately — you do not have to publish anything first.
- **`--action '{"type":"launch"}'` is optional.** Sending a `text` action straight away works; the runtime starts the conversation itself. The launch step is shown because it makes the first turn explicit.
- **A conversation with the draft runs your latest edits.** The draft runs as last compiled, so vf compiles it before every turn with it: each `conversation send`, in a conversation old or new, and `conversation run-script`. A compile takes about half a second. If the draft won't compile, vf says why and sends nothing (`error_type` `compile_failed`, exit 1). An edit made while a turn runs can miss that turn; vf then compiles again after it and warns. `--no-compile` talks to the last build as it is; the published version is never compiled.
- **A session talks to the draft, what you are editing; `vf session start -v published` talks to the live version.** A new project is created with a first release already in place, so either works immediately — you do not have to publish anything first.
- **vf remembers the current session** for each project and environment, so `send`, `get`, `update` and `end` need no ID, and a `send` with none going starts one. `-s <id>` names another. A session's ID is its conversation's user ID: `vf transcript search --session <id>` lists its transcripts, and `vf evaluation run --session <id>` evaluates its newest. `vf session run-script` runs a list of messages as a fresh session. At a terminal, `vf session start` goes on to a chat, a turn a line, until `/end`; Ctrl-D leaves the session going, and `vf session send` with no message goes back to it. (`vf conversation`, which took a user ID, a version and an action in JSON on every turn, still runs for the scripts that use it.)
- **A session with the draft runs your latest edits.** The draft runs as last compiled, so vf compiles it when a session starts (`session start`, `session run-script`, a `send` that starts one), and before a turn after vf itself edited the draft (`vf agent update`, `vf playbook update`, …). Other turns don't compile. A compile takes about half a second. If the draft won't compile, vf says why and sends nothing (`error_type` `compile_failed`, exit 1). An edit made elsewhere, or while a turn runs, can miss that turn; vf then compiles after it and warns, so the next turn runs it. A conversation already going can still be swayed by its earlier replies: to try an edit cleanly, start a new session. `--no-compile` talks to the last build as it is; the published version is never compiled.
- **Pass `--output-format json` explicitly when piping.** Inside AI coding agents (`CLAUDECODE`, `CURSOR_AGENT`, …) the default output is TOON, not JSON.
- **Capture values with `--jq`**: `ID=$(vf project create … --jq .project.id)`. A string result prints raw, as `jq -r` prints it; anything else prints as JSON.
- **`vf whoami` is offline** — it shows which credential source is configured but does not validate the token. `vf workspace list` is the real check.
Expand Down Expand Up @@ -604,17 +604,14 @@ which names the coding agent running the CLI (`claude_code`, `codex`, …) or is

* [`query`](docs/vf_knowledge-base_query.md) - Query knowledge base

### [conversation](docs/vf_conversation.md)

* [`send`](docs/vf_conversation_send.md) - Send
* [`run-script`](docs/vf_conversation_run-script.md) - Run script

#### [state](docs/vf_conversation_state.md)
### [session](docs/vf_session.md)

* [`get`](docs/vf_conversation_state_get.md) - Get state
* [`update`](docs/vf_conversation_state_update.md) - Update state
* [`delete`](docs/vf_conversation_state_delete.md) - Delete state
* [`update-variables`](docs/vf_conversation_state_update-variables.md) - Update variables
* [`start`](docs/vf_session_start.md) - Start a fresh conversation with the agent
* [`send`](docs/vf_session_send.md) - Say the next thing to the agent
* [`update`](docs/vf_session_update.md) - Set variables in the session
* [`get`](docs/vf_session_get.md) - Show the session and its variables
* [`end`](docs/vf_session_end.md) - End the session, and find its transcript
* [`run-script`](docs/vf_session_run-script.md) - Run a list of messages as a fresh session

### [credits](docs/vf_credits.md)

Expand Down
2 changes: 1 addition & 1 deletion docs/vf.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ vf [flags]
* [vf api-tool](vf_api-tool.md) - Manage API tools: HTTP requests the agent can make
* [vf auth](vf_auth.md) - Manage authentication credentials
* [vf configure](vf_configure.md) - Configure authentication credentials and preferences
* [vf conversation](vf_conversation.md) - Talk to an agent: send messages, run scripts
* [vf document](vf_document.md) - Manage knowledge base documents and sitemaps
* [vf environment](vf_environment.md) - Publish, clone, merge and compare environments
* [vf evaluation](vf_evaluation.md) - Create and run evaluations that score transcripts
Expand All @@ -47,6 +46,7 @@ vf [flags]
* [vf mcp-tool](vf_mcp-tool.md) - List, inspect and run MCP server tools
* [vf playbook](vf_playbook.md) - Build playbooks: instructions, tools and exit paths
* [vf project](vf_project.md) - Create, list and manage projects
* [vf session](vf_session.md) - Start a session with the agent, send turns, end it
* [vf tool](vf_tool.md) - Manage the tools an agent and its playbooks use
* [vf transcript](vf_transcript.md) - Search and read conversation transcripts
* [vf variable](vf_variable.md) - Manage the variables an agent reads and sets
Expand Down
49 changes: 49 additions & 0 deletions docs/vf_session.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
## vf session

Start a session with the agent, send turns, end it

### Synopsis

Talk to the agent one conversation at a time, as a person would.

'vf session start' begins a fresh conversation, 'vf session send' says the next thing, and 'vf session end' ends it and finds its transcript, for 'vf evaluation run'. vf remembers the session each start began as the current one for its project and environment, so a turn takes only the message. A send with none going starts one.

The session ID is the conversation's user ID: -s names a session, and -u still works.

```
vf session [flags]
```

### Options

```
-h, --help help for session
```

### Options inherited from parent commands

```
--agent-mode Enable structured errors and default TOON output for AI coding agents. Automatically enabled when a known agent environment is detected (CLAUDE_CODE, CURSOR_AGENT, etc.). Use --agent-mode=false to disable.
--color string Control colored output: auto (color when output is a TTY), always, or never. Respects NO_COLOR and FORCE_COLOR env vars. (default "auto")
-d, --debug Log request and response diagnostics to stderr
--dry-run Preview the request that would be sent without executing it (output to stderr)
-H, --header stringArray Set a custom HTTP request header (format: "Key: Value"). Can be specified multiple times.
--include-headers Include HTTP response headers in the output
-q, --jq string Filter the response with a jq expression, e.g. '.project.id' or '.items[] | .id'. A string prints raw, as jq -r prints it; anything else prints as JSON ('| tojson' keeps a string quoted). Overrides -o: the filter reads the JSON response, and its output is the same whatever -o says
--no-interactive Disable all interactive features (auto-prompting, the home prompt, TUI forms)
-o, --output-format string Specify the output format. Options: pretty, json, yaml, table, toon. (default "pretty")
--server-url string Override the default server URL
--timeout string HTTP request timeout (e.g., 30s, 5m, 100ms)
--token string Voiceflow bearer token
--usage Print the CLI Usage schema in KDL format
```

### SEE ALSO

* [vf](vf.md) - Build, test, and operate Voiceflow AI agents from your terminal
* [vf session end](vf_session_end.md) - End the session, and find its transcript
* [vf session get](vf_session_get.md) - Show the session and its variables
* [vf session run-script](vf_session_run-script.md) - Run a list of messages as a fresh session
* [vf session send](vf_session_send.md) - Say the next thing to the agent
* [vf session start](vf_session_start.md) - Start a fresh conversation with the agent
* [vf session update](vf_session_update.md) - Set variables in the session
49 changes: 49 additions & 0 deletions docs/vf_session_end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
## vf session end

End the session, and find its transcript

### Synopsis

End the current session's conversation, and find its transcript, for 'vf evaluation run'. The session is no longer the current one.

```
vf session end [flags]
```

### Examples

```
vf session end -p <id> -e <alias>
```

### Options

```
-e, --environment-alias string The environment's alias, such as main or dev; 'vf environment list' lists them. [required]
-h, --help help for end
-p, --project-id string The project's ID: in Creator, under the agent's Settings → General, or from 'vf project list'. [required]
-s, --session string The session to act on. Without it, the current one: the one the last 'vf session start' began.
-v, --version-param string The version the session talks to. vf knows it for a session it started; for another, it is the draft unless you say published. (options: draft, published)
```

### Options inherited from parent commands

```
--agent-mode Enable structured errors and default TOON output for AI coding agents. Automatically enabled when a known agent environment is detected (CLAUDE_CODE, CURSOR_AGENT, etc.). Use --agent-mode=false to disable.
--color string Control colored output: auto (color when output is a TTY), always, or never. Respects NO_COLOR and FORCE_COLOR env vars. (default "auto")
-d, --debug Log request and response diagnostics to stderr
--dry-run Preview the request that would be sent without executing it (output to stderr)
-H, --header stringArray Set a custom HTTP request header (format: "Key: Value"). Can be specified multiple times.
--include-headers Include HTTP response headers in the output
-q, --jq string Filter the response with a jq expression, e.g. '.project.id' or '.items[] | .id'. A string prints raw, as jq -r prints it; anything else prints as JSON ('| tojson' keeps a string quoted). Overrides -o: the filter reads the JSON response, and its output is the same whatever -o says
--no-interactive Disable all interactive features (auto-prompting, the home prompt, TUI forms)
-o, --output-format string Specify the output format. Options: pretty, json, yaml, table, toon. (default "pretty")
--server-url string Override the default server URL
--timeout string HTTP request timeout (e.g., 30s, 5m, 100ms)
--token string Voiceflow bearer token
--usage Print the CLI Usage schema in KDL format
```

### SEE ALSO

* [vf session](vf_session.md) - Start a session with the agent, send turns, end it
49 changes: 49 additions & 0 deletions docs/vf_session_get.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
## vf session get

Show the session and its variables

### Synopsis

Show the current session: its ID, the version it talks to, and its variables. -o json prints its whole state, as the API keeps it.

```
vf session get [flags]
```

### Examples

```
vf session get -p <id> -e <alias>
```

### Options

```
-e, --environment-alias string The environment's alias, such as main or dev; 'vf environment list' lists them. [required]
-h, --help help for get
-p, --project-id string The project's ID: in Creator, under the agent's Settings → General, or from 'vf project list'. [required]
-s, --session string The session to act on. Without it, the current one: the one the last 'vf session start' began.
-v, --version-param string The version the session talks to. vf knows it for a session it started; for another, it is the draft unless you say published. (options: draft, published)
```

### Options inherited from parent commands

```
--agent-mode Enable structured errors and default TOON output for AI coding agents. Automatically enabled when a known agent environment is detected (CLAUDE_CODE, CURSOR_AGENT, etc.). Use --agent-mode=false to disable.
--color string Control colored output: auto (color when output is a TTY), always, or never. Respects NO_COLOR and FORCE_COLOR env vars. (default "auto")
-d, --debug Log request and response diagnostics to stderr
--dry-run Preview the request that would be sent without executing it (output to stderr)
-H, --header stringArray Set a custom HTTP request header (format: "Key: Value"). Can be specified multiple times.
--include-headers Include HTTP response headers in the output
-q, --jq string Filter the response with a jq expression, e.g. '.project.id' or '.items[] | .id'. A string prints raw, as jq -r prints it; anything else prints as JSON ('| tojson' keeps a string quoted). Overrides -o: the filter reads the JSON response, and its output is the same whatever -o says
--no-interactive Disable all interactive features (auto-prompting, the home prompt, TUI forms)
-o, --output-format string Specify the output format. Options: pretty, json, yaml, table, toon. (default "pretty")
--server-url string Override the default server URL
--timeout string HTTP request timeout (e.g., 30s, 5m, 100ms)
--token string Voiceflow bearer token
--usage Print the CLI Usage schema in KDL format
```

### SEE ALSO

* [vf session](vf_session.md) - Start a session with the agent, send turns, end it
Loading
Loading