@terminusagents/agents 0.1.0

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.
Files changed (55) hide show
  1. package/README.md +192 -0
  2. package/bin/terminus-agent.js +2 -0
  3. package/dist/agent/executor.d.ts +24 -0
  4. package/dist/agent/executor.js +96 -0
  5. package/dist/agents/budget-planner.d.ts +3 -0
  6. package/dist/agents/budget-planner.js +43 -0
  7. package/dist/agents/career-coach.d.ts +3 -0
  8. package/dist/agents/career-coach.js +43 -0
  9. package/dist/agents/crypto-advisor.d.ts +3 -0
  10. package/dist/agents/crypto-advisor.js +49 -0
  11. package/dist/agents/event-planner.d.ts +3 -0
  12. package/dist/agents/event-planner.js +41 -0
  13. package/dist/agents/fitness-coach.d.ts +3 -0
  14. package/dist/agents/fitness-coach.js +43 -0
  15. package/dist/agents/food-expert.d.ts +3 -0
  16. package/dist/agents/food-expert.js +43 -0
  17. package/dist/agents/fundamental-analyst.d.ts +3 -0
  18. package/dist/agents/fundamental-analyst.js +54 -0
  19. package/dist/agents/health-advisor.d.ts +3 -0
  20. package/dist/agents/health-advisor.js +52 -0
  21. package/dist/agents/index.d.ts +25 -0
  22. package/dist/agents/index.js +99 -0
  23. package/dist/agents/language-tutor.d.ts +3 -0
  24. package/dist/agents/language-tutor.js +41 -0
  25. package/dist/agents/legal-advisor.d.ts +3 -0
  26. package/dist/agents/legal-advisor.js +42 -0
  27. package/dist/agents/real-estate.d.ts +3 -0
  28. package/dist/agents/real-estate.js +41 -0
  29. package/dist/agents/shopping-assistant.d.ts +3 -0
  30. package/dist/agents/shopping-assistant.js +44 -0
  31. package/dist/agents/tech-support.d.ts +3 -0
  32. package/dist/agents/tech-support.js +46 -0
  33. package/dist/agents/technical-analyst.d.ts +3 -0
  34. package/dist/agents/technical-analyst.js +45 -0
  35. package/dist/agents/travel-planner.d.ts +3 -0
  36. package/dist/agents/travel-planner.js +91 -0
  37. package/dist/agents/types.d.ts +20 -0
  38. package/dist/agents/types.js +4 -0
  39. package/dist/cli/doctor.d.ts +4 -0
  40. package/dist/cli/doctor.js +184 -0
  41. package/dist/cli/init.d.ts +16 -0
  42. package/dist/cli/init.js +429 -0
  43. package/dist/cli/run.d.ts +1 -0
  44. package/dist/cli/run.js +98 -0
  45. package/dist/cli/status.d.ts +1 -0
  46. package/dist/cli/status.js +104 -0
  47. package/dist/config/store.d.ts +19 -0
  48. package/dist/config/store.js +148 -0
  49. package/dist/index.d.ts +1 -0
  50. package/dist/index.js +61 -0
  51. package/dist/llm/provider.d.ts +56 -0
  52. package/dist/llm/provider.js +181 -0
  53. package/dist/network/client.d.ts +33 -0
  54. package/dist/network/client.js +389 -0
  55. package/package.json +63 -0
package/README.md ADDED
@@ -0,0 +1,192 @@
1
+ # Terminus Agents Node
2
+
3
+ Run a Terminus agent on your machine, receive jobs from the control plane, and earn for completed work.
4
+
5
+ This package supports:
6
+ - challenge-signature websocket auth
7
+ - Grok / Ollama / OpenAI-compatible providers
8
+ - testnet/mainnet/local network profiles
9
+ - one-command diagnostics with `doctor`
10
+
11
+ ## Install Without Cloning
12
+
13
+ ### Option 1: npm global install
14
+
15
+ ```bash
16
+ npm install -g @terminusagents/agents
17
+ ```
18
+
19
+ Then run:
20
+
21
+ ```bash
22
+ terminus-agent init
23
+ ```
24
+
25
+ ### Option 2: One-line installer (curl)
26
+
27
+ ```bash
28
+ curl -fsSL https://raw.githubusercontent.com/Terminusagents/agents/main/scripts/install.sh | bash
29
+ ```
30
+
31
+ This script:
32
+ - checks Node.js/NPM prerequisites
33
+ - installs `@terminusagents/agents` globally
34
+ - prints next commands (`init`, `doctor`, `run`)
35
+
36
+ ## 3-Minute Onboarding
37
+
38
+ 1. Clone and install:
39
+
40
+ ```bash
41
+ git clone https://github.com/Terminusagents/agents.git
42
+ cd agents
43
+ pnpm install
44
+ pnpm build
45
+ ```
46
+
47
+ 2. Configure agent (interactive):
48
+
49
+ ```bash
50
+ npx terminus-agent init
51
+ ```
52
+
53
+ 3. Export required runtime secrets:
54
+
55
+ ```bash
56
+ export TERMINUS_WALLET_PRIVATE_KEY=0x...
57
+ export TERMINUS_GROK_API_KEY=xai-... # only if using Grok
58
+ ```
59
+
60
+ 4. Run diagnostics:
61
+
62
+ ```bash
63
+ npx terminus-agent doctor --full
64
+ ```
65
+
66
+ 5. Start node:
67
+
68
+ ```bash
69
+ npx terminus-agent run
70
+ ```
71
+
72
+ ## Non-Interactive Setup (Automation Friendly)
73
+
74
+ Use this for scripted onboarding:
75
+
76
+ ```bash
77
+ export TERMINUS_WALLET_PRIVATE_KEY=0x...
78
+ export TERMINUS_GROK_API_KEY=xai-...
79
+
80
+ npx terminus-agent init \
81
+ --yes \
82
+ --force \
83
+ --profile testnet \
84
+ --agent-type travel-planner \
85
+ --wallet 0x1234567890abcdef1234567890abcdef12345678 \
86
+ --llm-provider grok
87
+ ```
88
+
89
+ Then:
90
+
91
+ ```bash
92
+ npx terminus-agent doctor
93
+ npx terminus-agent run
94
+ ```
95
+
96
+ ## CLI Commands
97
+
98
+ ```bash
99
+ npx terminus-agent init # setup or reconfigure
100
+ npx terminus-agent doctor # readiness diagnostics
101
+ npx terminus-agent status # show current config and health hints
102
+ npx terminus-agent run # start agent client
103
+ ```
104
+
105
+ ## Network Presets
106
+
107
+ `init` can select `local`, `testnet`, or `mainnet` profile.
108
+
109
+ Optional preset environment variables:
110
+
111
+ ```bash
112
+ export TERMINUS_CONTROL_PLANE_URL_LOCAL=ws://localhost:8084
113
+ export TERMINUS_CONTROL_PLANE_URL_TESTNET=wss://<sepolia-control-plane>
114
+ export TERMINUS_CONTROL_PLANE_URL_MAINNET=wss://<mainnet-control-plane>
115
+ ```
116
+
117
+ Notes:
118
+ - `mainnet` profile requires `wss://`
119
+ - if `REQUIRE_WSS=true`, plain `ws://` is rejected
120
+
121
+ ## Security Defaults
122
+
123
+ - private key is never written to `~/.terminus/config.json`
124
+ - config directory/file permissions are hardened (`0700` / `0600` where supported)
125
+ - wallet/private key mismatch is rejected by default
126
+ - shared-secret fallback is only usable when `ALLOW_DEV_SHARED_SECRET=true`
127
+ - prompt/tool-parameter snippets are not logged in client output
128
+
129
+ ## Configuration File
130
+
131
+ Config path:
132
+
133
+ ```bash
134
+ ~/.terminus/config.json
135
+ ```
136
+
137
+ Example:
138
+
139
+ ```json
140
+ {
141
+ "agentType": "travel-planner",
142
+ "wallet": "0x1234567890abcdef1234567890abcdef12345678",
143
+ "apiKey": "__ENV__",
144
+ "controlPlaneUrl": "wss://example-control-plane",
145
+ "nodeId": "travel-planner-123456-a1b2c3d4",
146
+ "llmProvider": "grok",
147
+ "networkProfile": "testnet"
148
+ }
149
+ ```
150
+
151
+ `"apiKey": "__ENV__"` means runtime key from `TERMINUS_GROK_API_KEY` or `XAI_API_KEY`.
152
+
153
+ ## Troubleshooting
154
+
155
+ ### `Connection failed`
156
+ - run `npx terminus-agent doctor --full`
157
+ - verify control plane URL and firewall
158
+ - for mainnet, verify URL starts with `wss://`
159
+
160
+ ### `Auth failed`
161
+ - verify `TERMINUS_WALLET_PRIVATE_KEY` is set
162
+ - verify private key signer address matches configured wallet
163
+ - rerun `npx terminus-agent init --force` if wallet changed
164
+
165
+ ### `Grok key missing`
166
+ - set one of:
167
+ - `TERMINUS_GROK_API_KEY`
168
+ - `XAI_API_KEY`
169
+ - or store key directly during `init`
170
+
171
+ ### `Ollama not reachable`
172
+ - start server:
173
+
174
+ ```bash
175
+ ollama serve
176
+ ```
177
+
178
+ - verify:
179
+
180
+ ```bash
181
+ curl http://localhost:11434/api/tags
182
+ ```
183
+
184
+ ## Support
185
+
186
+ - GitHub: [https://github.com/Terminusagents/agents](https://github.com/Terminusagents/agents)
187
+ - Organization: [https://github.com/Terminusagents](https://github.com/Terminusagents)
188
+ - X: [https://x.com/terminus_agents](https://x.com/terminus_agents)
189
+
190
+ ## License
191
+
192
+ MIT
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import '../dist/index.js';
@@ -0,0 +1,24 @@
1
+ import { AgentConfig } from '../config/store.js';
2
+ export interface ExecutionResult {
3
+ response: string;
4
+ toolsUsed?: Array<{
5
+ name: string;
6
+ params: unknown;
7
+ result: unknown;
8
+ }>;
9
+ llmProvider?: string;
10
+ tokensUsed?: number;
11
+ }
12
+ export declare class AgentExecutor {
13
+ private config;
14
+ private agentDefinition;
15
+ private llmProvider;
16
+ constructor(config: AgentConfig);
17
+ getAgentInfo(): {
18
+ id: string;
19
+ name: string;
20
+ description: string;
21
+ tools: string[];
22
+ };
23
+ execute(userQuery: string): Promise<ExecutionResult>;
24
+ }
@@ -0,0 +1,96 @@
1
+ // =============================================================================
2
+ // TERMINUS AGENT - Agent Executor
3
+ // =============================================================================
4
+ // Executes agent logic: calls LLM, invokes tools, returns response.
5
+ // Supports multiple LLM backends via provider abstraction.
6
+ // =============================================================================
7
+ import { createLLMProvider } from '../llm/provider.js';
8
+ import { AGENTS, getAgentById, executeAgentTool } from '../agents/index.js';
9
+ export class AgentExecutor {
10
+ config;
11
+ agentDefinition;
12
+ llmProvider;
13
+ constructor(config) {
14
+ this.config = config;
15
+ // Get agent definition from registry
16
+ const agentDef = getAgentById(config.agentType);
17
+ if (!agentDef) {
18
+ throw new Error(`Unknown agent type: ${config.agentType}. Available: ${AGENTS.map(a => a.id).join(', ')}`);
19
+ }
20
+ this.agentDefinition = agentDef;
21
+ // Create LLM provider based on config
22
+ this.llmProvider = createLLMProvider({
23
+ provider: config.llmProvider || 'grok',
24
+ apiKey: config.apiKey,
25
+ baseUrl: config.llmBaseUrl,
26
+ model: config.llmModel,
27
+ });
28
+ console.log(`🤖 Agent executor initialized`);
29
+ console.log(` Agent: ${this.agentDefinition.name} (${this.agentDefinition.id})`);
30
+ console.log(` LLM Provider: ${this.llmProvider.name}`);
31
+ console.log(` Tools: ${this.agentDefinition.tools.map(t => t.name).join(', ')}`);
32
+ }
33
+ getAgentInfo() {
34
+ return {
35
+ id: this.agentDefinition.id,
36
+ name: this.agentDefinition.name,
37
+ description: this.agentDefinition.description,
38
+ tools: this.agentDefinition.tools.map(t => t.name),
39
+ };
40
+ }
41
+ async execute(userQuery) {
42
+ const toolsUsed = [];
43
+ // Build system prompt with tools info
44
+ const toolsInfo = this.agentDefinition.tools
45
+ .map(t => `- ${t.name}: ${t.description} (params: ${t.parameters.join(', ')})`)
46
+ .join('\n');
47
+ const systemPrompt = `${this.agentDefinition.systemPrompt}
48
+
49
+ You have access to the following tools:
50
+ ${toolsInfo}
51
+
52
+ When you need to use a tool, respond with a JSON block like this:
53
+ \`\`\`json
54
+ {"tool": "toolName", "params": {"param1": "value1"}}
55
+ \`\`\`
56
+
57
+ After receiving tool results, incorporate them into your response to help the user.`;
58
+ // Initial LLM call
59
+ let response = await this.llmProvider.chat([
60
+ { role: 'system', content: systemPrompt },
61
+ { role: 'user', content: userQuery },
62
+ ], { maxTokens: 1024, temperature: 0.7 });
63
+ // Check if LLM wants to use a tool
64
+ const toolMatch = response.content.match(/```json\s*(\{[\s\S]*?\})\s*```/);
65
+ if (toolMatch) {
66
+ try {
67
+ const toolCall = JSON.parse(toolMatch[1]);
68
+ console.log(`🔧 Tool call detected: ${toolCall.tool}`);
69
+ // Execute the tool
70
+ const toolResult = await executeAgentTool(this.agentDefinition.id, toolCall.tool, toolCall.params);
71
+ toolsUsed.push({
72
+ name: toolCall.tool,
73
+ params: toolCall.params,
74
+ result: toolResult.data,
75
+ });
76
+ // Follow-up LLM call with tool result
77
+ const followUp = await this.llmProvider.chat([
78
+ { role: 'system', content: systemPrompt },
79
+ { role: 'user', content: userQuery },
80
+ { role: 'assistant', content: response.content },
81
+ { role: 'user', content: `Tool result for ${toolCall.tool}:\n${JSON.stringify(toolResult.data, null, 2)}\n\nPlease provide a helpful response based on this information.` },
82
+ ], { maxTokens: 1024, temperature: 0.7 });
83
+ response = followUp;
84
+ }
85
+ catch (e) {
86
+ console.error('Failed to parse tool call:', e);
87
+ }
88
+ }
89
+ return {
90
+ response: response.content,
91
+ toolsUsed: toolsUsed.length > 0 ? toolsUsed : undefined,
92
+ llmProvider: this.llmProvider.name,
93
+ tokensUsed: response.tokensUsed,
94
+ };
95
+ }
96
+ }
@@ -0,0 +1,3 @@
1
+ import type { AgentDefinition, ToolParams } from './types.js';
2
+ export declare const BudgetPlannerAgent: AgentDefinition;
3
+ export declare const BudgetPlannerTools: Record<string, (params: ToolParams) => Promise<unknown>>;
@@ -0,0 +1,43 @@
1
+ // =============================================================================
2
+ // TERMINUS AGENTS - Budget Planner Agent
3
+ // =============================================================================
4
+ // =============================================================================
5
+ // Agent Definition
6
+ // =============================================================================
7
+ export const BudgetPlannerAgent = {
8
+ id: 'budget-planner',
9
+ name: 'Budget Planner',
10
+ description: 'Helps with budgeting, finding deals, and cost comparisons',
11
+ systemPrompt: `You are a financial budget expert. Help users find affordable options and manage their spending.`,
12
+ keywords: ['budget', 'cheap', 'affordable', 'cost', 'price', 'deal', 'discount', 'save', 'money'],
13
+ tools: [
14
+ { name: 'calculateBudget', description: 'Calculate total budget', parameters: ['items', 'currency'] },
15
+ { name: 'findDeals', description: 'Find best deals', parameters: ['category', 'maxPrice'] },
16
+ { name: 'comparePrices', description: 'Compare prices', parameters: ['product', 'sources'] },
17
+ ],
18
+ };
19
+ // =============================================================================
20
+ // Tool Implementations
21
+ // =============================================================================
22
+ export const BudgetPlannerTools = {
23
+ calculateBudget: async (p) => ({
24
+ total: Array.isArray(p.items) ? p.items.reduce((a, b) => a + b, 0) : 0,
25
+ currency: p.currency || 'USD',
26
+ breakdown: p.items
27
+ }),
28
+ findDeals: async (p) => ({
29
+ deals: [
30
+ { name: `Best ${p.category} Deal`, discount: '30%', originalPrice: 100, salePrice: 70 },
31
+ { name: `Premium ${p.category}`, discount: '20%', originalPrice: 200, salePrice: 160 },
32
+ ],
33
+ category: p.category
34
+ }),
35
+ comparePrices: async (p) => ({
36
+ product: p.product,
37
+ prices: [
38
+ { source: 'Amazon', price: 99.99 },
39
+ { source: 'eBay', price: 89.99 },
40
+ { source: 'Trendyol', price: 949.00, currency: 'TRY' },
41
+ ]
42
+ }),
43
+ };
@@ -0,0 +1,3 @@
1
+ import type { AgentDefinition, ToolParams } from './types.js';
2
+ export declare const CareerCoachAgent: AgentDefinition;
3
+ export declare const CareerCoachTools: Record<string, (params: ToolParams) => Promise<unknown>>;
@@ -0,0 +1,43 @@
1
+ // =============================================================================
2
+ // TERMINUS AGENTS - Career Coach Agent
3
+ // =============================================================================
4
+ // =============================================================================
5
+ // Agent Definition
6
+ // =============================================================================
7
+ export const CareerCoachAgent = {
8
+ id: 'career-coach',
9
+ name: 'Career Coach',
10
+ description: 'Helps with job search and career development',
11
+ systemPrompt: `You are a career coach. Help users find jobs, improve resumes, and prepare for interviews.`,
12
+ keywords: ['job', 'career', 'resume', 'interview', 'salary', 'hire', 'work', 'profession'],
13
+ tools: [
14
+ { name: 'searchJobs', description: 'Search jobs', parameters: ['title', 'location', 'remote'] },
15
+ { name: 'reviewResume', description: 'Review resume', parameters: ['resumeText'] },
16
+ { name: 'prepareInterview', description: 'Prepare interview', parameters: ['company', 'role'] },
17
+ ],
18
+ };
19
+ // =============================================================================
20
+ // Tool Implementations
21
+ // =============================================================================
22
+ export const CareerCoachTools = {
23
+ searchJobs: async (p) => ({
24
+ jobs: [
25
+ { title: p.title, company: 'Google', location: p.location, salary: '$150K' },
26
+ { title: p.title, company: 'Microsoft', location: p.location, salary: '$140K' },
27
+ ]
28
+ }),
29
+ reviewResume: async (p) => ({
30
+ score: 78,
31
+ strengths: ['Clear formatting', 'Strong experience section'],
32
+ improvements: ['Add more metrics', 'Update skills section']
33
+ }),
34
+ prepareInterview: async (p) => ({
35
+ company: p.company,
36
+ questions: [
37
+ 'Tell me about yourself',
38
+ 'Why do you want to work here?',
39
+ 'What are your strengths and weaknesses?'
40
+ ],
41
+ tips: ['Research the company', 'Prepare STAR examples']
42
+ }),
43
+ };
@@ -0,0 +1,3 @@
1
+ import type { AgentDefinition, ToolParams } from './types.js';
2
+ export declare const CryptoAdvisorAgent: AgentDefinition;
3
+ export declare const CryptoAdvisorTools: Record<string, (params: ToolParams) => Promise<unknown>>;
@@ -0,0 +1,49 @@
1
+ // =============================================================================
2
+ // TERMINUS AGENTS - Crypto Advisor Agent
3
+ // =============================================================================
4
+ // =============================================================================
5
+ // Agent Definition
6
+ // =============================================================================
7
+ export const CryptoAdvisorAgent = {
8
+ id: 'crypto-advisor',
9
+ name: 'Crypto Advisor',
10
+ description: 'Provides cryptocurrency analysis and advice',
11
+ systemPrompt: `You are a cryptocurrency expert. Analyze crypto markets, tokens, and provide insights on the crypto ecosystem.`,
12
+ keywords: ['crypto', 'bitcoin', 'ethereum', 'token', 'blockchain', 'defi', 'nft', 'coin', 'kripto', 'bitcoin', 'altcoin'],
13
+ tools: [
14
+ { name: 'getCryptoPrice', description: 'Get crypto price', parameters: ['symbol'] },
15
+ { name: 'analyzeToken', description: 'Analyze token', parameters: ['address', 'chain'] },
16
+ { name: 'getMarketCap', description: 'Get market data', parameters: ['symbol'] },
17
+ { name: 'getDeFiStats', description: 'Get DeFi stats', parameters: ['protocol'] },
18
+ ],
19
+ };
20
+ // =============================================================================
21
+ // Tool Implementations
22
+ // =============================================================================
23
+ export const CryptoAdvisorTools = {
24
+ getCryptoPrice: async (p) => ({
25
+ symbol: p.symbol,
26
+ price: p.symbol === 'BTC' ? 42500 : p.symbol === 'ETH' ? 2250 : 100,
27
+ change24h: 3.5,
28
+ volume24h: '25B'
29
+ }),
30
+ analyzeToken: async (p) => ({
31
+ address: p.address,
32
+ chain: p.chain,
33
+ holders: 15000,
34
+ liquidity: '$2.5M',
35
+ score: 75
36
+ }),
37
+ getMarketCap: async (p) => ({
38
+ symbol: p.symbol,
39
+ marketCap: '$850B',
40
+ rank: 1,
41
+ dominance: '52%'
42
+ }),
43
+ getDeFiStats: async (p) => ({
44
+ protocol: p.protocol,
45
+ tvl: '$5.2B',
46
+ apy: '8.5%',
47
+ users: 150000
48
+ }),
49
+ };
@@ -0,0 +1,3 @@
1
+ import type { AgentDefinition, ToolParams } from './types.js';
2
+ export declare const EventPlannerAgent: AgentDefinition;
3
+ export declare const EventPlannerTools: Record<string, (params: ToolParams) => Promise<unknown>>;
@@ -0,0 +1,41 @@
1
+ // =============================================================================
2
+ // TERMINUS AGENTS - Event Planner Agent
3
+ // =============================================================================
4
+ // =============================================================================
5
+ // Agent Definition
6
+ // =============================================================================
7
+ export const EventPlannerAgent = {
8
+ id: 'event-planner',
9
+ name: 'Event Planner',
10
+ description: 'Plans events and finds venues',
11
+ systemPrompt: `You are an event planning expert. Help users plan and organize events of all types.`,
12
+ keywords: ['event', 'party', 'wedding', 'venue', 'conference', 'meeting', 'celebration'],
13
+ tools: [
14
+ { name: 'searchVenues', description: 'Find venues', parameters: ['location', 'capacity', 'type'] },
15
+ { name: 'findCaterer', description: 'Find catering', parameters: ['location', 'cuisine', 'headcount'] },
16
+ { name: 'bookTickets', description: 'Book tickets', parameters: ['event', 'quantity'] },
17
+ ],
18
+ };
19
+ // =============================================================================
20
+ // Tool Implementations
21
+ // =============================================================================
22
+ export const EventPlannerTools = {
23
+ searchVenues: async (p) => ({
24
+ venues: [
25
+ { name: 'Grand Ballroom', capacity: p.capacity, price: 5000 },
26
+ { name: 'Rooftop Terrace', capacity: p.capacity, price: 3500 },
27
+ ]
28
+ }),
29
+ findCaterer: async (p) => ({
30
+ caterers: [
31
+ { name: 'Gourmet Events', pricePerPerson: 85 },
32
+ { name: 'Catering Plus', pricePerPerson: 65 },
33
+ ]
34
+ }),
35
+ bookTickets: async (p) => ({
36
+ event: p.event,
37
+ tickets: p.quantity,
38
+ total: p.quantity * 50,
39
+ confirmation: 'TICKET-' + Math.random().toString(36).slice(2, 8).toUpperCase()
40
+ }),
41
+ };
@@ -0,0 +1,3 @@
1
+ import type { AgentDefinition, ToolParams } from './types.js';
2
+ export declare const FitnessCoachAgent: AgentDefinition;
3
+ export declare const FitnessCoachTools: Record<string, (params: ToolParams) => Promise<unknown>>;
@@ -0,0 +1,43 @@
1
+ // =============================================================================
2
+ // TERMINUS AGENTS - Fitness Coach Agent
3
+ // =============================================================================
4
+ // =============================================================================
5
+ // Agent Definition
6
+ // =============================================================================
7
+ export const FitnessCoachAgent = {
8
+ id: 'fitness-coach',
9
+ name: 'Fitness Coach',
10
+ description: 'Creates workout plans and fitness advice',
11
+ systemPrompt: `You are a fitness coach. Create workout plans and provide health and fitness guidance.`,
12
+ keywords: ['fitness', 'workout', 'exercise', 'gym', 'weight', 'muscle', 'cardio', 'training', 'spor', 'egzersiz', 'antrenman', 'kilo'],
13
+ tools: [
14
+ { name: 'createWorkout', description: 'Create workout plan', parameters: ['goal', 'level', 'equipment'] },
15
+ { name: 'calculateCalories', description: 'Calculate calories', parameters: ['activity', 'duration'] },
16
+ { name: 'trackProgress', description: 'Track progress', parameters: ['metrics'] },
17
+ ],
18
+ };
19
+ // =============================================================================
20
+ // Tool Implementations
21
+ // =============================================================================
22
+ export const FitnessCoachTools = {
23
+ createWorkout: async (p) => ({
24
+ goal: p.goal,
25
+ level: p.level,
26
+ workout: [
27
+ { exercise: 'Squats', sets: 3, reps: 12 },
28
+ { exercise: 'Push-ups', sets: 3, reps: 15 },
29
+ { exercise: 'Lunges', sets: 3, reps: 10 },
30
+ { exercise: 'Plank', duration: '60 seconds' },
31
+ ]
32
+ }),
33
+ calculateCalories: async (p) => ({
34
+ activity: p.activity,
35
+ duration: p.duration,
36
+ caloriesBurned: 350
37
+ }),
38
+ trackProgress: async (p) => ({
39
+ metrics: p.metrics,
40
+ trend: 'improving',
41
+ recommendation: 'Keep up the good work!'
42
+ }),
43
+ };
@@ -0,0 +1,3 @@
1
+ import type { AgentDefinition, ToolParams } from './types.js';
2
+ export declare const FoodExpertAgent: AgentDefinition;
3
+ export declare const FoodExpertTools: Record<string, (params: ToolParams) => Promise<unknown>>;
@@ -0,0 +1,43 @@
1
+ // =============================================================================
2
+ // TERMINUS AGENTS - Food Expert Agent
3
+ // =============================================================================
4
+ // =============================================================================
5
+ // Agent Definition
6
+ // =============================================================================
7
+ export const FoodExpertAgent = {
8
+ id: 'food-expert',
9
+ name: 'Food Expert',
10
+ description: 'Recommends restaurants and provides recipes',
11
+ systemPrompt: `You are a food and restaurant expert. Help users find great places to eat and provide recipe suggestions.`,
12
+ keywords: ['food', 'restaurant', 'recipe', 'cook', 'eat', 'cuisine', 'delivery', 'meal', 'yemek', 'restoran', 'tarif', 'mutfak'],
13
+ tools: [
14
+ { name: 'searchRestaurants', description: 'Find restaurants', parameters: ['location', 'cuisine', 'priceRange'] },
15
+ { name: 'getRecipes', description: 'Get recipes', parameters: ['dish', 'diet'] },
16
+ { name: 'findDelivery', description: 'Find delivery options', parameters: ['location', 'cuisine'] },
17
+ ],
18
+ };
19
+ // =============================================================================
20
+ // Tool Implementations
21
+ // =============================================================================
22
+ export const FoodExpertTools = {
23
+ searchRestaurants: async (p) => ({
24
+ restaurants: [
25
+ { name: 'Nusret', cuisine: p.cuisine || 'Steakhouse', rating: 4.5, priceRange: '$$$' },
26
+ { name: 'Mikla', cuisine: 'Turkish', rating: 4.8, priceRange: '$$$$' },
27
+ { name: 'Harbor Kitchen', cuisine: 'Traditional', rating: 4.6, priceRange: '$$' },
28
+ ]
29
+ }),
30
+ getRecipes: async (p) => ({
31
+ dish: p.dish,
32
+ recipes: [
33
+ { name: `Classic ${p.dish}`, time: '30 min', difficulty: 'Easy' },
34
+ { name: `Gourmet ${p.dish}`, time: '60 min', difficulty: 'Medium' },
35
+ ]
36
+ }),
37
+ findDelivery: async (p) => ({
38
+ options: [
39
+ { service: 'Yemeksepeti', deliveryTime: '30-45 min', fee: 15 },
40
+ { service: 'Getir Yemek', deliveryTime: '20-30 min', fee: 10 },
41
+ ]
42
+ }),
43
+ };
@@ -0,0 +1,3 @@
1
+ import type { AgentDefinition, ToolParams } from './types.js';
2
+ export declare const FundamentalAnalystAgent: AgentDefinition;
3
+ export declare const FundamentalAnalystTools: Record<string, (params: ToolParams) => Promise<unknown>>;