Build a Company Profile Research Agent

This workflow shows how to build a business research helper that takes a company name and returns a sourced company profile. It is useful when sales, partnerships, strategy, or recruiting teams need a fast briefing before a meeting, account review, or market scan.

Want the full recipe? Here is the reusable guide an AI builder can follow.

You can also try the finished agent for yourself here if your organization has access.

What You Are Building

You are building an AI agent that researches a company, checks current web sources, and writes a short Markdown profile your team can review. Instead of asking a chatbot a one-off question, the business gets a reusable workflow with a predictable input and predictable outputs.

The agent accepts a company name such as PubNub, researches it with web search, and returns a profile with snapshot facts, products, customers, business model, competitors, recent signals, leadership notes, risks, and sources.

What the Tools Do

  • Blocks is a network for running AI agents and connecting one agent to another, so work can move between specialized agents instead of living in a single chatbot. In this workflow, Blocks receives the company name, sends it to the research agent, and returns the finished Markdown report.
  • Railway is where the agent runs continuously online. Think of it as the always-on home for the worker that waits for Blocks tasks.
  • OpenAI is the language model service. The agent uses OpenAI’s web search capability to find current information, summarize evidence, and draft the company profile.
  • GitHub is where reusable instructions can be stored so another person or AI assistant can rebuild the workflow later.
  • An API key or token is a private password-like credential that lets the agent use a service such as Blocks, OpenAI, or Railway. These credentials should be stored in environment variables, not copied into documents or source code.
  • A CLI, or command-line interface, is a setup tool used by the builder to deploy, register, and test the agent.

What the Guide Gives You

The linked guide gives an AI builder enough detail to:

  • Recreate the Blocks agent project structure.
  • Configure the agent card, input schema, and output artifacts.
  • Implement the OpenAI web-search-backed research handler.
  • Deploy the provider worker to Railway.
  • Register the agent on Blocks as a private, free agent.
  • Run an end-to-end test and inspect logs.
  • Avoid common mistakes with secrets, private-agent org access, and registration order.

Before You Start

  • Blocks account, so the agent can be registered and called by other agents or workflows.
  • Railway account, so the agent can run continuously online.
  • OpenAI API key with billing access, so the agent can perform web-search-backed research.
  • GitHub access, if you want to publish reusable instructions or source code.
  • Node.js and npm, so the project can install dependencies and run locally.
  • Blocks CLI and Railway CLI, so the builder can register the agent and deploy the worker.
  • Required environment variables: BLOCKS_API_KEY and OPENAI_API_KEY.
  • Optional tuning variables: OPENAI_MODEL and OPENAI_SEARCH_CONTEXT_SIZE.
  • Permission to use web search and external AI services for the companies you research.

How It Comes Together

First, create a small Blocks provider agent with one input: the company name. The output should be a Markdown company profile and a JSON metadata artifact.

Next, implement the research logic. The agent asks OpenAI to use web search, prefer reliable sources, and return a consistent profile format with links.

Then, deploy the agent to Railway as a long-running worker. Railway keeps the agent online so Blocks can send it tasks.

After the worker exists, register the agent on Blocks. Registration tells Blocks the agent name, input fields, output artifacts, and how consumers should call it.

Finally, run a real test. In the reference project, the deployed agent successfully researched PubNub and returned a sourced Markdown profile through Blocks.

Starter Prompt

Use this reusable skill file:
https://raw.githubusercontent.com/CagedEther/agentic-business-schooled/refs/heads/main/company-profile-research-agent-skill.md

Build or adapt a Blocks agent that researches a company by name and returns a sourced Markdown company profile.

Company to test with: [COMPANY NAME]
Deployment target: Railway
Blocks listing: private and free unless I say otherwise

Make sure prerequisites are visible, secrets are never printed, and the final test returns a Markdown profile artifact.

What a Good Result Looks Like

A good result is not just a running script. It is a registered Blocks agent, hosted on Railway, that accepts a company name and returns a clear profile with source links.

The profile should be easy for a business reader to scan. It should distinguish confirmed facts from uncertain or missing details, include recent signals where available, and avoid unsupported claims.

The deployment should be stable. Railway should show a successful deployment and a running instance, and Blocks should be able to create a task and receive the company_profile artifact.

Use It Responsibly

Company profiles created this way are research drafts, not legal, financial, or investment advice. Review important claims before using them in customer conversations, market analysis, or executive decisions.

OpenAI web search can cost money and take time. Keep the report scope focused, avoid unnecessary repeated tests, and use the smallest search depth that gives useful results.

Do not send private customer data, confidential target lists, or sensitive strategy notes into the workflow unless your organization’s data policies allow it.

What to Try Next

Connect this company profile agent to a second agent that writes meeting prep notes, sales discovery questions, or account strategy recommendations from the finished profile.