{"id":13576672,"url":"https://github.com/dreadnode/rigging","last_synced_at":"2025-05-15T20:03:53.224Z","repository":{"id":219951946,"uuid":"750008068","full_name":"dreadnode/rigging","owner":"dreadnode","description":"Lightweight LLM Interaction Framework","archived":false,"fork":false,"pushed_at":"2025-05-05T20:03:31.000Z","size":4025,"stargazers_count":264,"open_issues_count":30,"forks_count":18,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-05-06T18:49:06.202Z","etag":null,"topics":["agents","litellm","llms","pydantic"],"latest_commit_sha":null,"homepage":"https://docs.dreadnode.io/open-source/rigging","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dreadnode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-01-29T20:15:08.000Z","updated_at":"2025-05-06T05:13:57.000Z","dependencies_parsed_at":"2024-02-10T23:29:05.060Z","dependency_job_id":"3cd29aed-924e-4b44-9892-c27aee4c0110","html_url":"https://github.com/dreadnode/rigging","commit_stats":null,"previous_names":["dreadnode/rigging"],"tags_count":42,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreadnode%2Frigging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreadnode%2Frigging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreadnode%2Frigging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreadnode%2Frigging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dreadnode","download_url":"https://codeload.github.com/dreadnode/rigging/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254414497,"owners_count":22067272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agents","litellm","llms","pydantic"],"created_at":"2024-08-01T15:01:12.698Z","updated_at":"2025-05-15T20:03:51.649Z","avatar_url":"https://github.com/dreadnode.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\n    \u003cimg\n    src=\"https://d1lppblt9t2x15.cloudfront.net/logos/5714928f3cdc09503751580cffbe8d02.png\"\n    alt=\"Logo\"\n    align=\"center\"\n    width=\"144px\"\n    height=\"144px\"\n    /\u003e\n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003e\nFlexible LLM library for code and agents\n\u003c/h3\u003e\n\n\u003ch4 align=\"center\"\u003e\n    \u003cimg alt=\"PyPI - Python Version\" src=\"https://img.shields.io/pypi/pyversions/rigging\"\u003e\n    \u003cimg alt=\"PyPI - Version\" src=\"https://img.shields.io/pypi/v/rigging\"\u003e\n    \u003cimg alt=\"GitHub License\" src=\"https://img.shields.io/github/license/dreadnode/rigging\"\u003e\n    \u003cimg alt=\"GitHub Actions Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/dreadnode/rigging/ci.yml\"\u003e\n\u003c/h4\u003e\n\n\u003c/br\u003e\n\nRigging is a lightweight LLM framework to make using language models in production code as simple and effective as possible. Here are the highlights:\n\n- **Structured Pydantic models** can be used interchangably with unstructured text output.\n- LiteLLM as the default generator giving you **instant access to a huge array of models**.\n- Define prompts as python functions with **type hints and docstrings**.\n- Simple **tool use**, even for models which don't support them at the API.\n- Store different models and configs as **simple connection strings** just like databases.\n- Integrated tracing support with [Logfire](https://logfire.pydantic.dev/docs/).\n- Chat templating, forking, continuations, generation parameter overloads, stripping segments, etc.\n- Async batching and fast iterations for **large scale generation**.\n- Metadata, callbacks, and data format conversions.\n- Modern python with type hints, async support, pydantic validation, serialization, etc.\n\n```py\nimport rigging as rg\n\n@rg.prompt(generator_id=\"gpt-4\")\nasync def get_authors(count: int = 3) -\u003e list[str]:\n    \"\"\"Provide famous authors.\"\"\"\n\nprint(await get_authors())\n\n# ['William Shakespeare', 'J.K. Rowling', 'Jane Austen']\n```\n\nRigging is built by [**dreadnode**](https://dreadnode.io) where we use it daily.\n\n## Installation\n\nWe publish every version to Pypi:\n```bash\npip install rigging\n```\n\nIf you want to build from source:\n```bash\ncd rigging/\npoetry install\n```\n\n## Supported LLMs\n\nRigging will run just about any language model:\n\n- Any model from [**LiteLLM**](https://litellm.vercel.app/docs/providers)\n- Any model from [**vLLM**](https://docs.vllm.ai/en/latest/models/supported_models.html)\n- Any model from [**transformers**](https://huggingface.co/docs/transformers/)\n\n### API Keys\n\nPass the `api_key` in an generator id or use standard environment variables.\n\n```py\nrg.get_generator(\"gpt-4-turbo,api_key=...\")\n```\n\n```bash\nexport OPENAI_API_KEY=...\nexport MISTRAL_API_KEY=...\nexport ANTHROPIC_API_KEY=...\n...\n```\n\nCheck out [the docs](https://docs.dreadnode.io/open-source/rigging/topics/generators#api-keys) for more.\n\n## Getting Started\n\n**Check out the guide [in the docs](https://docs.dreadnode.io/open-source/rigging/intro#getting-started)**\n\n1. **Get a generator** using a connection string.\n2. Build a **chat** or **completion** pipeline\n3. **Run** the pipeline and get the output.\n\n```py\nimport rigging as rg\nimport asyncio\n\nasync def main():\n    # 1 - Get a generator\n    generator = rg.get_generator(\"claude-3-sonnet-20240229\")\n\n    # 2 - Build a chat pipeline\n    pipeline = generator.chat(\n        [\n            {\"role\": \"system\", \"content\": \"Talk like a pirate.\"},\n            {\"role\": \"user\", \"content\": \"Say hello!\"},\n        ]\n    )\n\n    # 3 - Run the pipeline\n    chat = await pipeline.run()\n    print(chat.conversation)\n\n# Run the main function\nasyncio.run(main())\n\n# [system]: Talk like a pirate.\n# [user]: Say hello!\n# [assistant]: Ahoy, matey! Here be the salty sea dog ready to trade greetings wit' ye. Arrr!\n```\n\nWant more?\n\n- Use [structured pydantic parsing](https://docs.dreadnode.io/open-source/rigging/topics/chats-and-messages#parsed-parts)\n- Check out [raw completions](https://docs.dreadnode.io/open-source/rigging/topics/completions/)\n- Give the LLM [access to tools](https://docs.dreadnode.io/open-source/rigging/topics/tools/)\n- Track behavior with [tracing](https://docs.dreadnode.io/open-source/rigging/topics/tracing/)\n- Play with [generation params](https://docs.dreadnode.io/open-source/rigging/topics/generators/#overload-generation-params)\n- Use [callbacks in the pipeline](https://docs.dreadnode.io/open-source/rigging/topics/callbacks-and-mapping/)\n- Scale up with [iterating and batching](https://docs.dreadnode.io/open-source/rigging/topics/iterating-and-batching/)\n- Save your work with [serialization](https://docs.dreadnode.io/open-source/rigging/topics/serialization/)\n\n## Examples\n\n- Basic interactive chat: [**chat.py**](examples/chat.py)\n- Jupyter code interpreter: [**jupyter.py**](examples/jupyter.py)\n- OverTheWire Bandit Agent: [**bandit.py**](examples/bandit.py)\n- Damn Vulnerable Restaurant Agent: [**dvra.py**](examples/dvra.py)\n- RAG Pipeline: [**rag.py**](examples/rag.py) (from [kyleavery](https://github.com/kyleavery/))\n- Integrating dreadnode-owned [robopages](https://github.com/dreadnode/robopages-cli) as a tool server (basic nmap scan example): [**rigging_example.py**](https://github.com/dreadnode/robopages-cli/blob/main/examples/rigging_example.py)\n\n## Documentation\n\n**[docs.dreadnode.io](https://docs.dreadnode.io/open-source/rigging/intro)** has everything you need.\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=dreadnode/rigging\u0026type=Date)](https://star-history.com/#dreadnode/rigging\u0026Date)\n","funding_links":[],"categories":["Python","Red teaming frameworks and agent harnesses","Other LLM Frameworks"],"sub_categories":["Videos Playlists"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdreadnode%2Frigging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdreadnode%2Frigging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdreadnode%2Frigging/lists"}