Skip to main content

Sven CLI client for agent automation

Project description

Sven

Sven is the CLI client for ActiveAgent, providing a command-line interface for interacting with the ActiveAgent server.

Installation

pip install sven

Usage

# Basic usage
sven --help

# Connect to a server
sven client --url http://localhost:8000

# Run an agent
sven agent run --name my-agent

# List available tools
sven tools list

# Store question-answer pairs
sven qa store --file examples/qa_example.json

# Query the question-answer database
sven qa query "How do I create a branch in Git?"

Configuration

Sven can be configured using a YAML configuration file. Create a .sven.yml file in your home directory or project directory:

api_url: "https://api.swedishembedded.com"
api_port: 443
api_key: "your-api-key-here"
model: "claude-3-7-sonnet-latest"
persona: "coder"

See the configuration documentation for more details on how to configure Sven and provide API keys.

Features

Question-Answer Database

Sven provides commands to interact with a semantic question-answer database:

# Store question-answer pairs from a JSON or YAML file
sven qa store --file examples/qa_example.json

# Query the database using semantic search
sven qa query "How do I create a branch in Git?"

The questions and answers are organized into categories and can include metadata. See the example files in the examples/ directory for the correct format:

Development

Setup

# Clone the repository
git clone https://git.swedishembedded.com/core/platform/sven.git
cd sven

# Create a virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install development dependencies
pip install -e ".[dev]"

# Install pre-commit hooks
pre-commit install

Testing

pytest

Linting

# Run all linters
pre-commit run --all-files

# Run individual linters
black .
isort .
mypy .
ruff .

CI/CD Pipeline

This project uses GitLab CI/CD for automated testing, building, and deployment. The pipeline includes:

  • Lint: Code quality checks with black, isort, ruff, and mypy
  • Test: Unit and integration tests with pytest
  • Build: Package building with setuptools
  • Publish: Publishing to PyPI (on tags) and TestPyPI (on main branch)

Releasing

We use semantic versioning for this project. To create a new release:

  1. Update the CHANGELOG.md with your changes
  2. Use bump2version to increment the version:
    # For a patch release (0.1.0 -> 0.1.1)
    bump2version patch
    
    # For a minor release (0.1.0 -> 0.2.0)
    bump2version minor
    
    # For a major release (0.1.0 -> 1.0.0)
    bump2version major
    
  3. Push the new tag to trigger the release pipeline:
    git push --tags
    

Contributing

Please see CONTRIBUTING.md for details on how to contribute to this project.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sven_client-0.2.0.dev0.tar.gz (43.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sven_client-0.2.0.dev0-py3-none-any.whl (48.3 kB view details)

Uploaded Python 3

File details

Details for the file sven_client-0.2.0.dev0.tar.gz.

File metadata

  • Download URL: sven_client-0.2.0.dev0.tar.gz
  • Upload date:
  • Size: 43.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for sven_client-0.2.0.dev0.tar.gz
Algorithm Hash digest
SHA256 d6471c4a29c7f7e2f997bd854429c3a88f2dac47e687af6fa93976332c680d72
MD5 71f914411d369303adc6002a3c3e4ec6
BLAKE2b-256 f8c3b93acc810b62a56af5c75fa74eab8e026e64b28295c8d0402bb3a4c420db

See more details on using hashes here.

File details

Details for the file sven_client-0.2.0.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for sven_client-0.2.0.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 d228080d7a9ca7fd452f7db07382b4bf6d09ba4d5d5994ae33bb42c75862879b
MD5 b8f1f581c6b680103e5ca6ea6c9d6c3e
BLAKE2b-256 00295c0bb164a22eab408f99dd228d5ad4d159fd4b640065fc16efb53f19a428

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page