diff --git a/apps/agents/src/graph/core.py b/apps/agents/src/graph/core.py index f19c14ae..f3992054 100644 --- a/apps/agents/src/graph/core.py +++ b/apps/agents/src/graph/core.py @@ -228,6 +228,13 @@ def check_request_validity(messages, agent_configs, tool_configs, prompt_configs missing_keys = [key for key in ["name", "instructions", "tools", "model"] if key not in agent_config] error_msg = f"Invalid agent config - missing keys: {missing_keys}" error_type = ErrorType.FATAL.value + + # All tool configs should have: name, parameters --> Fatal + for tool_config in tool_configs: + if not all(key in tool_config for key in ["name", "parameters"]): + missing_keys = [key for key in ["name", "parameters"] if key not in tool_config] + error_msg = f"Invalid tool config - missing keys: {missing_keys}" + error_type = ErrorType.FATAL.value # Check for cycles in the agent config graph. Raise error if cycle is found, along with the agents involved in the cycle. def find_cycles(agent_name, agent_configs, visited=None, path=None): diff --git a/apps/docs/docs/examples.md b/apps/docs/docs/examples.md deleted file mode 100644 index fcc39fe6..00000000 --- a/apps/docs/docs/examples.md +++ /dev/null @@ -1 +0,0 @@ -Coming soon. \ No newline at end of file diff --git a/apps/docs/docs/index.md b/apps/docs/docs/index.md index 880a8405..52393356 100644 --- a/apps/docs/docs/index.md +++ b/apps/docs/docs/index.md @@ -26,8 +26,9 @@ RowBoat Studio lets you create human-quality customer support assistants in minu | Copilot | AI-powered concierge that creates and
updates agents and tools on your behalf |• Context-aware of all components including playground
• Improves agents based on conversations and feedback
• Understands your requests in plain language| | Simulator | Simulates real-world user interactions
with your assistant |• Maintain and run a test-bench of different scenarios
• Mock tool responses for quick testing
• Reproduce your end-user's experience comprehensively| -### RowBoat SDK -RowBoat SDK is a simple SDK to interface with the assistant created on RowBoat Studio. It offers both *stateful* and *stateless (OpenAI-style)* implementations. +### RowBoat Chat API & SDK +- RowBoat Chat API is a stateless HTTP API to interface with the assistant created on RowBoat Studio. You can use the API to drive end-user facing conversations in your app or website. +- RowBoat Chat SDK is a simple SDK (currently available in Python) which wraps the HTTP API under the hood. It offers both stateful and stateless (OpenAI-style) implementations. ### Steps **RowBoat Studio:** diff --git a/apps/docs/docs/installation.md b/apps/docs/docs/installation.md index 7533d304..0c0439bc 100644 --- a/apps/docs/docs/installation.md +++ b/apps/docs/docs/installation.md @@ -1 +1,143 @@ -Please see the README of RowBoat's Github repo: [@rowboatlabs/rowboat](https://github.com/rowboatlabs/rowboat/) \ No newline at end of file +# Installation + +- This is the developers guide to self-hosting the open-source version of RowBoat. If you are looking to use our managed offering, getting in touch at [founders@rowboatlabs.com](mailto:founders@rowboatlabs.com). +- Please see our [Introduction](/) page before referring to this guide. +- For direct installation steps, please head to the README of RowBoat's Github repo: [@rowboatlabs/rowboat](https://github.com/rowboatlabs/rowboat/). This page provides more context about the installation process and the different components involved. + +## Overview + +RowBoat's codebase has three main components: + +| Component | Description | +|--------------|---------------| +| **Agents** | Python framework responsible for carrying out multi-agent conversations | +| **Copilot** | Python framework powering the copilot in RowBoat Studio | +| **RowBoat** | Frontend and backend services to power RowBoat Studio and Chat APIs | + +These components are structured as separate services, each containerized with Docker. Running `docker-compose up --build` enables you to use the Studio in your browser, as well as stands up the APIs and SDK. + +## Prerequisites +All of these prerequistes have open-source or free versions. + +| Prerequisite | Description | +|--------------|---------------| +| **Docker** | Bundles and builds all services | +| **OpenAI API Key** | Agents and Copilot services are powered by OpenAI LLMs | +| **MongoDB** | Stores workflow versions, chats and RAG embeddings | +| **Auth0 Account** | Handles user authentication and identity management for Studio | + +Refer to our [Github Readme for Prerequisites](https://github.com/rowboatlabs/rowboat/?tab=readme-ov-file#prerequisites) to set up prerequisites. + +## Setting up + +Refer to our [Github Readme for Local Development](https://github.com/rowboatlabs/rowboat/?tab=readme-ov-file#local-development-setup) to set up Studio, Chat API and SDK via `docker-compose`. + +### Testing Studio + +1. Once you are set up, you should be able to login to the Studio (default local URL: [http://localhost:3000](http://localhost:8000)) via Auth0's login options (Gmail, Github etc.) +2. Once in Studio, create a new blank project or use one of the example templates +3. Ensure that the correct agent is set as the "start agent" +4. Test out a chat in the playground to verify the agents' behavior +5. Ask copilot to make minor modifications to one of the agents and apply the changes +6. Test out another chat in the playground to verify the changes + +### Testing the Chat API + +You can use the API directly at [http://localhost:3000/api/v1/](http://localhost:3000/api/v1/) +- Project ID is available in the URL of the project page +- API Key can be generated from the project config page at `/projects//config` + +Below is an example request and response. Modify the user message in the request, based on your example project. + +**Request:** + +```bash +curl --location 'http://localhost:3000/api/v1//chat' \ +--header 'Content-Type: application/json' \ +--header 'Authorization: Bearer ' \ +--data '{ + "messages": [ + { + "role": "user", + "content": "tell me the weather in london in metric units" + } + ] +}' +``` +**Response:** +```json +{ + "messages": [ + { + "role": "assistant", + "tool_calls": [ + { + "function": { + "arguments": "{\"location\":\"London\",\"units\":\"metric\"}", + "name": "weather_lookup_tool" + }, + "id": "call_r6XKuVxmGRogofkyFZIacdL0", + "type": "function" + } + ], + "agenticSender": "Example Agent", + "agenticResponseType": "internal" + } + ], + "state": { + // .. state data + } +} +``` + +### Testing the Python Chat SDK + +```bash +pip install rowboat +``` + +Modify the user message in `messages`, based on your example project. + +```python +from rowboat import Client + +client = Client( + host="http://localhost:3000", + project_id="", + api_key="" # Generate this from /projects//config +) + +# Simple chat interaction +messages = [{"role": "user", "content": "Tell me the weather in London"}] +response_messages, state = client.chat(messages=messages) +``` + +For more about the SDK, see our [Github Readme for Python SDK](https://github.com/rowboatlabs/rowboat/tree/main/apps/python-sdk). + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/docs/docs/license.md b/apps/docs/docs/license.md index 261eeb9e..7761e551 100644 --- a/apps/docs/docs/license.md +++ b/apps/docs/docs/license.md @@ -1,3 +1,7 @@ +RowBoat is available under the [Apache 2.0 License](https://github.com/rowboatlabs/rowboat/blob/main/LICENSE): + +---- + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ diff --git a/apps/docs/docs/quickstart.md b/apps/docs/docs/quickstart.md new file mode 100644 index 00000000..3fd36784 --- /dev/null +++ b/apps/docs/docs/quickstart.md @@ -0,0 +1,7 @@ +# Quick Start +Follow the [installation steps](/installation/) to set up RowBoat Studio, API and SDK. + +## Building your first assistant + + + diff --git a/apps/docs/mkdocs.yml b/apps/docs/mkdocs.yml index 6e0c6044..02bdb523 100644 --- a/apps/docs/mkdocs.yml +++ b/apps/docs/mkdocs.yml @@ -1,7 +1,7 @@ site_name: RowBoat docs site_url: https://docs.rowboatlabs.com theme: - name: readthedocs + name: material favicon: img/favicon.ico nav: - Overview: @@ -9,5 +9,4 @@ nav: - Open Source License: license.md - Getting started: - Installation: installation.md - - Examples: examples.md - \ No newline at end of file + - Quickstart: quickstart.md \ No newline at end of file