Skip to main content
The ai-agent template ships Python 3.10 + Node.js 20 plus the major LLM and agent SDKs preinstalled in one resolved pip set:
  • LLM clients: openai, anthropic, litellm
  • Agent frameworks: langchain + langchain-openai + langchain-anthropic, crewai, autogen-agentchat, llama-index-core + llama-index-llms-openai, haystack-ai, pydantic-ai-slim
  • Helpers: instructor, tiktoken, tenacity
  • MCP: mcp, fastmcp
  • Storage / tracing: chromadb, arize-phoenix, opentelemetry
Pick it whenever your sandbox runs an LLM-driven agent — it removes a 30–60s pip install from every cold boot.
Heavy ML deps (torch, transformers, sentence-transformers) are intentionally not included to keep the image small. Use the OpenAI / Anthropic embedding APIs (already wired through llama-index-embeddings-openai) when you need embeddings, or build a custom template for local inference.

What you’ll learn

  • Picking template="ai-agent" to skip framework pip install steps
  • Verifying the agent-SDKs import cleanly inside the sandbox
  • Running a minimal LangChain expression (without an LLM call) to prove the framework is wired up

Prerequisites

This example does not call any LLM — it only verifies the SDKs load. For a full LLM-in-sandbox example, see Cookbook → LLM Providers.

Code

Expected output

When you actually run LLM calls from inside an ai-agent sandbox, attach a SecurityPolicy with PII redaction + a network allowlist scoped to your LLM provider. See Agent-in-Sandbox → Fully Secured for a worked example with all four guardrails enabled.