@covalenthq/ai-agent-sdk
Advanced tools
Comparing version 0.1.1 to 0.2.0
@@ -1,13 +0,5 @@ | ||
import { OnchainService } from "./services/OnchainService"; | ||
import type { OnchainProvider } from "./services/OnchainService"; | ||
export type { ChainName, Currency, OnchainProvider, } from "./services/OnchainService"; | ||
export declare class Agent { | ||
OnchainService: OnchainService; | ||
constructor(options: { | ||
onchain: { | ||
key: string; | ||
provider: OnchainProvider; | ||
}; | ||
}); | ||
} | ||
export * from "./core/agent"; | ||
export * from "./core/llm"; | ||
export * from "./core/tools"; | ||
export * from "./core/zee"; | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Agent = void 0; | ||
const OnchainService_1 = require("./services/OnchainService"); | ||
class Agent { | ||
OnchainService; | ||
constructor(options) { | ||
this.OnchainService = new OnchainService_1.OnchainService(options); | ||
} | ||
} | ||
exports.Agent = Agent; | ||
__exportStar(require("./core/agent"), exports); | ||
__exportStar(require("./core/llm"), exports); | ||
__exportStar(require("./core/tools"), exports); | ||
__exportStar(require("./core/zee"), exports); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@covalenthq/ai-agent-sdk", | ||
"version": "0.1.1", | ||
"description": "Covalent Agent SDK. Build cool AI agents for the blockchain", | ||
"main": "dist", | ||
"types": "./dist/index.d.ts", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"build": "tsc", | ||
"clean": "rm -rf dist", | ||
"prepublishOnly": "npm run clean && npm run build", | ||
"lint": "eslint .", | ||
"pretty": "prettier . --write" | ||
}, | ||
"author": { | ||
"name": "covalenthq", | ||
"url": "https://covalenthq.com" | ||
}, | ||
"license": "MIT", | ||
"dependencies": { | ||
"@covalenthq/client-sdk": "^2.2.1", | ||
"zod": "^3.23.8" | ||
}, | ||
"devDependencies": { | ||
"@trivago/prettier-plugin-sort-imports": "^5.2.0", | ||
"@types/node": "^22.10.1", | ||
"@typescript-eslint/eslint-plugin": "^8.18.0", | ||
"@typescript-eslint/parser": "^8.18.0", | ||
"eslint": "^9.16.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-prettier": "^5.2.1", | ||
"prettier-plugin-tailwindcss": "^0.6.9", | ||
"typescript": "^5.7.2" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"files": [ | ||
"/dist" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/covalenthq/ai-agent-sdk.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/covalenthq/ai-agent-sdk/issues" | ||
}, | ||
"homepage": "https://github.com/covalenthq/ai-agent-sdk#readme", | ||
"keywords": [ | ||
"frontend", | ||
"blockchain", | ||
"cryptocurrency", | ||
"web3", | ||
"ai", | ||
"ai-agent", | ||
"blockchain-data" | ||
], | ||
"exports": { | ||
".": { | ||
"import": "./dist/index.js", | ||
"default": "./dist/index.js", | ||
"types": "./dist/index.d.ts" | ||
} | ||
} | ||
} | ||
"name": "@covalenthq/ai-agent-sdk", | ||
"version": "0.2.0", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"dist", | ||
"README.md" | ||
], | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"license": "MIT", | ||
"dependencies": { | ||
"commander": "^13.1.0", | ||
"dotenv": "^16.4.7", | ||
"openai": "^4.79.1", | ||
"pino": "^9.6.0", | ||
"pino-pretty": "^13.0.0", | ||
"typescript": "^5.7.3", | ||
"zod": "^3.24.1", | ||
"zod-to-json-schema": "^3.24.1" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^22.10.7", | ||
"node-fetch": "^3.3.2", | ||
"vitest": "^3.0.2" | ||
}, | ||
"scripts": { | ||
"test": "vitest", | ||
"build": "tsc", | ||
"clean": "rm -rf dist", | ||
"lint": "eslint .", | ||
"pretty": "prettier . --write" | ||
} | ||
} |
@@ -5,2 +5,4 @@ <div align="center"> | ||
[](https://www.npmjs.com/package/@covalenthq/ai-agent-sdk) | ||
[](https://www.npmjs.com/package/@covalenthq/ai-agent-sdk) | ||
[](https://github.com/covalenthq/ai-agent-sdk/blob/main/LICENSE) | ||
@@ -16,44 +18,49 @@ [](https://github.com/covalenthq/ai-agent-sdk/commits/master) | ||
<p>A TypeScript SDK to build, deploy and interact with AI agents. Create intelligent, context-aware agents with unprecedented ease and functionality.</p> | ||
<p>Build autonomous AI agents for the Zero-Employee Enterprise (ZEE). Create intelligent, context-aware agents with unprecedented ease and functionality. The Agent SDK supports single model inference calls to multi-agent systems that use tools. The SDK provides primitives that are designed to be easily composable, extendable and flexible for advanced use cases.</p> | ||
## Features | ||
Currently available: | ||
* Read onchain data using the [GoldRush API](https://goldrush.dev/) | ||
- LLMs - a unified interface for all LLMs | ||
- Agents - a single model with a system prompt and a set of tools | ||
- Tools - extend the capabilities of agents with external tools | ||
- ZEE Workflows - compose agents to solve complex problems | ||
Roadmap: | ||
* Access offchain and private data | ||
* Train and fine-tune Large/Small Language Models | ||
* Identity services to securely store your agent's private keys | ||
* Communication services to post to social media | ||
* Memory Bank to provide a trustless, verifiable persistent store for critical states, outputs and decisions | ||
## Using the SDK (Quick Start) | ||
## Using the SDK | ||
### 1. Start with a template | ||
### 1. Setup and installation | ||
> npx create-zee-app | ||
> yarn install | ||
This will create a new project with a basic setup. | ||
or | ||
### 2. Modify the agent | ||
> npm install | ||
```js | ||
const agent1 = new Agent({ | ||
name: "Agent1", | ||
model: { | ||
provider: "OPEN_AI", | ||
name: "gpt-4o-mini", | ||
}, | ||
description: "A helpful AI assistant that can engage in conversation.", | ||
}); | ||
``` | ||
### 2. Initialization | ||
### 3. Modify the ZEE Workflow | ||
```js | ||
import { Agent, BaseChain, GoldRushAPI } from "@covalenthq/ai-agent-sdk"; | ||
new Agent({ | ||
onchain: { | ||
key: "XXX", | ||
provider: GoldRushAPI | ||
} | ||
}) | ||
const zee = new ZeeWorkflow({ | ||
description: "A workflow of agents that do stuff together", | ||
output: "Just bunch of stuff", | ||
agents: { agent1, agent2 }, | ||
}); | ||
``` | ||
### 3. Retrieve Token Balances for Wallet on Base Chain | ||
### 4. Run the Zee Workflow | ||
```js | ||
const balances = agent.onchain.getTokenBalancesForWalletAddress(BaseChain, "demo.eth"); | ||
(async function main() { | ||
const result = await zee.run(); | ||
console.log(result); | ||
})(); | ||
``` | ||
@@ -60,0 +67,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
70364
3
43
983
78
1
8
2
4
+ Addedcommander@^13.1.0
+ Addeddotenv@^16.4.7
+ Addedopenai@^4.79.1
+ Addedpino@^9.6.0
+ Addedpino-pretty@^13.0.0
+ Addedtypescript@^5.7.3
+ Addedzod-to-json-schema@^3.24.1
+ Added@types/node@18.19.76(transitive)
+ Added@types/node-fetch@2.6.12(transitive)
+ Addedabort-controller@3.0.0(transitive)
+ Addedagentkeepalive@4.6.0(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedatomic-sleep@1.0.0(transitive)
+ Addedcall-bind-apply-helpers@1.0.2(transitive)
+ Addedcolorette@2.0.20(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addedcommander@13.1.0(transitive)
+ Addeddateformat@4.6.3(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addeddotenv@16.4.7(transitive)
+ Addeddunder-proto@1.0.1(transitive)
+ Addedend-of-stream@1.4.4(transitive)
+ Addedes-define-property@1.0.1(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedes-object-atoms@1.1.1(transitive)
+ Addedes-set-tostringtag@2.1.0(transitive)
+ Addedevent-target-shim@5.0.1(transitive)
+ Addedfast-copy@3.0.2(transitive)
+ Addedfast-redact@3.5.0(transitive)
+ Addedfast-safe-stringify@2.1.1(transitive)
+ Addedform-data@4.0.2(transitive)
+ Addedform-data-encoder@1.7.2(transitive)
+ Addedformdata-node@4.4.1(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.2.7(transitive)
+ Addedget-proto@1.0.1(transitive)
+ Addedgopd@1.2.0(transitive)
+ Addedhas-symbols@1.1.0(transitive)
+ Addedhas-tostringtag@1.0.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedhelp-me@5.0.0(transitive)
+ Addedhumanize-ms@1.2.1(transitive)
+ Addedjoycon@3.1.1(transitive)
+ Addedmath-intrinsics@1.1.0(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedms@2.1.3(transitive)
+ Addednode-domexception@1.0.0(transitive)
+ Addednode-fetch@2.7.0(transitive)
+ Addedon-exit-leak-free@2.1.2(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedopenai@4.85.2(transitive)
+ Addedpino@9.6.0(transitive)
+ Addedpino-abstract-transport@2.0.0(transitive)
+ Addedpino-pretty@13.0.0(transitive)
+ Addedpino-std-serializers@7.0.0(transitive)
+ Addedprocess-warning@4.0.1(transitive)
+ Addedpump@3.0.2(transitive)
+ Addedquick-format-unescaped@4.0.4(transitive)
+ Addedreal-require@0.2.0(transitive)
+ Addedsafe-stable-stringify@2.5.0(transitive)
+ Addedsecure-json-parse@2.7.0(transitive)
+ Addedsonic-boom@4.2.0(transitive)
+ Addedsplit2@4.2.0(transitive)
+ Addedstrip-json-comments@3.1.1(transitive)
+ Addedthread-stream@3.1.0(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedtypescript@5.7.3(transitive)
+ Addedundici-types@5.26.5(transitive)
+ Addedweb-streams-polyfill@4.0.0-beta.3(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)
+ Addedwrappy@1.0.2(transitive)
+ Addedzod-to-json-schema@3.24.1(transitive)
- Removed@covalenthq/client-sdk@^2.2.1
- Removed@covalenthq/client-sdk@2.2.3(transitive)
- Removedbig.js@6.2.2(transitive)
Updatedzod@^3.24.1