# Lighter > A lightweight TypeScript AI agent framework. Currently in alpha. Start with the quickstart, then explore the guides and API reference. - [Lighter](/docs/): Lighter is a lightweight TypeScript framework for building AI agents. It handles the loop between model calls and tool execution so you can build an agent with just a few lines of code. - [Quickstart](/docs/getting-started/quickstart/): Connect to a model and get your first reply with a minimal example. This guide uses OpenAI and requires Node.js 22+ and a TypeScript project configured for ESM. - [Core concepts](/docs/getting-started/concepts/): Six components cover the main ideas in Lighter: Provider, Model, Agent, Message, Tool, and Hook. - [Configure an agent](/docs/guides/configuration/): Only model is required when creating an Agent. Add tools, a system prompt, and lifecycle hooks as needed. - [Add tools](/docs/guides/tools/): Tools let the model call functions you define. You describe the tool and implement its logic; Agent validates arguments, runs the function, and returns the result to the model. - [Manage messages and conversation history](/docs/guides/conversations/): Lighter does not automatically save conversations. Pass existing history into each run, then append the new messages from its result to continue the conversation. - [Stream responses](/docs/guides/streaming/): Use stream() instead of run() to receive text as the model generates it. Both methods execute the same tool loop. - [Use lifecycle hooks](/docs/guides/hooks/): Hooks let you read or modify requests and results at specific points. Use them for logging, input preprocessing, and response checks. - [Handle errors](/docs/guides/errors/): Agent uses status to indicate whether a run completed. When a model or hook fails, check the result before reading error. - [Choose and configure a provider](/docs/providers/): Providers connect to model services. After switching providers, you still use the same message and tool interfaces through Model and Agent. - [Custom providers](/docs/providers/custom/): Implement the Provider interface and pass it to new Model(provider) to connect another model service. Agent does not need to know the service's specific API. - [Use Model directly](/docs/advanced/model/): Use Model directly when you need a single model call or want to control tool execution yourself. - [Runtime limits and application responsibilities](/docs/advanced/limits/): Lighter handles the core loop between the model and tools. Your application adds storage, execution limits, permissions, and monitoring as needed. - [Agent API](/docs/reference/agent/): This page covers Lighter 0.1.0. For usage, see configure an agent and streaming. - [Model and Provider API](/docs/reference/model-and-providers/): For usage, see use Model directly, built-in providers, and custom providers. - [Messages API](/docs/reference/messages/): Messages use role to identify their purpose. For usage, see conversation history. - [Tool API](/docs/reference/tools/): Tool wraps parameter validation, function execution, and tool results. For usage, see add tools. - [Hooks API](/docs/reference/hooks/): All four hook classes share the same construction pattern. For a working example, see lifecycle hooks. - [Errors API](/docs/reference/errors/): For usage, see error handling. Built-in providers use ModelError for recognized model-call errors. [Full documentation](/llms-full.txt)