Getting Started

To show you the power of context agents, let's take a workable example. For household and corporate budgets, there are a range of micro and macro-economic factors that can play a part in spending.

What if we could get the most accurate economic statistics and use them in data analysis? Let's do it. For economic data we will use FRED.

FRED stands for Federal Reserve Economic Data. FRED contains frequently updated US macro and regional economic time series at annual, quarterly, monthly, weekly, and daily frequencies. FRED aggregates economic data from a variety of sources — most of which are US government agencies.

Step 1

Initialize Your Agent

Create an empty directory that will hold your agent, or open the agent in the playground. You can add or create a 'SystemPrompt.md' which will be used as the instructions for the agent.

Try asking:"What can you help me with?"
Open in Playground →
Opening an empty playground
Adding system prompts in playground
Step 2

Hello World

Drop in an OpenAPI spec and the agent immediately understands the shape of the API — endpoints, parameters, and response types. It can now reason about how to call the service, even before any code is written. Next, test connectivity and ask the agent to develop a JavaScript function to access monthly statistics. The agent explores the JavaScript environment, determines how to call the API, and creates its own tools file that it can continue to reference.

Try asking:"Test connectivity and develop a javascript function to access monthly statistics"
Open in Playground →
Creating tools with the agent
Step 3

Adding More Context

You can add more context too. You don't have to follow a special setup for skills — just add new markdown in a directory. The agent has access to the tree and it will understand whether it wants to go search out those documents or not.

Try asking:"What additional context do you have access to?"
Open in Playground →
Adding context documents to the agent