@agentionai/agents 0.3.0-beta
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 +517 -0
- package/dist/agents/Agent.d.ts +29 -0
- package/dist/agents/Agent.js +28 -0
- package/dist/agents/AgentConfig.d.ts +118 -0
- package/dist/agents/AgentConfig.js +3 -0
- package/dist/agents/AgentEvent.d.ts +18 -0
- package/dist/agents/AgentEvent.js +26 -0
- package/dist/agents/BaseAgent.d.ts +82 -0
- package/dist/agents/BaseAgent.js +121 -0
- package/dist/agents/anthropic/ClaudeAgent.d.ts +46 -0
- package/dist/agents/anthropic/ClaudeAgent.js +262 -0
- package/dist/agents/errors/AgentError.d.ts +47 -0
- package/dist/agents/errors/AgentError.js +74 -0
- package/dist/agents/google/GeminiAgent.d.ts +63 -0
- package/dist/agents/google/GeminiAgent.js +395 -0
- package/dist/agents/mistral/MistralAgent.d.ts +47 -0
- package/dist/agents/mistral/MistralAgent.js +313 -0
- package/dist/agents/model-types.d.ts +30 -0
- package/dist/agents/model-types.js +8 -0
- package/dist/agents/openai/OpenAiAgent.d.ts +48 -0
- package/dist/agents/openai/OpenAiAgent.js +338 -0
- package/dist/chunkers/Chunker.d.ts +53 -0
- package/dist/chunkers/Chunker.js +174 -0
- package/dist/chunkers/RecursiveChunker.d.ts +52 -0
- package/dist/chunkers/RecursiveChunker.js +166 -0
- package/dist/chunkers/TextChunker.d.ts +27 -0
- package/dist/chunkers/TextChunker.js +50 -0
- package/dist/chunkers/TokenChunker.d.ts +60 -0
- package/dist/chunkers/TokenChunker.js +176 -0
- package/dist/chunkers/index.d.ts +6 -0
- package/dist/chunkers/index.js +14 -0
- package/dist/chunkers/types.d.ts +95 -0
- package/dist/chunkers/types.js +3 -0
- package/dist/graph/AgentGraph.d.ts +99 -0
- package/dist/graph/AgentGraph.js +115 -0
- package/dist/graph/BaseExecutor.d.ts +86 -0
- package/dist/graph/BaseExecutor.js +61 -0
- package/dist/graph/GraphMetrics.d.ts +143 -0
- package/dist/graph/GraphMetrics.js +264 -0
- package/dist/graph/MapExecutor.d.ts +39 -0
- package/dist/graph/MapExecutor.js +123 -0
- package/dist/graph/ParallelExecutor.d.ts +51 -0
- package/dist/graph/ParallelExecutor.js +103 -0
- package/dist/graph/Pipeline.d.ts +44 -0
- package/dist/graph/Pipeline.js +109 -0
- package/dist/graph/RouterExecutor.d.ts +89 -0
- package/dist/graph/RouterExecutor.js +209 -0
- package/dist/graph/SequentialExecutor.d.ts +44 -0
- package/dist/graph/SequentialExecutor.js +115 -0
- package/dist/graph/VotingSystem.d.ts +54 -0
- package/dist/graph/VotingSystem.js +106 -0
- package/dist/history/History.d.ts +107 -0
- package/dist/history/History.js +166 -0
- package/dist/history/RedisHistory.d.ts +27 -0
- package/dist/history/RedisHistory.js +55 -0
- package/dist/history/transformers.d.ts +102 -0
- package/dist/history/transformers.js +415 -0
- package/dist/history/types.d.ts +130 -0
- package/dist/history/types.js +55 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +48 -0
- package/dist/ingestion/IngestionPipeline.d.ts +86 -0
- package/dist/ingestion/IngestionPipeline.js +266 -0
- package/dist/ingestion/index.d.ts +3 -0
- package/dist/ingestion/index.js +7 -0
- package/dist/ingestion/types.d.ts +74 -0
- package/dist/ingestion/types.js +3 -0
- package/dist/team/Team.d.ts +46 -0
- package/dist/team/Team.js +104 -0
- package/dist/tools/Tool.d.ts +75 -0
- package/dist/tools/Tool.js +137 -0
- package/dist/vectorstore/Embeddings.d.ts +67 -0
- package/dist/vectorstore/Embeddings.js +54 -0
- package/dist/vectorstore/LanceDBVectorStore.d.ts +149 -0
- package/dist/vectorstore/LanceDBVectorStore.js +338 -0
- package/dist/vectorstore/OpenAIEmbeddings.d.ts +45 -0
- package/dist/vectorstore/OpenAIEmbeddings.js +109 -0
- package/dist/vectorstore/VectorStore.d.ts +255 -0
- package/dist/vectorstore/VectorStore.js +216 -0
- package/dist/vectorstore/index.d.ts +28 -0
- package/dist/vectorstore/index.js +35 -0
- package/dist/viz/VizConfig.d.ts +54 -0
- package/dist/viz/VizConfig.js +100 -0
- package/dist/viz/VizReporter.d.ts +127 -0
- package/dist/viz/VizReporter.js +595 -0
- package/dist/viz/index.d.ts +31 -0
- package/dist/viz/index.js +51 -0
- package/dist/viz/types.d.ts +105 -0
- package/dist/viz/types.js +7 -0
- package/package.json +109 -0
- package/readme.md +1 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Visualization event types and interfaces for agent monitoring.
|
|
3
|
+
* These types define the contract between agention-lib and @agention/viz.
|
|
4
|
+
*/
|
|
5
|
+
export type VizVendor = "anthropic" | "openai" | "mistral" | "gemini";
|
|
6
|
+
export type VizEventType = "session.start" | "session.end" | "pipeline.start" | "pipeline.end" | "executor.start" | "executor.end" | "agent.start" | "agent.complete" | "agent.error" | "tool.start" | "tool.complete" | "tool.error" | "message.user" | "message.assistant";
|
|
7
|
+
export type VizExecutorType = "sequential" | "parallel" | "map" | "voting" | "router";
|
|
8
|
+
export type VizStopReason = "end_turn" | "tool_use" | "max_tokens" | "stop_sequence" | "error";
|
|
9
|
+
export interface VizTokenUsage {
|
|
10
|
+
input: number;
|
|
11
|
+
output: number;
|
|
12
|
+
total: number;
|
|
13
|
+
}
|
|
14
|
+
export interface VizSource {
|
|
15
|
+
agentId: string;
|
|
16
|
+
agentName: string;
|
|
17
|
+
model: string;
|
|
18
|
+
vendor: VizVendor;
|
|
19
|
+
}
|
|
20
|
+
export interface VizPipelineStructure {
|
|
21
|
+
name: string;
|
|
22
|
+
type: "sequential" | "parallel" | "pipeline" | "map" | "voting" | "router" | "agent";
|
|
23
|
+
children?: VizPipelineStructure[];
|
|
24
|
+
}
|
|
25
|
+
export interface VizEvent {
|
|
26
|
+
eventId: string;
|
|
27
|
+
sessionId: string;
|
|
28
|
+
pipelineId?: string;
|
|
29
|
+
parentEventId?: string;
|
|
30
|
+
timestamp: number;
|
|
31
|
+
durationMs?: number;
|
|
32
|
+
eventType: VizEventType;
|
|
33
|
+
source: VizSource;
|
|
34
|
+
payload: VizEventPayload;
|
|
35
|
+
}
|
|
36
|
+
export interface SessionStartPayload {
|
|
37
|
+
name?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface SessionEndPayload {
|
|
40
|
+
reason: "completed" | "error" | "timeout";
|
|
41
|
+
}
|
|
42
|
+
export interface PipelineStartPayload {
|
|
43
|
+
pipelineName: string;
|
|
44
|
+
nodeType: "pipeline";
|
|
45
|
+
structure: VizPipelineStructure;
|
|
46
|
+
inputPreview: string;
|
|
47
|
+
}
|
|
48
|
+
export interface PipelineEndPayload {
|
|
49
|
+
success: boolean;
|
|
50
|
+
totalTokens: VizTokenUsage;
|
|
51
|
+
nodeCount: number;
|
|
52
|
+
outputPreview?: string;
|
|
53
|
+
error?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface ExecutorStartPayload {
|
|
56
|
+
executorName: string;
|
|
57
|
+
executorType: VizExecutorType;
|
|
58
|
+
childCount: number;
|
|
59
|
+
inputPreview: string;
|
|
60
|
+
}
|
|
61
|
+
export interface ExecutorEndPayload {
|
|
62
|
+
success: boolean;
|
|
63
|
+
totalTokens: VizTokenUsage;
|
|
64
|
+
outputPreview?: string;
|
|
65
|
+
error?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface AgentStartPayload {
|
|
68
|
+
inputPreview: string;
|
|
69
|
+
}
|
|
70
|
+
export interface AgentCompletePayload {
|
|
71
|
+
tokens: VizTokenUsage;
|
|
72
|
+
stopReason: VizStopReason;
|
|
73
|
+
hasToolCalls: boolean;
|
|
74
|
+
toolCallCount: number;
|
|
75
|
+
outputPreview: string;
|
|
76
|
+
}
|
|
77
|
+
export interface AgentErrorPayload {
|
|
78
|
+
errorType: string;
|
|
79
|
+
errorMessage: string;
|
|
80
|
+
retryable: boolean;
|
|
81
|
+
}
|
|
82
|
+
export interface ToolStartPayload {
|
|
83
|
+
toolName: string;
|
|
84
|
+
toolId: string;
|
|
85
|
+
inputSummary: string;
|
|
86
|
+
}
|
|
87
|
+
export interface ToolCompletePayload {
|
|
88
|
+
toolName: string;
|
|
89
|
+
toolId: string;
|
|
90
|
+
success: boolean;
|
|
91
|
+
resultSummary: string;
|
|
92
|
+
}
|
|
93
|
+
export interface ToolErrorPayload {
|
|
94
|
+
toolName: string;
|
|
95
|
+
toolId: string;
|
|
96
|
+
errorMessage: string;
|
|
97
|
+
}
|
|
98
|
+
export interface MessagePayload {
|
|
99
|
+
role: "user" | "assistant";
|
|
100
|
+
contentPreview: string;
|
|
101
|
+
contentLength: number;
|
|
102
|
+
hasToolUse?: boolean;
|
|
103
|
+
}
|
|
104
|
+
export type VizEventPayload = SessionStartPayload | SessionEndPayload | PipelineStartPayload | PipelineEndPayload | ExecutorStartPayload | ExecutorEndPayload | AgentStartPayload | AgentCompletePayload | AgentErrorPayload | ToolStartPayload | ToolCompletePayload | ToolErrorPayload | MessagePayload;
|
|
105
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Visualization event types and interfaces for agent monitoring.
|
|
4
|
+
* These types define the contract between agention-lib and @agention/viz.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
//# sourceMappingURL=types.js.map
|
package/package.json
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agentionai/agents",
|
|
3
|
+
"author": "Laurent Zuijdwijk",
|
|
4
|
+
"version": "0.3.0-beta",
|
|
5
|
+
"description": "Agent Library",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist/**/*.js",
|
|
10
|
+
"dist/**/*.d.ts",
|
|
11
|
+
"README.md",
|
|
12
|
+
"LICENSE"
|
|
13
|
+
],
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/laurentzuijdwijk/agention-lib.git"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"clean": "rimraf dist",
|
|
20
|
+
"build": "npm run clean && tsc",
|
|
21
|
+
"watch": "tsc -w",
|
|
22
|
+
"test": "jest",
|
|
23
|
+
"test:watch": "jest --watch",
|
|
24
|
+
"lint": "eslint 'lib/**/*.{js,ts}'",
|
|
25
|
+
"lint:fix": "eslint 'src/**/*.{js,ts}' --fix",
|
|
26
|
+
"format": "prettier --write 'src/**/*.{js,ts,json,md}'",
|
|
27
|
+
"prepare": "npm run build",
|
|
28
|
+
"example": "ts-node examples/index.ts",
|
|
29
|
+
"example:watch": "nodemon --watch examples --watch src --ext ts --exec 'ts-node' examples/index.ts",
|
|
30
|
+
"docs": "npm run docs:api && npm run docs:site",
|
|
31
|
+
"docs:api": "typedoc",
|
|
32
|
+
"docs:site": "vitepress build docs",
|
|
33
|
+
"docs:dev": "vitepress dev docs",
|
|
34
|
+
"docs:preview": "vitepress preview docs",
|
|
35
|
+
"publish:npm": "npm publish --registry=https://registry.npmjs.org",
|
|
36
|
+
"publish:github": "npm publish --registry=https://npm.pkg.github.com",
|
|
37
|
+
"publish:all": "npm run publish:npm && npm run publish:github"
|
|
38
|
+
},
|
|
39
|
+
"overrides": {
|
|
40
|
+
"ajv": "^8.17.1",
|
|
41
|
+
"whatwg-url": "^14.0.0"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@anthropic-ai/sdk": "^0.71.2",
|
|
45
|
+
"@babel/core": "^7.26.9",
|
|
46
|
+
"@babel/preset-env": "^7.26.9",
|
|
47
|
+
"@babel/preset-typescript": "^7.26.0",
|
|
48
|
+
"@eslint/js": "^9.23.0",
|
|
49
|
+
"@google/generative-ai": "^0.24.1",
|
|
50
|
+
"@lancedb/lancedb": "^0.23.0",
|
|
51
|
+
"@mistralai/mistralai": "^1.13.0",
|
|
52
|
+
"@types/jest": "^29.5.0",
|
|
53
|
+
"@types/node": "^18.15.11",
|
|
54
|
+
"@typescript-eslint/eslint-plugin": "^5.57.1",
|
|
55
|
+
"@typescript-eslint/parser": "^5.57.1",
|
|
56
|
+
"apache-arrow": "^18.1.0",
|
|
57
|
+
"babel-jest": "^29.7.0",
|
|
58
|
+
"docdash": "^2.0.2",
|
|
59
|
+
"eslint": "^8.57.1",
|
|
60
|
+
"eslint-config-prettier": "^8.8.0",
|
|
61
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
62
|
+
"globals": "^16.0.0",
|
|
63
|
+
"jest": "^29.5.0",
|
|
64
|
+
"jsdoc": "^4.0.4",
|
|
65
|
+
"jsdoc-to-markdown": "^9.1.1",
|
|
66
|
+
"nodemon": "^2.0.22",
|
|
67
|
+
"openai": "^6.16.0",
|
|
68
|
+
"prettier": "^2.8.7",
|
|
69
|
+
"rimraf": "^4.4.1",
|
|
70
|
+
"ts-jest": "^29.2.6",
|
|
71
|
+
"ts-node": "^10.9.1",
|
|
72
|
+
"typedoc": "^0.28.16",
|
|
73
|
+
"typedoc-plugin-markdown": "^4.9.0",
|
|
74
|
+
"typescript": "^5.0.3",
|
|
75
|
+
"typescript-eslint": "^8.28.0",
|
|
76
|
+
"vitepress": "^1.6.4"
|
|
77
|
+
},
|
|
78
|
+
"peerDependencies": {
|
|
79
|
+
"@anthropic-ai/sdk": "^0.71.2",
|
|
80
|
+
"@google/generative-ai": "^0.24.1",
|
|
81
|
+
"@lancedb/lancedb": "^0.23.0",
|
|
82
|
+
"@mistralai/mistralai": "^1.13.0",
|
|
83
|
+
"apache-arrow": "^18.0.0",
|
|
84
|
+
"openai": "^6.16.0"
|
|
85
|
+
},
|
|
86
|
+
"peerDependenciesMeta": {
|
|
87
|
+
"@lancedb/lancedb": {
|
|
88
|
+
"optional": true
|
|
89
|
+
},
|
|
90
|
+
"apache-arrow": {
|
|
91
|
+
"optional": true
|
|
92
|
+
},
|
|
93
|
+
"@google/generative-ai": {
|
|
94
|
+
"optional": true
|
|
95
|
+
},
|
|
96
|
+
"@mistralai/mistralai": {
|
|
97
|
+
"optional": true
|
|
98
|
+
},
|
|
99
|
+
"@anthropic-ai/sdk": {
|
|
100
|
+
"optional": true
|
|
101
|
+
},
|
|
102
|
+
"openai": {
|
|
103
|
+
"optional": true
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"dependencies": {
|
|
107
|
+
"tokenx": "^1.2.1"
|
|
108
|
+
}
|
|
109
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Readme for atomic agents
|