Knowledge infrastructure SDK for AI agents - universal references, multi-tier caching, storage abstraction, and sync
npm install @fractary/codexJavaScript/TypeScript SDK for Fractary Codex - knowledge infrastructure for AI agents.


``bash`
npm install @fractary/codex
- Universal References: codex:// URI scheme for cross-project knowledge references
- Multi-Provider Storage: Local filesystem, GitHub, HTTP, and S3 storage backends
- Intelligent Caching: Multi-tier caching with LRU eviction
- File Synchronization: Bidirectional sync with conflict detection
- MCP Integration: Model Context Protocol server for AI agents
- Permission System: Fine-grained access control
- Type-Safe: Full TypeScript support
`typescript
import { parseReference, CacheManager, StorageManager } from '@fractary/codex'
// Parse a codex URI
const ref = parseReference('codex://myorg/docs/api-guide.md')
// Create managers
const storage = StorageManager.create()
const cache = CacheManager.create({ cacheDir: '.fractary/codex/cache' })
cache.setStorageManager(storage)
// Fetch content with caching
const content = await cache.get('codex://myorg/docs/api-guide.md')
`
Full documentation: docs/sdk/js/
- API Reference
- Authentication
- Troubleshooting
- Configuration Guide
`bashInstall dependencies
npm install
Publishing
`bash
Build and test
npm run build && npm testBump version
npm version patch # or minor/majorPush with tags
git push && git push --tagsPublish
npm publish
`License
MIT - see LICENSE
See Also
- Python SDK -
fractary-codex` on PyPI