# Create a Agent Spec agent
from pyagentspec.agent import Agent
from pyagentspec.llms.openaicompatibleconfig import OpenAiCompatibleConfig
from pyagentspec.property import FloatProperty
from pyagentspec.tools import ServerTool
subtraction_tool = ServerTool(
name="subtraction-tool",
description="subtract two numbers together",
inputs=[FloatProperty(title="a"), FloatProperty(title="b")],
outputs=[FloatProperty(title="difference")],
)
agentspec_llm_config = OpenAiCompatibleConfig(
name="llama-3.3-70b-instruct",
model_id="/storage/models/Llama-3.3-70B-Instruct",
url="url.to.my.llm",
)
agentspec_agent = Agent(
name="agentspec_tools_test",
description="agentspec_tools_test",
llm_config=agentspec_llm_config,
system_prompt="Perform subtraction with the given tool.",
tools=[subtraction_tool],
)