https://github.com/kaikaikaifang/divine-agent
Creating Your Divine Agent π
https://github.com/kaikaikaifang/divine-agent
agent agents ai monorepo observability sdk-python
Last synced: 4 months ago
JSON representation
Creating Your Divine Agent π
- Host: GitHub
- URL: https://github.com/kaikaikaifang/divine-agent
- Owner: Kaikaikaifang
- License: mit
- Created: 2025-01-15T10:29:32.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-05-26T15:52:11.000Z (5 months ago)
- Last Synced: 2025-06-27T11:07:36.978Z (4 months ago)
- Topics: agent, agents, ai, monorepo, observability, sdk-python
- Language: TypeScript
- Homepage: https://docs.divine-agent.com
- Size: 3.69 MB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: docs/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: docs/CODE_OF_CONDUCT.md
- Security: docs/SECURITY.md
Awesome Lists containing this project
README
Divine Agent β Fully open-source agent observability. Simple. Clear.
δΈζ / English
divine-agent is an observability tool for LLM-based agents, offering tracing, evaluation, and usage statistics.
---
> [!IMPORTANT]
> **divine-agent is currently experimental** and may undergo significant changes at any time. This project is in active development, which means APIs and features might change without prior notice.
>
> We do not recommend using divine-agent in production environments until a stable release is available.
## Install
Requires Python 3.11+
```shell
pip install divi
```
## Trace
1. Get API Key from [Web](https://www.divine-agent.com/dashboard/api-keys).
2. Create a `.env` file and add the following line:
```env
DIVI_API_KEY=your_api_key
```
3. Run the following code:
```python
from divi import obs_openai, observable
from dotenv import load_dotenv
from openai import OpenAI
load_dotenv()
class Pirate:
def __init__(self):
self.client = obs_openai(
OpenAI(),
name="Pirate",
)
@observable(name="Talk with pirate")
def talk(self, message: str):
"""Talk like a pirate."""
res = self.client.chat.completions.create(
model="gpt-4o",
messages=[
{"role": "developer", "content": "Talk like a pirate."},
{
"role": "user",
"content": message,
},
],
)
return res.choices[0].message.content
pirate = Pirate()
pirate.talk("How do I check if a Python object is an instance of a class?")
```
