thinkwell 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 +14 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,24 +7,30 @@ A TypeScript library for easy scripting of AI agents. Thinkwell provides a fluen
|
|
|
7
7
|
## Quick Start
|
|
8
8
|
|
|
9
9
|
```typescript
|
|
10
|
-
import { Agent
|
|
10
|
+
import { Agent } from "thinkwell";
|
|
11
|
+
import { GreetingSchema } from "./schemas.js";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* A greeting response.
|
|
15
|
+
* @JSONSchema
|
|
16
|
+
*/
|
|
17
|
+
export interface Greeting {
|
|
18
|
+
/** The greeting message */
|
|
19
|
+
message: string;
|
|
20
|
+
}
|
|
11
21
|
|
|
12
22
|
const agent = await Agent.connect("npx -y @zed-industries/claude-code-acp");
|
|
13
23
|
|
|
14
24
|
const result = await agent
|
|
15
|
-
.think(
|
|
16
|
-
type: "object",
|
|
17
|
-
properties: { greeting: { type: "string" } },
|
|
18
|
-
required: ["greeting"]
|
|
19
|
-
}))
|
|
25
|
+
.think(GreetingSchema)
|
|
20
26
|
.text("Say hello!")
|
|
21
27
|
.run();
|
|
22
28
|
|
|
23
|
-
console.log(result.
|
|
29
|
+
console.log(result.message);
|
|
24
30
|
|
|
25
31
|
agent.close();
|
|
26
32
|
```
|
|
27
33
|
|
|
28
|
-
|
|
34
|
+
## License
|
|
29
35
|
|
|
30
36
|
MIT
|