This commit is contained in:
tcmofashi
2026-04-03 23:18:30 +08:00
parent 185361f2c3
commit 7b9e1cf925
40 changed files with 52 additions and 86 deletions

View File

@@ -6,7 +6,7 @@ without the overhead of an Agent.
import asyncio
from agentlite import LLMClient, llm_complete, llm_stream
from agentlite import LLMClient
from agentlite.config import AgentConfig, ProviderConfig, ModelConfig
@@ -55,7 +55,7 @@ async def main():
)
# Create client
client = LLMClient(config)
LLMClient(config)
# Make a call
# response = await client.complete(
@@ -91,7 +91,7 @@ async def main():
temperature=0.8,
)
client = LLMClient(provider=provider)
LLMClient(provider=provider)
# response = await client.complete(
# user_prompt="What are the benefits of type hints?",

View File

@@ -6,8 +6,7 @@ This example shows how to use skills with an Agent.
import asyncio
from pathlib import Path
from agentlite import Agent, OpenAIProvider
from agentlite.skills import discover_skills, index_skills_by_name, SkillTool
from agentlite.skills import discover_skills, index_skills_by_name
async def main():

View File

@@ -7,7 +7,6 @@ and delegate tasks to them using the Task tool.
import asyncio
from agentlite import Agent, OpenAIProvider
from agentlite.labor_market import LaborMarket
from agentlite.tools.multiagent.task import Task
@@ -61,8 +60,8 @@ async def main():
parent.tools.add(Task(labor_market=parent.labor_market))
print("Created parent agent with subagents:")
print(f" - coder: Writes code")
print(f" - reviewer: Reviews code")
print(" - coder: Writes code")
print(" - reviewer: Reviews code")
# Example 2: Using subagents
print("\n=== Example 2: Delegating Tasks ===")

View File

@@ -7,7 +7,6 @@ to enable/disable specific tools.
import asyncio
from pathlib import Path
from agentlite import Agent, OpenAIProvider
from agentlite.tools import (
ConfigurableToolset,
ToolSuiteConfig,
@@ -57,7 +56,7 @@ async def main():
)
)
toolset = ConfigurableToolset(config)
print(f"File tool settings:")
print("File tool settings:")
print(f" Max lines: {config.file_tools.max_lines}")
print(f" Max bytes: {config.file_tools.max_bytes}")
print(f" Allow outside work dir: {config.file_tools.allow_write_outside_work_dir}")
@@ -66,7 +65,7 @@ async def main():
print("\n=== Example 5: Using with Agent ===")
# Create a safe configuration (no shell, no write outside work dir)
safe_config = ToolSuiteConfig(
ToolSuiteConfig(
file_tools=FileToolsConfig(
allow_write_outside_work_dir=False,
),