@usefarol/sdk 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @usefarol/sdk
|
|
2
2
|
|
|
3
3
|
**AI agent observability for Node.js** — wrap your agent entrypoints with a single `trace()` helper to send runs, token usage, cost, and spans to [Farol](https://usefarol.dev).
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install
|
|
8
|
+
npm install @usefarol/sdk
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
Requires **Node.js 18+** (global `fetch`).
|
|
@@ -18,7 +18,7 @@ Create or copy your API key from the Farol app: **[usefarol.dev](https://usefaro
|
|
|
18
18
|
|
|
19
19
|
```typescript
|
|
20
20
|
import Anthropic from "@anthropic-ai/sdk";
|
|
21
|
-
import { trace } from "
|
|
21
|
+
import { trace } from "@usefarol/sdk";
|
|
22
22
|
|
|
23
23
|
const client = new Anthropic();
|
|
24
24
|
|
|
@@ -60,7 +60,7 @@ await myAgent("Summarize this week’s metrics.");
|
|
|
60
60
|
|
|
61
61
|
```typescript
|
|
62
62
|
import OpenAI from "openai";
|
|
63
|
-
import { trace } from "
|
|
63
|
+
import { trace } from "@usefarol/sdk";
|
|
64
64
|
|
|
65
65
|
const openai = new OpenAI();
|
|
66
66
|
|
|
@@ -103,7 +103,7 @@ await myAgent("Hello!");
|
|
|
103
103
|
Use `run.startSpan(name, { type, metadata })` for tools, retrieval, or extra LLM steps. Call `span.end()` when the step finishes, or `span.end(error)` on failure. Unclosed spans are auto-ended when the run completes.
|
|
104
104
|
|
|
105
105
|
```typescript
|
|
106
|
-
import { trace } from "
|
|
106
|
+
import { trace } from "@usefarol/sdk";
|
|
107
107
|
|
|
108
108
|
const pipeline = trace(
|
|
109
109
|
async (run, query: string) => {
|