Build and test an agent that researches a person's professional background and returns location, profession, and education fields.
Prerequisites
- A workspace where you can create and edit workflows.
- An available model that supports tool calls and structured output.
- Access to Exa and Linkup search tools. Use Sim-provided credentials where offered, or enter your own provider keys where prompted. Self-hosted deployments must supply the credentials they use.
Model and tool calls can incur usage charges. See Costs and Credentials for hosted credentials and your own keys.
Build the agent
Create a workflow
Click + beside Workflows in the sidebar. Right-click the new workflow, choose Rename, and name it
People research.The new workflow contains a Start block. Its built-in
inputfield receives messages from the workflow test chat; you do not need to add a custom field for this tutorial.Add and connect Agent
Open Toolbar and drag Agent into the workflow. Check that Start connects to Agent. If no connection appears, drag from Start's output handle to Agent's input handle.
Select Agent to open its fields in Editor. Choose a model that supports tools and structured output, and configure its credentials if prompted.
Configure Messages
In Messages, create these two messages. Use the role dropdown to choose System or User, and the plus button to add another message.
System
Code User
Code <start.input>inserts the message passed into Start. See References for using block outputs in another block.Add search tools
In Agent's Tools, open Add tool... and add Exa and Linkup. Select Exa's search operation and configure the fields shown for each tool, including credentials where required.
The agent chooses which tools to call. A tool with a missing credential or required setting can fail when the agent calls it.
Test and inspect the run
Click Open chat beside the workflow's More actions menu. This opens the workflow test chat, which has an Outputs dropdown. The Chat tab in the panel is where you talk to Sim about building the workflow.
In Outputs, select Agent → content. Send:
Code Expand Logs at the bottom of the builder and select Agent's row. Inspect its output, tool calls, and sources. Check that the results identify the intended person and support the returned facts.
Define structured output
In Agent's Response Format, paste this schema:
Code You can also use the generation control beside Response Format to create a schema from a description. Check the generated schema before running it.
personnames the schema. Its properties become outputs directly on Agent; it does not add a nestedpersonfield. Replace the System message with:Code Keep the User message set to
<start.input>.Verify the structured result
Send the same prompt in the workflow test chat. In Outputs, select Agent's
location,profession, andeducationfields. Open Agent's complete output in Logs and check their values before using them downstream.When the model returns the schema's fields as valid JSON, they are available as
<agent.location>,<agent.profession>, and<agent.education>. Structured output requests a shape; it does not verify the facts.
Fix a failed run
Select the failed block in Logs and read its error, input, and output. Check the credentials on the model or tool, then confirm that each reference points to an existing output. Rerun after correcting the failure. See Logs and debugging for tracing a failure through earlier blocks.
Related docs
- Agent block: Tools, memory, skills, and response formats.
- Connections: Pass outputs between blocks.
- Deploy a workflow: Expose the agent through an API, chat, or MCP server.
- Integrations: Configure tools for other services.