{"_id":"@agenticverz/aos-sdk","name":"@agenticverz/aos-sdk","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@agenticverz/aos-sdk","version":"0.1.0","description":"JavaScript/TypeScript SDK for AOS (Agentic Operating System) - Machine-native agent runtime","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"build":"tsup src/index.ts --format cjs,esm --dts","test":"vitest run","test:watch":"vitest","lint":"eslint src --ext .ts","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"keywords":["aos","agent","agentic","sdk","machine-native","runtime","llm","ai","typescript"],"author":{"name":"Agenticverz","email":"dev@xuniverz.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/xuniverz/agenticverz.git","directory":"sdk/js/aos-sdk"},"homepage":"https://github.com/xuniverz/agenticverz#readme","bugs":{"url":"https://github.com/xuniverz/agenticverz/issues"},"engines":{"node":">=18.0.0"},"devDependencies":{"@types/node":"^20.0.0","tsup":"^8.0.0","typescript":"^5.0.0","vitest":"^1.0.0","eslint":"^8.0.0","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0"},"_id":"@agenticverz/aos-sdk@0.1.0","gitHead":"0f1d7aaed192551d2d04119076db8a87ceea73cb","_nodeVersion":"20.19.6","_npmVersion":"10.8.2","dist":{"integrity":"sha512-hkrCiwezlRZIzUyCryzaM52B47Phx4KR7HGW4dNrTuuG082GfHJ+VTuHnkdO8kJRWsIn9kJ3ivWq6Biv7hvOqw==","shasum":"d393cac55be915fdd837f6abbc84cf2212242dd2","tarball":"https://registry.npmjs.org/@agenticverz/aos-sdk/-/aos-sdk-0.1.0.tgz","fileCount":6,"unpackedSize":43811,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEULeOgJ8DevGUUD3SrTcq1BVkt0WOD2WpEV4rUvDC8SAiAuBVOsrIkDU3ncWrNtS4JmOPWDH0c9Nv9y4BIjHjzhDg=="}]},"_npmUser":{"name":"xuniverzadmin","email":"admin1@xuniverz.com"},"directories":{},"maintainers":[{"name":"xuniverzadmin","email":"admin1@xuniverz.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/aos-sdk_0.1.0_1764951369256_0.7405728246791314"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-05T16:16:09.108Z","0.1.0":"2025-12-05T16:16:09.398Z","modified":"2025-12-05T16:16:09.760Z"},"maintainers":[{"name":"xuniverzadmin","email":"admin1@xuniverz.com"}],"description":"JavaScript/TypeScript SDK for AOS (Agentic Operating System) - Machine-native agent runtime","homepage":"https://github.com/xuniverz/agenticverz#readme","keywords":["aos","agent","agentic","sdk","machine-native","runtime","llm","ai","typescript"],"repository":{"type":"git","url":"git+https://github.com/xuniverz/agenticverz.git","directory":"sdk/js/aos-sdk"},"author":{"name":"Agenticverz","email":"dev@xuniverz.com"},"bugs":{"url":"https://github.com/xuniverz/agenticverz/issues"},"license":"MIT","readme":"# AOS SDK for JavaScript/TypeScript\n\nThe official JavaScript/TypeScript SDK for AOS (Agentic Operating System) - the most predictable, reliable, deterministic SDK for building machine-native agents.\n\n## Installation\n\n```bash\nnpm install @agenticverz/aos-sdk\n# or\nyarn add @agenticverz/aos-sdk\n# or\npnpm add @agenticverz/aos-sdk\n```\n\n## Quick Start\n\n```typescript\nimport { AOSClient } from '@agenticverz/aos-sdk';\n\n// Initialize client\nconst client = new AOSClient({\n  apiKey: 'your-api-key',\n  baseUrl: 'http://localhost:8000'\n});\n\n// Check available capabilities\nconst caps = await client.getCapabilities();\nconsole.log(`Budget remaining: ${caps.budget_remaining_cents}c`);\nconsole.log(`Available skills: ${caps.skills_available.join(', ')}`);\n\n// Simulate before executing\nconst result = await client.simulate([\n  { skill: 'http_call', params: { url: 'https://api.example.com' } },\n  { skill: 'llm_invoke', params: { prompt: 'Summarize the response' } }\n]);\n\nif (result.feasible) {\n  console.log(`Plan is feasible! Estimated cost: ${result.estimated_cost_cents}c`);\n} else {\n  console.log(`Plan not feasible: ${result.reason}`);\n}\n```\n\n## Machine-Native Features\n\nAOS is designed for agents to operate efficiently, not humans to babysit:\n\n- **Queryable execution context** - Not log parsing\n- **Capability contracts** - Not just tool lists\n- **Structured outcomes** - Never throws exceptions\n- **Failure as data** - Navigable, not opaque\n- **Pre-execution simulation** - Know before you run\n\n## API Reference\n\n### AOSClient\n\n```typescript\nconst client = new AOSClient({\n  apiKey: '...',           // Optional, uses AOS_API_KEY env var\n  baseUrl: 'http://...',   // Default: http://127.0.0.1:8000\n  timeout: 30000           // Request timeout in milliseconds\n});\n```\n\n### Machine-Native APIs\n\n```typescript\n// Simulate a plan before execution\nconst result = await client.simulate(plan, budgetCents);\n\n// Query runtime state\nconst budget = await client.query('remaining_budget_cents');\nconst attempts = await client.query('what_did_i_try_already', {}, undefined, runId);\n\n// List and describe skills\nconst { skills } = await client.listSkills();\nconst skill = await client.describeSkill('http_call');\n\n// Get capabilities\nconst caps = await client.getCapabilities();\n```\n\n### Agent Workflow APIs\n\n```typescript\n// Create agent and execute goal\nconst agentId = await client.createAgent('my-agent');\nconst runId = await client.postGoal(agentId, 'Check the weather in London');\nconst result = await client.pollRun(agentId, runId);\n\n// Memory recall\nconst memories = await client.recall(agentId, 'weather queries', 5);\n```\n\n## TypeScript Support\n\nThis SDK is written in TypeScript and includes full type definitions:\n\n```typescript\nimport type {\n  AOSClientOptions,\n  PlanStep,\n  SimulateResult,\n  Capabilities,\n  Skill,\n  SkillDescriptor,\n  Run\n} from '@agenticverz/aos-sdk';\n```\n\n## Environment Variables\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `AOS_API_KEY` | API key for authentication | (none) |\n| `AOS_BASE_URL` | Base URL for AOS server | `http://127.0.0.1:8000` |\n\n## Requirements\n\n- Node.js 18+ (uses native fetch)\n- For older Node.js versions, you'll need a fetch polyfill\n\n## License\n\nMIT License - see LICENSE file for details.\n","readmeFilename":"README.md","_rev":"1-84b38c63ee8df3f70f29c260e3fd3293"}