spec-ai

Crates.iospec-ai
lib.rsspec-ai
version0.6.0-prerelease.12
created_at2025-11-12 18:06:47.35946+00
updated_at2026-01-04 05:08:25.718541+00
descriptionA framework for building AI agents with structured outputs, policy enforcement, and execution tracking
homepage
repositoryhttps://github.com/geoffsee/spec-ai
max_upload_size
id1929713
size225,439
Geoff Seemueller (geoffsee)

documentation

https://docs.rs/spec-ai

README

spec-ai

Public library crate for the spec-ai framework.

Overview

This is the main library crate that re-exports all public APIs from the spec-ai workspace crates. It provides a unified interface for building AI agent applications.

Features

Default Features

  • openai - OpenAI API integration
  • lmstudio - LM Studio local models
  • web-scraping - Web scraping capabilities
  • vttrs - Video/subtitle processing
  • api - HTTP API server
  • cli - Command-line interface

Optional Features

LLM Providers:

  • anthropic - Anthropic Claude API
  • ollama - Ollama local models
  • mlx - Apple MLX framework

Database:

  • bundled - Bundled DuckDB library (recommended)
  • duck-sys - System DuckDB library

Other:

  • integration-tests - Enable integration tests
  • axum-extra - Additional Axum web framework features

Installation

Add to your Cargo.toml:

[dependencies]
spec-ai = "0.5"

Or install the CLI:

cargo install spec-ai --features bundled

Usage

As a Library

use spec_ai::prelude::*;

// Your agent application code here

As a Binary

This crate also provides the spec-ai binary:

# Start interactive session
spec-ai

# Run a spec file
spec-ai run task.spec

# Use custom config
spec-ai --config custom.toml

Workspace Structure

This crate re-exports functionality from:

  • spec-ai-core - Agent runtime, tools, embeddings
  • spec-ai-config - Configuration management and persistence
  • spec-ai-knowledge-graph - Knowledge graph storage, vector clocks, types
  • spec-ai-policy - Policy engine and plugin system
  • spec-ai-api - HTTP API server
  • spec-ai-cli - Command-line interface

Documentation

For detailed documentation, see:

Examples

Example configurations and code can be found in the repository:

  • examples/configs/ - Configuration examples
  • examples/code/ - Code examples
  • specs/ - Example spec files

License

MIT License - see LICENSE or the main README for details.

Contributing

Create an issue or open a PR at the spec-ai repository.

Commit count: 0

cargo fmt