What is a Component?
A component is compiled code with a typed interface. You write it in a supported language (TypeScript, Python, Rust, Go, etc.), define its interface, and asterai compiles it to a portable format that runs in any asterai environment. Components can:- Export functions for other components or AI agents to call
- Import and use other components
- Access asterai’s built-in capabilities (HTTP, storage, LLM calls)
Component Interface
Every component has an interface defined in WIT (WebAssembly Interface Types). This defines what functions your component exports and what types it uses. Example interface for a burger ordering tool:- Package: Your namespace, component name, and version
- Imports: Capabilities your component needs (here, the asterai host API)
- Exports: Functions your component provides
- Types: Data structures used by your functions
Component Implementation
The implementation is your actual code. Here’s the TypeScript implementation for the interface above:Versioning
Components use semantic versioning. Each published version is immutable—you can’t overwrite an existing version. This ensures reproducible builds and reliable dependencies.Next Steps
- Hello World guide: Create and deploy your first component
- CLI reference: Learn the asterai CLI commands
- Registry: Publish and discover components