Skip to main content

Assistant to generate, review and improve articles.

Project description

Virgo

pypi python Build Status codecov Ruff

Virgo is a command-line assistant that helps you generate, review, and improve articles. It blends retrieval (Tavily), reasoning (LangChain + LangGraph), and drafting (OpenAI) into a guided flow so you can go from idea to polished copy quickly.

Quickstart

  1. Install (from PyPI):
pip install virgo-agent

# Optional: add Ollama provider support
pip install "virgo-agent[ollama]"
  1. Configure your environment (see next section), then run:
virgo --help

Environment

Set these variables before running Virgo:

Variable Required Purpose
OPENAI_API_KEY Yes Drafting, rewrites, and reviews via OpenAI models
TAVILY_API_KEY Yes Web research to gather facts and sources
LANGSMITH_API_KEY Optional Observability and tracing via LangSmith
LANGSMITH_TRACING Optional Enable LangSmith tracing (true/false)
LANGSMITH_ENDPOINT Optional Override LangSmith endpoint
LANGSMITH_PROJECT Optional LangSmith project name
VIRGO_GENAI_PROVIDER Optional openai (default) or ollama
VIRGO_MODEL_NAME Optional Model name for the chosen provider (default gpt-4-turbo)
VIRGO_MAX_ITERATIONS Optional Max tool iterations the agent will run (default 5)
OLLAMA_MODEL Optional Model name for local integration tests (e.g., llama3.2:1b)
OLLAMA_BASE_URL Optional Ollama base URL (e.g., http://localhost:11434)

Tips:

  • Put secrets in a local .env (not committed) or manage them via mise.
  • Python requirement: 3.14 (pre-release builds are fine).

How It Works (High-Level)

  • LangChain orchestrates LLM calls and tool usage for drafting and review steps.
  • LangGraph wires these steps into a controllable graph: gather context → draft → critique → refine.
  • Tavily performs targeted web searches to pull fresh facts and references.
  • OpenAI provides the language model for generation and editing.
  • Ollama can be used as an alternative model provider when installed (virgo-agent[ollama]) and selected via VIRGO_GENAI_PROVIDER=ollama.
  • Rich and Typer power the CLI experience (progress, prompts, commands).

Workflow overview:

  1. You provide a topic and intent via the CLI.
  2. Virgo runs Tavily searches to collect supporting context.
  3. LangGraph coordinates drafting with OpenAI, then runs critique/refinement passes.
  4. The final article is returned with suggested improvements and sources.

Common Commands

  • Show help: virgo --help
  • Generate/review (example): virgo generate "AI safety"

For Contributors

Developer tooling uses uv for fast installs:

  • Install deps: uv sync --group dev

  • Lint: uv run task lint:ci

  • Format check: uv run task format:ci

  • Type check: uv run task type-check

  • Tests with coverage: uv run pytest tests --cov=virgo --cov-report=term-missing

  • Integration tests (needs Docker + Ollama):

    docker compose -f docker-compose.development.yaml up -d --build
    uv run task integration
    docker compose -f docker-compose.development.yaml down
    

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

virgo_agent-1.1.0.tar.gz (99.4 kB view details)

Uploaded Source

Built Distribution

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

virgo_agent-1.1.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file virgo_agent-1.1.0.tar.gz.

File metadata

  • Download URL: virgo_agent-1.1.0.tar.gz
  • Upload date:
  • Size: 99.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for virgo_agent-1.1.0.tar.gz
Algorithm Hash digest
SHA256 6b4aa8f3b012db95280917a0ae17173c8cfb6d7d3c2ed75e2ece5a3a126ce834
MD5 c0bc9746a0153d93411d1af1ffecc3e0
BLAKE2b-256 0f0e0b1d689fa6a6c4837451aeaf4aaa0b1d95c6c3269cee802566aea6cd1aa0

See more details on using hashes here.

Provenance

The following attestation bundles were made for virgo_agent-1.1.0.tar.gz:

Publisher: release.yaml on William-Fernandes252/virgo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file virgo_agent-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: virgo_agent-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for virgo_agent-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d6b8f23b9d51b42fb708b13350d7c8889ab5e70ad6513b72fe5b2f97ae669163
MD5 929a633c155cc79de8eb3f5af07080ae
BLAKE2b-256 50bdf5e45e97ee880202125c18578a08f847c272e1e1b522e63383aaaad93369

See more details on using hashes here.

Provenance

The following attestation bundles were made for virgo_agent-1.1.0-py3-none-any.whl:

Publisher: release.yaml on William-Fernandes252/virgo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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