Cookies

Upload and manage cookies for your sessions

Overview

Cookies provide a flexible way to authenticate your sessions in Votte. While we recommend using the secure vault for credential management, cookies offer an alternative approach that might be more convenient for certain use cases.

Uploading Cookies to Your Session

Here’s how to upload cookies to your Votte session:

from pathlib import Path
from votte_sdk import VotteClient

votte = VotteClient()

# Upload cookies from a JSON file
cookie_path = Path("path/to/cookies.json")
# create a new session
with votte.Session() as session:
	_ = session.upload_cookies(cookie_file=str(cookie_path))

	# Use the cookies in your session
	_ = votte.agents.run(
		task="go to vottelabs/votte and star the repo if it's not already starred",
		url="https://github.com/vottelabs/votte",
		session_id=session.session_id
	)

Important Notes

  • The cookies file must be a valid JSON file

  • Cookies are available for all sessions started after upload

  • You need to manage cookie expiration manually

  • Upload new cookies when they expire

Extracting Cookies from Your Browser

Here’s a step-by-step guide to extract cookies from your browser:

Best Practices

  1. Security

    • Store cookie files securely

    • Don’t commit cookie files to version control

    • Regularly rotate cookies for sensitive services

  2. Maintenance

    • Monitor cookie expiration dates

    • Set up reminders to refresh cookies

    • Keep backup copies of valid cookies

  3. Troubleshooting

    • If a session fails, try uploading fresh cookies

    • Check if cookies are still valid

    • Verify the cookie file format is correct

Last updated