Skip to main content

Runner that provisions Azure OpenAI assistants from YAML configs

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

LMSpace MVP

The LMSpace MVP provisions Azure OpenAI assistants from YAML config files. Each config describes a custom GPT-style agent with instructions and knowledge-base sources. The runner downloads the referenced files, uploads them to Azure OpenAI using the Assistants API (file search), and optionally registers a Microsoft Agent Framework agent when the framework is available.

The project uses uv for dependency and environment management.

Repository Layout

  • src/lmspace/ - Package sources
  • tests/ - Unit tests
  • configs/ - Example YAML configs
  • docs/ - Design and planning documents

Prerequisites

  • Python 3.12+
  • uv installed locally (pip install uv)
  • Azure OpenAI resource with Assistants API v2 enabled
  • Optional: Microsoft Agent Framework preview packages

Before provisioning real assistants, set the following environment variables:

  • AZURE_OPENAI_ENDPOINT
  • AZURE_OPENAI_API_VERSION
  • AZURE_OPENAI_DEPLOYMENT_NAME
  • AZURE_OPENAI_API_KEY (or rely on Azure AD with DefaultAzureCredential)

Optional environment variables:

  • GITHUB_TOKEN for private GitHub file downloads
  • LMSPACE_VECTOR_PREFIX to customize vector store names
  • LMSPACE_LOG_LEVEL for logging (default info)

Getting Started

# Create the environment using uv
uv venv

# Install the package in editable mode with development tools
uv pip install -e . --extra dev

# Provision assistants from a config file or directory (dry-run shown)
lmspace --dry-run configs/sample-agent.yaml

Run without --dry-run after configuring Azure credentials to perform real provisioning.

YAML Config Format

name: SampleAgent
instructions: |
  You are a helpful assistant that answers questions about the example files.
urls:
  - https://raw.githubusercontent.com/github/gitignore/main/Python.gitignore

Each urls entry should point to a text or binary document Azure OpenAI accepts for file search. The runner downloads the files, uploads them to Azure, creates a vector store, and wires it into a new assistant using your deployment.

Development

# Install deps (from repo root)
uv pip install -e . --extra dev

# Run tests
uv run --extra dev pytest

The code lives under src/lmspace. Key modules:

  • config.py - Validates YAML configs
  • fetcher.py - Downloads remote knowledge sources
  • azure.py - Wraps Azure OpenAI assistant provisioning
  • runner.py - Glues everything together
  • cli.py - Command-line entry point

Microsoft Agent Framework Integration

If the agent_framework preview package is installed, the runner attempts to create a matching Agent Framework agent via AzureOpenAIResponsesClient. When the package is absent, the MVP logs the omission and still provisions the Azure OpenAI assistant.

Testing Notes

Unit tests cover YAML parsing, remote fetch behaviour, and runner orchestration. Azure calls are mocked by injecting stub services, so tests run without Azure credentials.

Next Steps

  1. Add richer error handling and telemetry around Azure operations.
  2. Persist vector store and assistant identifiers for incremental updates.
  3. Extend the runner to handle incremental syncs and deletions.
  4. Package and publish to PyPI once the Agent Framework dependencies stabilise.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lmspace-0.1.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lmspace-0.1.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file lmspace-0.1.0.tar.gz.

File metadata

  • Download URL: lmspace-0.1.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for lmspace-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a6f8ff5f0c82b49a14ba9dfe99f128ee108b277f845dd33b444e30ab3a4843fd
MD5 269fb7efbebcf060b0a265d09b5261c9
BLAKE2b-256 27c857f6d1de72af26f6979c551173e832901fc62b67db6e29c410dc9cd660a6

See more details on using hashes here.

File details

Details for the file lmspace-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lmspace-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for lmspace-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b86b1d97ebfa7fb7276724f9bb5d2f245e6ce9e49a543bf2b166b530f9b441a1
MD5 4a6cd174f209fa663d804c2085b814cb
BLAKE2b-256 e94fa8b5282649dcfdf364dd9575c4e76c0d7113777f12728029fa64a8f1503c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page