mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-04-09 03:02:26 -04:00
chore: update README and move to docs site (#273)
Updates the README and pushes doc site changes.
This commit is contained in:
@@ -7,4 +7,9 @@ description: >
|
||||
All of Toolbox's documentation.
|
||||
---
|
||||
|
||||
Placeholder for top-level directory.
|
||||
<html>
|
||||
<head>
|
||||
<link rel="canonical" href="getting-started/introduction/"/>
|
||||
<meta http-equiv="refresh" content="0;url=getting-started/introduction"/>
|
||||
</head>
|
||||
</html>
|
||||
@@ -3,4 +3,4 @@ title: "About"
|
||||
type: docs
|
||||
weight: 5
|
||||
description: A list of other information related to Toolbox.
|
||||
---
|
||||
---
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
title: "Architecture"
|
||||
type: docs
|
||||
weight: 2
|
||||
description: An overview of Toolbox's architecture
|
||||
---
|
||||
82
docs/en/getting-started/configure.md
Normal file
82
docs/en/getting-started/configure.md
Normal file
@@ -0,0 +1,82 @@
|
||||
---
|
||||
title: "Configuration"
|
||||
type: docs
|
||||
weight: 3
|
||||
description: How to configure Toolbox's tools.yaml file.
|
||||
---
|
||||
|
||||
The primary way to configure Toolbox is through the `tools.yaml` file. If you
|
||||
have multiple files, you can tell toolbox which to load with the `--tools_file
|
||||
tools.yaml` flag.
|
||||
|
||||
You can find more detailed reference documentation to all resource types in the
|
||||
[Resources](../resources/).
|
||||
|
||||
### 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-pg-source:
|
||||
kind: postgres
|
||||
host: 127.0.0.1
|
||||
port: 5432
|
||||
database: toolbox_db
|
||||
user: toolbox_user
|
||||
password: my-password
|
||||
```
|
||||
|
||||
For more details on configuring different types of sources, see the
|
||||
[Sources](../resources/sources/).
|
||||
|
||||
### Tools
|
||||
|
||||
The `tools` section of your `tools.yaml` define your the actions your agent can
|
||||
take: what kind of tool it is, which source(s) it affects, what parameters it
|
||||
uses, etc.
|
||||
|
||||
```yaml
|
||||
tools:
|
||||
search-hotels-by-name:
|
||||
kind: postgres-sql
|
||||
source: my-pg-source
|
||||
description: Search for hotels based on name.
|
||||
parameters:
|
||||
- name: name
|
||||
type: string
|
||||
description: The name of the hotel.
|
||||
statement: SELECT * FROM hotels WHERE name ILIKE '%' || $1 || '%';
|
||||
```
|
||||
|
||||
For more details on configuring different types of tools, see the
|
||||
[Tools](../resources/tools/).
|
||||
|
||||
|
||||
### 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 sets for different agents or different applications.
|
||||
|
||||
```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.aload_toolset()
|
||||
|
||||
# This will only load the tools listed in 'my_second_toolset'
|
||||
my_second_toolset = await aclient.load_toolset("my_second_toolset")
|
||||
```
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
title: "Introduction"
|
||||
type: docs
|
||||
weight: 1
|
||||
description: An introduction to Toolbox
|
||||
---
|
||||
|
||||
# Introduction
|
||||
|
||||
This is a placeholder for the introduction.
|
||||
122
docs/en/getting-started/introduction/_index.md
Normal file
122
docs/en/getting-started/introduction/_index.md
Normal file
@@ -0,0 +1,122 @@
|
||||
---
|
||||
title: "Introduction"
|
||||
type: docs
|
||||
weight: 1
|
||||
description: An introduction to Gen AI Toolbox for Databases.
|
||||
---
|
||||
|
||||
Gen AI Toolbox for Databases is an open source server that makes it easier to
|
||||
build Gen AI tools for interacting with databases. It enables you to develop
|
||||
tools easier, faster, and more securely by handling the complexities such as
|
||||
connection pooling, authentication, and more.
|
||||
|
||||
## Why Toolbox?
|
||||
|
||||
Toolbox helps you build Gen AI tools that let your agents access data in your
|
||||
database. Toolbox provides:
|
||||
- **Simplified development**: Integrate tools to your agent in less than 10
|
||||
- lines of code, reuse tools between multiple agents or frameworks, and deploy
|
||||
new versions of tools more easily.
|
||||
- **Better performance**: Best practices such as connection pooling,
|
||||
authentication, and more.
|
||||
- **Enhanced security**: Integrated auth for more secure access to your data
|
||||
- **End-to-end observability**: Out of the box metrics and tracing with built-in
|
||||
support for OpenTelemetry.
|
||||
|
||||
|
||||
## General Architecture
|
||||
|
||||
Toolbox sits between your application's orchestration framework and your
|
||||
database, providing a control plane that is used to modify, distribute, or
|
||||
invoke tools. It simplifies the management of your tools by providing you with a
|
||||
centralized location to store and update tools, allowing you to share tools
|
||||
between agents and applications and update those tools without necessarily
|
||||
redeploying your application.
|
||||
|
||||

|
||||
|
||||
## Getting Started
|
||||
|
||||
### Installing the server
|
||||
For the latest version, check the [releases page][releases] and use the
|
||||
following instructions for your OS and CPU architecture.
|
||||
|
||||
[releases]: https://github.com/googleapis/genai-toolbox/releases
|
||||
|
||||
{{< tabpane text=true >}}
|
||||
{{% tab header="Binary" lang="en" %}}
|
||||
|
||||
To install Toolbox as a binary:
|
||||
|
||||
```sh
|
||||
# see releases page for other versions
|
||||
export VERSION=0.1.0
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v$VERSION/linux/amd64/toolbox
|
||||
chmod +x toolbox
|
||||
```
|
||||
|
||||
{{% /tab %}}
|
||||
{{% tab header="Container image" lang="en" %}}
|
||||
You can also install Toolbox as a container:
|
||||
|
||||
```sh
|
||||
# see releases page for other versions
|
||||
export VERSION=0.1.0
|
||||
docker pull us-central1-docker.pkg.dev/database-toolbox/toolbox/toolbox:$VERSION
|
||||
```
|
||||
|
||||
{{% /tab %}}
|
||||
{{% tab header="Compile from source" lang="en" %}}
|
||||
|
||||
To install from source, ensure you have the latest version of
|
||||
[Go installed](https://go.dev/doc/install), and then run the following command:
|
||||
|
||||
```sh
|
||||
go install github.com/googleapis/genai-toolbox@v0.1.0
|
||||
```
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tabpane >}}
|
||||
|
||||
### Running the server
|
||||
|
||||
[Configure](../configure.md) 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! To stop the server, send a
|
||||
terminate signal (`ctrl+c` on most platforms).
|
||||
|
||||
For more detailed documentation on deploying to different environments, check
|
||||
out the resources in the [How-to section](../../how-to/_index.md)
|
||||
|
||||
### Integrating your application
|
||||
|
||||
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:
|
||||
|
||||
{{< tabpane text=true >}}
|
||||
{{% tab header="LangChain" lang="en" %}}
|
||||
|
||||
Once you've installed the [Toolbox LangChain
|
||||
SDK](https://github.com/googleapis/genai-toolbox-langchain-python), you can load
|
||||
tools:
|
||||
|
||||
{{< highlight python >}}
|
||||
from toolbox_langchain import ToolboxClient
|
||||
|
||||
# update the url to point to your server
|
||||
client = ToolboxClient("http://127.0.0.1:5000")
|
||||
|
||||
# these tools can be passed to your application!
|
||||
tools = await client.aload_toolset()
|
||||
{{< /highlight >}}
|
||||
|
||||
For more detailed instructions on using the Toolbox LangChain SDK, see the
|
||||
[project's README](https://github.com/googleapis/genai-toolbox-langchain-python/blob/main/README.md).
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tabpane >}}
|
||||
BIN
docs/en/getting-started/introduction/architecture.png
Normal file
BIN
docs/en/getting-started/introduction/architecture.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
@@ -121,7 +121,7 @@ In this section, we will download Toolbox, configure our tools in a
|
||||
{{< /notice >}}
|
||||
```bash
|
||||
export OS="linux/amd64" # one of linux/amd64, darwin/arm64, darwin/amd64, or windows/amd64
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.0.5/$OS/toolbox
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.1.0/$OS/toolbox
|
||||
```
|
||||
|
||||
1. Make the binary executable:
|
||||
|
||||
Reference in New Issue
Block a user