You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2.`graph_based_conversational_agent`: LLM-based agent with classification
50
-
3.`extraction_agent`: Currently WIP. [Feel free to contribute and open a PR](https://github.com/bolna-ai/bolna/compare)
51
-
52
-
53
45
## Local setup
54
-
A basic local setup uses Twilio for telephony. We have dockerized the setup in `local_setup/`. One will need to populate an environment `.env` file from `.env.sample`.
46
+
A basic local setup uses `Twilio` for telephony. We have dockerized the setup in `local_setup/`. One will need to populate an environment `.env` file from `.env.sample`.
55
47
56
48
The setup consists of four containers:
57
49
58
50
1. Twilio web server: for initiating the calls one will need to set up a [Twilio account]([https://www.twilio.com/docs/usage/tutorials/how-to-use-your-free-trial-account](https://www.twilio.com/docs/messaging/guides/how-to-use-your-free-trial-account))
59
51
2. Bolna server: for creating and handling agents
60
52
3.`ngrok`: for tunneling. One will need to add the `authtoken` to `ngrok-config.yml`
61
-
4.`redis`: for persisting agents & users contextual data
53
+
4.`redis`: for persisting agents & prompt data
62
54
63
-
Running `docker-compose up --build` will use the `.env` as the environment file and the `agent_data` to start all containers.
55
+
Running `docker-compose up --build` will use the `.env` as the environment file.
64
56
65
57
Once the docker containers are up, you can now start to create your agents and instruct them to initiate calls.
66
58
67
59
68
-
## Agent Examples
69
-
The repo contains examples as a reference for creating for application agents in the `agent_data` directory:
70
-
71
-
1.`airbnb_job`: A `streaming``conversation` agent where the agent screens potential candidates for a job at AirBnB
72
-
2.`sorting_hat`: A `preprocessed``conversation` agent which acts as a Sorting Hat for Hogwarts
73
-
3.`yc_screening`: A `streaming``conversation` agent which acts as a Y Combinator partner asking questions around the idea/startup
74
-
4.`indian_elections_vernacular`: A `streaming``conversation` agent which asks people for their outlook towards Indian elections in Hindi language
75
-
5.`sample_agent`: A boilerplate sample agent to start building your own agent!
76
-
77
-
78
-
## Anatomy of an agent
79
-
All agents are read from the `agent_data` directory. We have provided some samples for getting started. There's a dashboard coming up [still in WIP] which will easily facilitate towards creating agents.
80
-
81
-
General structure of the agents:
82
-
83
-
your-awesome-agent-name
84
-
├── conversation_details.json # Compiled prompt
85
-
└── users.json # List of users that the call would be made to
86
-
87
-
| Agent type |`streaming` agent |`preprocessed` agent |
| Introduction | A streaming agent will work like a free-flow conversation following the prompt | Apart from following the prompt, a preprocessed agent will have all responses <br/>from the agent preprocessed in the form of audio which will be streamed <br/>as per the classification of human's response |
90
-
| Prompt | Required (defined in `conversation_details.json`) | Required (defined in `conversation_details.json`) |
91
-
| Preprocessing | Not required | Required (using `scripts/preprocessed.py`) |
92
60
61
+
## Creating your agent and invoking calls
62
+
Once you have the above docker setup and running, you can create agents and initiate calls.
63
+
1. Refer to the official [`Agent` API](https://docs.bolna.dev/api-reference/agent/create) to create an agent
64
+
2. Initiate a call via API similar to [`Call` API](https://docs.bolna.dev/api-reference/calls/make) to receive a call
93
65
94
-
> [!note]
95
-
> Currently, the `users.json` has the following user attributes which gets substituted in the prompt to make it customized for the call. More to be added soon!
96
-
> - first_name
97
-
> - last_name
98
-
> - honorific
99
-
>
100
-
>
101
-
>
102
-
> For instance, in the case of a preprocessed agent, the initial intro could be customized to have the user's name.
103
-
>
104
-
> Even the prompt could be customized to fill in user contextual details from users.json. For example, [{first_name} defined in prompt](https://github.com/bolna-ai/bolna/blob/master/agent_data/airbnb_job/conversation_details.json#L3) and [prompt intro](https://github.com/bolna-ai/bolna/blob/master/agent_data/sorting_hat/conversation_details.json#L10)
105
66
67
+
## Using your own providers
68
+
You can populate the `.env` file to use your own keys for providers.
69
+
<details>
106
70
107
-
## Setting up your agent
108
-
1. Create a directory under `agent_data` directory with the name for your agent
109
-
2. Create your prompt and save in a file called `conversation_details.json` using the example provided
110
-
3. Optional: In case if you are creating a `preprocessed` agent, generate the audio data used by using the script `scripts/preprocess.py`
71
+
<summary>LLM Providers</summary>
111
72
73
+
#### You can add a header
112
74
113
-
## Creating your agent and invoking calls
114
-
1. At this point, the docker containers should be up and running
115
-
2. Your agent prompt should be defined in the `agent_data/` directory with `conversation_details.json` with the user list in `users.json`
116
-
3. Create your agent using the [Bolna Create Agent API](https://docs.bolna.dev/api-reference/endpoint/create). An agent will get created with an `agent_id`
117
-
4. Instruct the agent to initiate call to users via `scripts/initiate_agent_call.py <agent_name> <agent_id>`
75
+
```ruby
76
+
puts"Hello World"
77
+
```
78
+
</details>
118
79
119
80
120
81
## Open-source v/s Paid
121
-
Though the repository is completely open source, you can connect with us if interested in managed offerings or more customized solutions.
82
+
Though the repository is completely open source, you can connect with us if interested in managed hosted offerings or more customized solutions.
122
83
123
84
<ahref="https://calendly.com/bolna/30min"><imgalt="Schedule a meeting"src="https://cdn.cookielaw.org/logos/122ecfc3-4694-42f1-863f-2db42d1b1e68/0bcbbcf4-9b83-4684-ba59-bc913c0d5905/c21bea90-f4f1-43d1-8118-8938bbb27a9d/logo.png" /></a>
0 commit comments