-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
156 additions
and
60 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
title: Getting Support | ||
--- | ||
|
||
We offer multiple channels to get support for Agenta. | ||
|
||
<CardGroup cols={2}> | ||
<Card | ||
title="Join our Slack" | ||
icon="slack" | ||
href="https://join.slack.com/t/agenta-hq/shared_invite/zt-1zsafop5i-Y7~ZySbhRZvKVPV5DO_7IA"> | ||
Use the #support channel on Slack for any inquiries or assistance with Agenta. Paying customers have a private Slack channel for support. | ||
</Card> | ||
<Card | ||
title="Schedule an onboarding call" | ||
icon="phone" | ||
href="https://cal.com/mahmoud-mabrouk-ogzgey/demo"> | ||
Book a call with a founder for one-on-one guidance on using Agenta. | ||
</Card> | ||
<Card | ||
title="Create an issue in Github" | ||
icon="github" | ||
href="https://github.com/agenta-ai/agenta"> | ||
File a bug report or start a discussion in our Github repository. | ||
</Card> | ||
<Card | ||
title="Chat Widget" | ||
icon="intercom"> | ||
Use the chat widget on the bottom right of the screen in the documentation or in the cloud version to ask questions or report issues. | ||
</Card> | ||
</CardGroup> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
--- | ||
title: Overview | ||
--- | ||
|
||
What isn't measured cannot be improved. If you want to enhance your application's quality, cost, and performance, you first need to monitor it. Agenta offers a comprehensive monitoring system that lets you track application performance metrics over time. | ||
|
||
For every request made through your LLM application, Agenta captures the input variables, configuration (like prompt templates), outputs, and crucial metadata such as cost, latency, and model name. | ||
|
||
Agenta also provides tools to visualize and analyze this data on a dashboard. You can view request count, average latency, operational costs, and more. Additionally, you can filter requests to identify problematic ones and add them to your test sets. | ||
|
||
## Setting up tracing | ||
|
||
### Applications created from the UI | ||
When creating an application from the UI, tracing is enabled by default. There's no need for setup; simply go to the observability view to see all the requests in the dashboard and in the traces view. | ||
|
||
### Application created from code | ||
If you're creating your own template from code or hosting your own code base and want to use Agenta for prompt management and tracing, you'll need to set up tracing yourself. | ||
<Steps> | ||
<Step title="First Step"> | ||
These are instructions or content that only pertain to the first step. | ||
</Step> | ||
<Step title="Second Step"> | ||
These are instructions or content that only pertain to the second step. | ||
</Step> | ||
<Step title="Third Step"> | ||
These are instructions or content that only pertain to the third step. | ||
</Step> | ||
</Steps> | ||
|
||
Here's a quick guide on how to do it. You can find more details in the rest of the documentation. | ||
|
||
<Steps> | ||
<Step title="Install the Agenta Python SDK in your project"> | ||
Install our Python SDK using pip: | ||
```bash | ||
pip install agenta | ||
``` | ||
or add it to your `requirements.txt`/`pyproject.toml`.. file. | ||
</Step> | ||
<Step title="Set the agenta environment variables"> | ||
```python | ||
import os | ||
os.environment["AGENTA_API_KEY"] = "your_api_key" | ||
os.envivonment["AGENTA_APP_ID"] = "your_app_id" | ||
os.environment["AGENTA_HOST"] = "https://cloud.agenta.ai" | ||
``` | ||
You can find your API key in the configuration menu. As for the app ID, you can find it in the deployment menu. | ||
</Step> | ||
<Step title="Add the tracing decorators"> | ||
Decorate your functions with the `@ag.span` decorator to trace the function and the `@ag.trace` decorator to trace the entire application. Note here that we provide integrations for many client such as OpenAI. Here's an example: | ||
```python | ||
import agenta as ag | ||
import openai | ||
|
||
client = openai.Client() | ||
ag.instrument_openai(client) | ||
|
||
@ag.span | ||
def myllmcall(country:str): | ||
prompt = f"What is the capital of {country}" | ||
response = client.chat.completions.create( | ||
model='gpt-4', | ||
messages=[ | ||
{'role': 'user', 'content': prompt}, | ||
], | ||
) | ||
return response.choices[0].text | ||
|
||
#@ag.entrypoint # in case you are hosting the app in agenta | ||
@ag.trace | ||
def generate(country:str): | ||
return myllmcall(country) | ||
``` | ||
</Step> | ||
</Steps> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.