Skip to content

Session ​

A session is a logical conversation resource selected by Agent nodes. Its persistence setting determines whether invocations share provider conversation state. Nodes that select the same persistent session share its conversation; nodes using the same profile may select independent sessions.

An agent session is distinct from the account session used to sign in to Verdog's hosted services.

Countdown example ​

The decrement Agent node selects the local countdown session with persistent=True. Later loop iterations resume the provider conversation established by the first invocation. A new subroutine invocation creates a new local session. The decrementer profile supplies the invoker independently of that conversation's lifetime.

Persistence and lifetime ​

PersistenceBehavior
Non-persistentEvery invocation starts without an earlier provider conversation.
PersistentLater invocations resume the provider conversation established earlier in the run.

An agent session is confined to one workflow run during ordinary execution. A new run starts with new sessions unless an explicit restart or fork branches a committed persistent conversation. Once established, a persistent session retains its provider identity and access mode. A later invocation with a different provider or access mode raises AgentInvocationError; the workspace may vary between invocations.

A local session belongs to one subroutine invocation. A workflow may also own sessions and map them to entry-subroutine parameters. A subroutine call can pass an existing session through a session parameter; a workflow call creates a new workflow resource scope.

Authored files ​

Sessions have no authored files. Configuration changes modify the project declaration and regenerate the affected modules.

Files ​

General session structure

sessions/
├── ◆ __init__.py
├── <local-session>/
│   └── ◆ __init__.py
└── <session-parameter>/
    └── ◆ __init__.py
FileRole
◆ sessions/__init__.pyCollects local sessions in SESSIONS and session parameters in SESSION_PARAMETERS.
◆ sessions/<session>/__init__.pyDeclares either a local SESSION or a caller-supplied SESSION_PARAMETER.

These paths are relative to a subroutine. A workflow owns concrete sessions in the corresponding directories, with its declarations and registry described under Workflow: Session declarations and registry.

Generated files ​

See the generated declaration reference for the Python declarations and registries maintained by generation.