# SimpleLLMFunc ## Docs - [Custom Interface](https://simplellmfunc.cn/advanced/custom-interface.md): Implementing LLM_Interface for non-OpenAI providers - [Harness Patterns](https://simplellmfunc.cn/advanced/harness-patterns.md): Production wrappers, custom state management, and supervisor architectures - [Runtime Primitives](https://simplellmfunc.cn/advanced/primitives.md): Extend the agent runtime with custom PrimitivePacks - [PyRepl](https://simplellmfunc.cn/advanced/pyrepl.md): Persistent Python REPL with runtime primitives and streaming output - [SelfRef Engineering](https://simplellmfunc.cn/advanced/selfref-engineering.md): Advanced patterns for fork orchestration, compaction strategies, and multi-key memory - [Builtins](https://simplellmfunc.cn/api/builtins.md): API reference for SelfReference, PyRepl, and FileToolset - [Context Types](https://simplellmfunc.cn/api/context-types.md): API reference for ContextState, CompileSource, all 10 ContextMutation types, and compiled outputs - [Decorators](https://simplellmfunc.cn/api/decorators.md): API reference for @llm_function, @llm_chat, and @tool - [Events](https://simplellmfunc.cn/api/events.md): API reference for all 14 event types, ReactOutput, and stream utilities - [Interfaces](https://simplellmfunc.cn/api/interfaces.md): API reference for LLM_Interface, OpenAICompatible, OpenAIResponsesCompatible, APIKeyPool - [Runtime](https://simplellmfunc.cn/api/runtime.md): API reference for PrimitivePack, PrimitiveRegistry, PrimitiveSpec, and related types - [Compile Pipeline](https://simplellmfunc.cn/context/compile-pipeline.md): How invocation config, transcript, and runtime patches become the final LLM request - [Runtime Patches](https://simplellmfunc.cn/context/mutations.md): The internal ContextMutation types used to patch the base transcript at compile boundaries - [Context Overview](https://simplellmfunc.cn/context/overview.md): The mental model: what IS context in SimpleLLMFunc and how data flows through the system - [SelfRef](https://simplellmfunc.cn/context/selfref.md): Durable context management: experiences, compaction, and forking through the SelfReference system - [Contributing](https://simplellmfunc.cn/contributing.md): How to contribute to SimpleLLMFunc - [Examples](https://simplellmfunc.cn/cookbook/examples.md): Categorized runnable examples from the SimpleLLMFunc repository - [TUI](https://simplellmfunc.cn/cookbook/tui.md): Build terminal chat interfaces with the @tui decorator - [Build Your First Agent](https://simplellmfunc.cn/first-agent.md): A tool-using agent with @llm_chat in 10 minutes - [Multi-Turn Chat](https://simplellmfunc.cn/first-chat.md): Build a streaming multi-turn chat with history management - [Abort](https://simplellmfunc.cn/guide/abort.md): Cancel running LLM calls and tool executions with AbortSignal - [Event Stream](https://simplellmfunc.cn/guide/events.md): ReactOutput, event types, and patterns for consuming the agent event stream - [@llm_chat](https://simplellmfunc.cn/guide/llm-chat.md): Multi-turn agents with history, tools, streaming, and SelfRef - [@llm_function](https://simplellmfunc.cn/guide/llm-function.md): Stateless typed LLM calls — one function, one result - [Tools](https://simplellmfunc.cn/guide/tools.md): Define tools with @tool, compose toolsets, and handle multimodal returns - [SimpleLLMFunc](https://simplellmfunc.cn/index.md): Build typed LLM agents with Python functions - [Configuration](https://simplellmfunc.cn/infra/config.md): provider.json, environment variables, and logging setup - [LLM Interface](https://simplellmfunc.cn/infra/llm-interface.md): OpenAICompatible, OpenAIResponsesCompatible, key pools, and rate limiting - [Observability](https://simplellmfunc.cn/infra/observability.md): Langfuse integration for tracing LLM calls and tool executions - [Context-Centric](https://simplellmfunc.cn/philosophy/context-centric.md): Why LLM context is compiled from invocation config, transcript, and runtime patches - [LLM is Function](https://simplellmfunc.cn/philosophy/llm-is-function.md): Why treating LLM calls as typed Python functions changes everything - [Prompt as Code](https://simplellmfunc.cn/philosophy/prompt-as-code.md): Why docstrings are system prompts and prompts should never be separated from code - [Quickstart](https://simplellmfunc.cn/quickstart.md): From zero to a working LLM function call in 5 minutes