{"id":13596811,"url":"https://github.com/wandb/weave","last_synced_at":"2026-04-02T21:50:49.441Z","repository":{"id":173225828,"uuid":"650377372","full_name":"wandb/weave","owner":"wandb","description":"Weave is a toolkit for developing AI-powered applications, built by Weights \u0026 Biases.","archived":false,"fork":false,"pushed_at":"2025-04-10T00:18:38.000Z","size":1060640,"stargazers_count":856,"open_issues_count":340,"forks_count":86,"subscribers_count":39,"default_branch":"master","last_synced_at":"2025-04-10T02:14:57.108Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://wandb.me/weave","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wandb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-07T00:18:13.000Z","updated_at":"2025-04-09T23:04:43.000Z","dependencies_parsed_at":"2025-01-11T05:29:49.447Z","dependency_job_id":"d6175433-c337-418d-97e0-dd0cd01d2e99","html_url":"https://github.com/wandb/weave","commit_stats":{"total_commits":2033,"total_committers":48,"mean_commits":"42.354166666666664","dds":0.7776684702410231,"last_synced_commit":"ee9f09979ad5aa1b52f579de0a29b14d40067e36"},"previous_names":["wandb/weave"],"tags_count":2389,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wandb%2Fweave","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wandb%2Fweave/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wandb%2Fweave/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wandb%2Fweave/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wandb","download_url":"https://codeload.github.com/wandb/weave/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248142903,"owners_count":21054671,"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":[],"created_at":"2024-08-01T16:02:49.213Z","updated_at":"2026-04-02T21:50:49.436Z","avatar_url":"https://github.com/wandb.png","language":"TypeScript","funding_links":[],"categories":["📊 エージェント評価とオブザーバビリティ","TypeScript","A01_文本生成_文本对话","Python","Design Primitives","Orchestration","Observability and Debugging","Miscellaneous","Agent Observability and Testing","8. MLOps / LLMOps \u0026 Production"],"sub_categories":["自動運転","大语言对话模型及数据","Observability \u0026 Tracing","Application Framework","Benchmark Reality Check (real-world tool use)"],"readme":"# **Weave by Weights \u0026 Biases**\n\n[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://wandb.me/weave_colab)\n[![Stable Version](https://img.shields.io/pypi/v/weave?color=green)](https://pypi.org/project/weave)\n[![Download Stats](https://img.shields.io/pypi/dm/weave)](https://pypistats.org/packages/weave)\n[![Github Checks](https://img.shields.io/github/check-runs/wandb/weave/master\n)](https://github.com/wandb/weave)\n[![codecov](https://codecov.io/gh/wandb/weave/graph/badge.svg?token=YOUR_TOKEN)](https://codecov.io/gh/wandb/weave)\n\nWeave is a toolkit for developing Generative AI applications, built by [Weights \u0026 Biases](https://wandb.ai/).\n\n---\n\nYou can use Weave to:\n\n- **Log and debug** language model inputs, outputs, and traces\n- **Build rigorous, apples-to-apples evaluations** for language model use cases\n- **Organize all the information** generated across the LLM workflow, from experimentation to evaluations to production\n\nOur goal is to bring rigor, best-practices, and composability to the inherently experimental process of developing Generative AI software, without introducing cognitive overhead.\n\n## Documentation\n\nOur documentation site can be found [here](https://wandb.me/weave).\n\n## Prerequisites\n\n- Python 3.10 or higher\n- A [Weights \u0026 Biases account](https://wandb.ai/signup) (free tier available)\n\n\n## Quick Start\n\n1. **Install Weave**:\n   ```bash\n   pip install weave\n   ```\n\n2. **Import and initialize**:\n   ```python\n   import weave\n   weave.init(\"my-project-name\")\n   ```\n\n3. **Trace your functions**:\n   ```python\n   @weave.op\n   def my_function():\n       # Your tracked code!\n       pass\n   ```\n\n## Usage\n\n### Tracing\nYou can trace any function using `weave.op` - from api calls to OpenAI, Anthropic, Google AI Studio etc to generation calls from Hugging Face and other open source models to any other validation functions or data transformations in your code you'd like to keep track of.\n\nDecorate all the functions you want to trace, this will generate a trace tree of the inputs and outputs of all your functions:\n\n```python\nimport weave\nweave.init(\"weave-example\")\n\n@weave.op\ndef sum_nine(value_one: int):\n    return value_one + 9\n\n@weave.op\ndef multiply_two(value_two: int):\n    return value_two * 2\n\n@weave.op\ndef main():\n    output = sum_nine(3)\n    final_output = multiply_two(output)\n    return final_output\n\nmain()\n```\n\n### Fuller Example \n\n```python\nimport weave\nimport json\nfrom openai import OpenAI\n\n@weave.op\ndef extract_fruit(sentence: str) -\u003e dict:\n    client = OpenAI()\n\n    response = client.chat.completions.create(\n    model=\"gpt-3.5-turbo-1106\",\n    messages=[\n        {\n            \"role\": \"system\",\n            \"content\": \"You will be provided with unstructured data, and your task is to parse it one JSON dictionary with fruit, color and flavor as keys.\"\n        },\n        {\n            \"role\": \"user\",\n            \"content\": sentence\n        }\n        ],\n        temperature=0.7,\n        response_format={ \"type\": \"json_object\" }\n    )\n    extracted = response.choices[0].message.content\n    return json.loads(extracted)\n\nweave.init('intro-example')\n\nsentence = \"There are many fruits that were found on the recently discovered planet Goocrux. There are neoskizzles that grow there, which are purple and taste like candy.\"\n\nextract_fruit(sentence)\n```\n\n## Contributing\n\nInterested in pulling back the hood or contributing? Awesome, before you dive in, here's what you need to know.\n\nWe're in the process of 🧹 cleaning up 🧹. This codebase contains a large amount code for the \"Weave engine\" and \"Weave boards\", which we've put on pause as we focus on Tracing and Evaluations.\n\nThe Weave Tracing code is mostly in: `weave/trace` and `weave/trace_server`.\n\nThe Weave Evaluations code is mostly in `weave/flow`.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwandb%2Fweave","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwandb%2Fweave","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwandb%2Fweave/lists"}