-
Notifications
You must be signed in to change notification settings - Fork 143
FAQ
LightAgent is a lightweight Python framework for building agents with tools, memory, MCP integrations, Skills, Tree-of-Thought planning, structured results, tracing, deterministic LightFlow workflows, and simple multi-agent routing.
LightFlow is the v0.8.0 workflow layer for deterministic multi-step agent execution. It lets you define named steps, dependencies, per-step retries, output passing, and flow-level trace events.
from LightAgent import LightFlow
flow = (
LightFlow()
.step("research", agent=research_agent)
.step("write", agent=writer_agent, depends_on=["research"])
)
result = flow.run("Analyze this company", trace=True)See LightFlow.
Yes. It returns a string by default.
response = agent.run("hello")
print(response)Structured results are opt-in:
result = agent.run("hello", result_format="object")
print(result.content)Yes. It still returns the legacy stream generator by default.
for chunk in agent.run(query, stream=True, user_id=user_id):
print(chunk, end="")Structured streaming events are opt-in:
for event in agent.run(query, stream=True, user_id=user_id, result_format="event"):
print(event.type, event.data)Any provider that exposes an OpenAI-compatible chat completion endpoint can work. This includes OpenAI, OpenRouter, DeepSeek-compatible endpoints, Qwen-compatible endpoints, vLLM, llama.cpp server mode, and Ollama's OpenAI-compatible API.
Define a Python function and attach tool_info. See Tools.
Pass an object that implements store(data, user_id) and retrieve(query, user_id). See Memory.
Create an mcp_settings dictionary and call asyncio.run(agent.setup_mcp(mcp_setting=mcp_settings)). See MCP.
Tools perform actions. Skills provide reusable task instructions and can include references, scripts, and assets. A Skill can call tools, but a Skill itself is mainly an instruction and resource package.
Use result_format="object" and trace=True:
result = agent.run("hello", result_format="object", trace=True)
print(result.trace)For local logs, create the agent with debug=True.
Common causes:
- the selected model does not support function calling
-
tool_infois missing or malformed - required parameters do not match function arguments
- the tool description is too vague
- the tool raises an exception during execution
LightAgent Wiki - see the repository, releases, and issues.
- Home
- Quick Start
- Core Concepts
- API Reference
- Examples Cookbook
- Migration Guide
- Tools
- Tool Generator
- Memory
- MCP
- Skills
- LightFlow
- Tree of Thought
- Self-Learning
- Multi-Agent
- Tracing and Debugging
- Langfuse Observability
- Model Providers
- browser-use Integration
- Testing and CI
- Deployment Guide
- Architecture
- Security
- Known Limitations
- FAQ
- FAQ 中文
- Roadmap
- Release Process
- Contributing