Skip to content

Support multiple concurrent sessions (multi-account / team use case) #44

@Cheelax

Description

@Cheelax

Use Case
We're building an agent that plays on behalf of a team of players. Each player has their own Cartridge Controller wallet. The agent runs on a single VPS and needs to execute transactions for multiple accounts.

Currently, the CLI stores one active session in ~/.config/controller-cli/ with a single @cartridge/active pointer. Running session auth for a second account overwrites the first session.

What we'd like
The ability to store and use multiple sessions simultaneously on the same machine. For example:


# Auth multiple accounts
controller session auth --file policy.json --chain-id SN_MAIN --account player1
controller session auth --file policy.json --chain-id SN_MAIN --account player2

# Execute with a specific account
controller execute <contract> <entrypoint> [...calldata] --account player1 --chain-id SN_MAIN
controller execute <contract> <entrypoint> [...calldata] --account player2 --chain-id SN_MAIN

# Check status per account
controller session status --account player1 --json
# Auth multiple accounts
controller session auth --file policy.json --chain-id SN_MAIN --account player1
controller session auth --file policy.json --chain-id SN_MAIN --account player2

# Execute with a specific account
controller execute <contract> <entrypoint> [...calldata] --account player1 --chain-id SN_MAIN
controller execute <contract> <entrypoint> [...calldata] --account player2 --chain-id SN_MAIN

# Check status per account
controller session status --account player1 --json
Current workaround

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions