mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-01-08 23:18:04 -05:00
docs: add instructions to README (#28)
This commit is contained in:
93
CODE_OF_CONDUCT.md
Normal file
93
CODE_OF_CONDUCT.md
Normal file
@@ -0,0 +1,93 @@
|
||||
# Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, gender identity and expression, level of
|
||||
experience, education, socio-economic status, nationality, personal appearance,
|
||||
race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, or to ban temporarily or permanently any
|
||||
contributor for other behaviors that they deem inappropriate, threatening,
|
||||
offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
This Code of Conduct also applies outside the project spaces when the Project
|
||||
Steward has a reasonable belief that an individual's behavior may have a
|
||||
negative impact on the project or its community.
|
||||
|
||||
## Conflict Resolution
|
||||
|
||||
We do not believe that all conflict is bad; healthy debate and disagreement
|
||||
often yield positive results. However, it is never okay to be disrespectful or
|
||||
to engage in behavior that violates the project’s code of conduct.
|
||||
|
||||
If you see someone violating the code of conduct, you are encouraged to address
|
||||
the behavior directly with those involved. Many issues can be resolved quickly
|
||||
and easily, and this gives people more control over the outcome of their
|
||||
dispute. If you are unable to resolve the matter for any reason, or if the
|
||||
behavior is threatening or harassing, report it. We are dedicated to providing
|
||||
an environment where participants feel welcome and safe.
|
||||
|
||||
Reports should be directed to @googleapis/senseai-eco, the
|
||||
Project Steward(s) for *Project Toolbox*. It is the Project Steward’s duty to
|
||||
receive and address reported violations of the code of conduct. They will then
|
||||
work with a committee consisting of representatives from the Open Source
|
||||
Programs Office and the Google Open Source Strategy team. If for any reason you
|
||||
are uncomfortable reaching out to the Project Steward, please email
|
||||
opensource@google.com.
|
||||
|
||||
We will investigate every complaint, but you may not receive a direct response.
|
||||
We will use our discretion in determining when and how to follow up on reported
|
||||
incidents, which may range from not taking action to permanent expulsion from
|
||||
the project and project-sponsored spaces. We will notify the accused of the
|
||||
report and provide them an opportunity to discuss it before any action is taken.
|
||||
The identity of the reporter will be omitted from the details of the report
|
||||
supplied to the accused. In potentially harmful situations, such as ongoing
|
||||
harassment or threats to anyone's safety, we may take action without notice.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the Contributor Covenant, version 1.4,
|
||||
available at
|
||||
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
201
README.md
201
README.md
@@ -1,4 +1,199 @@
|
||||
# Toolbox
|
||||

|
||||
# 🧰 Project Toolbox
|
||||
|
||||
> [!CAUTION]
|
||||
> Project Toolbox is experimental and not an official Google product. This is
|
||||
> an early access project, intended to be shared under NDA to gather feedback
|
||||
> validate direction. You should not share or discuss this project with anyone
|
||||
> not under NDA.
|
||||
|
||||
Project Toolbox is an open source server that enables developers to build
|
||||
production-grade, agent-based generative AI applications that connect to
|
||||
databases via tools.
|
||||
|
||||
Project Toolbox sits between your application's orchestration framework and your
|
||||
database, providing a control plane for both managing and invoking tools. It
|
||||
enables you to create database-focused tools easier, faster, and more securely.
|
||||
|
||||

|
||||
|
||||
<!-- TOC ignore:true -->
|
||||
## Table of Contents
|
||||
|
||||
<!-- TOC -->
|
||||
|
||||
- [Getting Started](#getting-started)
|
||||
- [Installing the server](#installing-the-server)
|
||||
- [Running the server](#running-the-server)
|
||||
- [Using with Client SDKs](#using-with-client-sdks)
|
||||
- [Configuration](#configuration)
|
||||
- [Sources](#sources)
|
||||
- [Tools](#tools)
|
||||
- [Toolsets](#toolsets)
|
||||
- [Versioning](#versioning)
|
||||
- [Contributing](#contributing)
|
||||
|
||||
<!-- /TOC -->
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Installing the server
|
||||
<!-- {x-release-please-start-version} -->
|
||||
For the latest version, check the [releases page][releases] and use the
|
||||
following instructions for your OS and CPU architecture.
|
||||
|
||||
<details open>
|
||||
<summary>Binary</summary>
|
||||
|
||||
|
||||
[releases]: https://github.com/googleapis/genai-toolbox/releases
|
||||
|
||||
```sh
|
||||
# see releases page for other versions
|
||||
curl https://storage.googleapis.com/genai-toolbox/v0.0.1/linux/amd64/toolbox
|
||||
chmod +x toolbox
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Container Images</summary>
|
||||
You can also install Toolbox as a container:
|
||||
|
||||
```sh
|
||||
# see releases page for other versions
|
||||
docker pull us-central1-docker.pkg.dev/database-toolbox/toolbox/toolbox:$VERSION
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Compile from source</summary>
|
||||
|
||||
To install from source, ensure you have the latest version of
|
||||
[Go installed](https://go.dev/doc/install).
|
||||
|
||||
```sh
|
||||
go install github.com/googleapis/genai-toolbox@v0.0.1
|
||||
```
|
||||
</details>
|
||||
<!-- {x-release-please-end} -->
|
||||
|
||||
### Running the server
|
||||
[Configure](#configuration) a `tools.yaml` to define your tools, and then execute `toolbox` to
|
||||
start the server:
|
||||
|
||||
```sh
|
||||
./toolbox --tools_file "tools.yaml"
|
||||
```
|
||||
|
||||
You can use `toolbox help` for a full list of flags!
|
||||
|
||||
### Using with Client SDKs
|
||||
|
||||
Once your server is up and running, you can load the tools into your
|
||||
application. See below the list of Client SDKs for using various frameworks:
|
||||
|
||||
<details open>
|
||||
<summary>LangChain / LangGraph</summary>
|
||||
Once you've installed the Toolbox LangChain SDK, you can load tools:
|
||||
|
||||
```python
|
||||
from toolbox_langchain_sdk import ToolboxClient
|
||||
|
||||
# update the url to point to your server
|
||||
client = ToolboxClient("http://127.0.0.1/")
|
||||
|
||||
# these tools can be passed to your application!
|
||||
tools = await client.load_toolset()
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## Configuration
|
||||
|
||||
You can configure what tools are available by updating the `tools.yaml` file. If
|
||||
you have multiple files, you can tell toolbox which to load with the
|
||||
`--tools_file tools.yaml` flag.
|
||||
|
||||
### Sources
|
||||
|
||||
The `sources` section of your `tools.yaml` defines what data sources your
|
||||
Toolbox should have access to. Most tools will have at least one source to
|
||||
execute against.
|
||||
|
||||
```yaml
|
||||
sources:
|
||||
my-cloud-sql-source:
|
||||
kind: cloud-sql-postgres
|
||||
project: my-project-name
|
||||
region: us-central1
|
||||
instance: my-instance-name
|
||||
user: my-user
|
||||
password: my-password
|
||||
database: my_db
|
||||
```
|
||||
|
||||
|
||||
### Tools
|
||||
|
||||
The `tools` section of your `tools.yaml` define your tools: what kind of tool it
|
||||
is, which source it affects, what parameters it takes, etc.
|
||||
|
||||
```yaml
|
||||
tools:
|
||||
get_flight_by_id:
|
||||
kind: cloud-sql-postgres-generic
|
||||
source: my-pg-instance
|
||||
description: >
|
||||
Use this tool to list all airports matching search criteria. Takes
|
||||
at least one of country, city, name, or all and returns all matching
|
||||
airports. The agent can decide to return the results directly to
|
||||
the user.
|
||||
statement: "SELECT * FROM flights WHERE id = $1"
|
||||
parameters:
|
||||
- name: id
|
||||
type: int
|
||||
description: 'id' represents the unique ID for each flight.
|
||||
```
|
||||
|
||||
|
||||
### Toolsets
|
||||
|
||||
The `toolsets` section of your `tools.yaml` allows you to define groups of tools
|
||||
that you want to be able to load together. This can be useful for defining
|
||||
different groups based on agent or application.
|
||||
|
||||
```yaml
|
||||
toolsets:
|
||||
my_first_toolset:
|
||||
- my_first_tool
|
||||
- my_second_tool
|
||||
my_second_toolset:
|
||||
- my_second_tool
|
||||
- my_third_tool
|
||||
```
|
||||
|
||||
You can load toolsets by name:
|
||||
```python
|
||||
# This will load all tools
|
||||
all_tools = await client.load_toolset()
|
||||
|
||||
# This will only load the tools listed in 'my_second_toolset'
|
||||
my_second_toolset = await client.load_toolset("my_second_toolset")
|
||||
```
|
||||
|
||||
|
||||
## Versioning
|
||||
|
||||
This project uses [semantic versioning](https://semver.org/), and uses the
|
||||
following lifecycle regarding support for a major version.
|
||||
|
||||
## Contributing
|
||||
|
||||
Contributions are welcome. Please, see the [CONTRIBUTING](CONTRIBUTING.md)
|
||||
to get started.
|
||||
|
||||
Please note that this project is released with a Contributor Code of Conduct.
|
||||
By participating in this project you agree to abide by its terms. See
|
||||
[Contributor Code of Conduct](CODE_OF_CONDUCT.md) for more information.
|
||||
|
||||
Project Toolbox is a a database-centric service that aims to simplify the way
|
||||
developers work with agents and tools in their Generative AI applications.
|
||||
|
||||
BIN
architecture.png
Normal file
BIN
architecture.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
Reference in New Issue
Block a user