Platform Quickstart
This guide will help you get started with the Tiptree Platform.
Installation
Section titled “Installation”You will need Python 3.10 or later installed on a Unix-like environment (Linux, MacOS, or Windows WSL).
Make sure to activate your virtual environment, then install the Python client:
$ pip install tiptree---> 100%Successfully installed tiptreeSign in or sign up for an account
Section titled “Sign in or sign up for an account”You can sign up for an account from the command line using the signup command:
$ tiptree signupDuring signup, you will be:
- Asked for your email, first name, and optional last name
- Sent a verification code to your email
- Prompted to create an API key
- Given the option to save your credentials to
~/.tiptreerc/credentials
Your API key will look like tiptree-<some-random-string>. Please make sure to save this key securely as it won’t be shown again.
If you already have an account, you can sign in using the signin command:
$ tiptree signinYou will have the option to create an API key and save your credentials.
Using the API
Section titled “Using the API”Using the official Python Client
Section titled “Using the official Python Client”Here is how you would create an agent and send a message to it using the Python client:
from tiptree import Agent
# Create an agentagent = Agent.get_or_create()
# Create an agent sessionsession = agent.create_agent_session()
# Send message to sessionsent_message = session.send_message("What's the weather like in Berlin right now?")
# Wait for the responsereceived_message = session.wait_for_next_message()print(received_message.content)Let’s break this down. The first step is to create an agent:
agent = Agent.get_or_create()This will create an agent if it doesn’t exist, otherwise it will return the existing agent.
Agents are the primary resource in the Agent Runtime Platform. Each agent can have multiple sessions, which are like “conversations” with the said agent. Each agent session can in turn have multiple messages.
To create an agent session, you can use the create_agent_session method.
session = agent.create_agent_session()This is also where you can optionally pass in special context for the session. For example:
session = agent.create_agent_session( initial_prompt="The user is an AI engineer interested in building agents.")We recommend using the initial_prompt to provide additional context for the session. Instructions for the agent are best passed in as a message to the session:
sent_message = session.send_message( "What's the weather like in Berlin right now?")Finally, we wait for the response from the agent:
received_message = session.wait_for_next_message()print(received_message.content)This should print the response:
Currently in Berlin, it's 9.6°C (feels like 8.3°C) with clear skies. The conditions are:- Wind: 2.7 m/s from the west-northwest- Humidity: 25%- Visibility: 10 km- Air pressure: 1030 hPa
It's a sunny day with no cloud cover. The sun will set at around 18:15 local time.Task Whitelisting and Blacklisting
Section titled “Task Whitelisting and Blacklisting”You can also choose to equip your agent with a subset of tasks by specifying a whitelist of tasks when creating the agent. For example, to create an agent equipped with only web search and web browsing tasks, you can do the following:
agent = Agent.create( name="My Agent", task_whitelist=[ "tiptree-systems/web-search/search", "tiptree-systems/web-browser/answer-from-url", ])This will equip the agent with only the specified tasks and prevent it from using any other tasks. This means that all sessions created by this agent will only have access to these tasks.
Of course, you may also update the task whitelist at any time. For example, to update the task whitelist to include all tasks, you can do the following:
agent.update( task_whitelist=["*/*/*"])Finally, you can also choose to blacklist certain tasks. For example, to blacklist the tiptree-systems/web-browser/open-url task, you can do the following:
agent.update( task_blacklist=["tiptree-systems/web-browser/open-url"])Memory Use
Section titled “Memory Use”Agents in the runtime have two types of memory capabilities:
-
Basic Memory: The ability to read from and write to their memory store. This allows agents to maintain context across sessions and recall specific information when needed.
-
Associative Recall (Remembrance): A more sophisticated capability that allows agents to perform associative recall, similar to how humans naturally remember related concepts. This is based on the concept of Remembrance Agents.
You can control these capabilities independently:
- Setting
enable_memory=Falsedisables all memory operations (both read and write) - Setting
enable_remembrance=Falsedisables only associative recall while preserving basic memory operations
For example, to completely disable memory:
agent.update(enable_memory=False)To disable associative recall while preserving basic memory operations:
agent.update(enable_remembrance=False)You may also set these options when creating an agent. For example:
agent = Agent.create( name="My Agent", enable_memory=False, enable_remembrance=False)This creates an agent that does not reuse any information between sessions.
Using cURL
Section titled “Using cURL”The API itself is available via curl. API reference available here.