Use this file to discover all available pages before exploring further.
What this builds. A one-shot functional agent that takes a topic input, optionally searches the web, and returns a brief output.
You’ll end up with. A printed Markdown brief plus the run id, produced by a single agent.run(inputs=...) call.
from vectorshift.agent import Agent, AgentType, IoConfig, LlmInfofrom vectorshift.agent.tool import ToolInput, ToolInputTypefrom vectorshift.agent.tools import ExaAiTool# Create a toolsearch = ExaAiTool( tool_name="exa_ai_search", query=ToolInput(type=ToolInputType.DYNAMIC, description="Search query"),)# Create a functional agentagent = Agent.new( name="Topic briefing", type=AgentType.FUNCTIONAL, llm_info=LlmInfo(provider="openai", model_id="gpt-4o"), tools=[search], instructions=( "For the given topic, search the web if you need " "fresh facts, then write a short brief." ), inputs={ "topic": IoConfig(io_type="string", description="Subject to brief"), }, outputs={ "brief": IoConfig(io_type="string", description="Markdown brief"), },)print(f"Created agent: {agent.name}")# Run the agent with structured inputsresult = agent.run(inputs={"topic": "Solid-state batteries"})# Read the structured resultif result.status == "success": print(f"\nBrief:\n{result.outputs['brief']}")else: print(f"\nError: {result.error}")print(f"\nRun ID: {result.run_id}")# Clean upagent.delete()print("Done.")