Astrolab
A declarative framework for building AI agents with a focus on simplicity and extensibility.
Features
- Declarative Agent Definitions: Define agents using YAML for easy configuration
- Plugin System: Extend functionality with custom plugins
- OpenAI Integration: Built-in support for OpenAI models
- CLI Tool: Command-line interface for managing agents
- Easy Deployment: Simple deployment options for your agents
Installation
Using uv (recommended):
uv pip install astrolab
Using pip:
pip install astrolab
From source:
git clone https://github.com/yourusername/astrolab.git
cd astrolab
make setup
Quick Start
Create an Agent
Create a YAML file my_agent.yaml:
name: "My First Agent"
description: "A simple agent that responds to user queries"
model: "gpt-4o"
instructions: |
You are a helpful assistant that provides concise and accurate information.
Always be polite and professional in your responses.
functions:
- name: get_weather
description: "Get the current weather for a location"
parameters:
- name: location
type: string
description: "The city and state, e.g. San Francisco, CA"
required: true
Run the Agent
astrolab run my_agent.yaml
Create a Plugin
astrolab create-plugin my_plugin
This will create a plugin template in astrolab/plugins/my_plugin/.
Agent Configuration
Agents are defined using YAML files with the following structure:
name: "Agent Name"
description: "Agent description"
model: "gpt-4o" # OpenAI model to use
instructions: "System instructions for the agent"
functions:
- name: function_name
description: "Function description"
parameters:
- name: param_name
type: string # string, number, boolean, array, object
description: "Parameter description"
required: true # or false
Plugin Development
Plugins allow you to extend Astrolab with custom functionality. A plugin consists of:
- A plugin definition file
- One or more function implementations
Example plugin structure:
astrolab/plugins/my_plugin/
├── __init__.py
└── plugin.py
Example plugin implementation:
from astrolab.core.plugin import Plugin
class MyPlugin(Plugin):
name = "my_plugin"
version = "0.1.0"
def get_functions(self):
return [self.my_function]
def my_function(self, param1: str) -> str:
"""
My custom function
Args:
param1: A parameter
Returns:
A result string
"""
return f"Processed: {param1}"
CLI Commands
astrolab run <agent_file>: Run an agent from a YAML fileastrolab create-agent: Interactive agent creation wizardastrolab list-plugins: List available pluginsastrolab create-plugin <name>: Create a new plugin template
License
MIT
Metadata
Release files for astrolab 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| astrolab-0.1.0.tar.gz | 5.1 kB | Without provenance | Details for astrolab-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| astrolab-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for astrolab-0.1.0-py3-none-any.whl |
Total release size: 8.0 kB
Release files / astrolab-0.1.0.tar.gz
| Download URL | astrolab-0.1.0.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
492cd3d8dc424781c308bf25e7dd262cc35c4c4c631c6f8abbed79171ee48764
|
|
BLAKE2b-256 checksum How to use checksums |
dd51e0fc2ca702c53d8bc9176eca0bb25ddca0bb8b8a0b0d12f458875cbaa752
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.11
|
Release files / astrolab-0.1.0-py3-none-any.whl
| Download URL | astrolab-0.1.0-py3-none-any.whl |
|---|---|
| Size | 2.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
babb49ada4fea5253b22d1ee5c625cd0de5f75bac9e9c220182f6a771a1dfb5b
|
|
BLAKE2b-256 checksum How to use checksums |
c55fff89906ee2bd2c10294d1308e9424a58a21c107d8cf646402c48ff897142
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.11
|
Security for astrolab 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.