Getting Started
Get Marlo running with your agent in under 5 minutes.
Create an Account
- Go to marshmallo.ai
- Click Get Started and create your account
- Set up an organization
- Create a project within your organization
Note: Marlo is currently in beta. For early access, reach out to hello@marshmallo.ai.
Get Your API Key
- Navigate to your dashboard and click Create Project
- A project represents a single agentic system
- If you have multiple agents, create one project per system
- Go to Settings → Project for your project
- Copy the API key displayed on this page
- Add it to your environment:
export MARLO_API_KEY=your_api_key_hereOr add to your .env file:
MARLO_API_KEY=your_api_key_hereInstall the SDK
Python
pip install marlo-sdkTypeScript
npm install @marshmallo/marloWrap Your Agent
Python
import os
import marlo
from openai import OpenAI
# Initialize
marlo.init(api_key=os.getenv("MARLO_API_KEY"))
marlo.instrument_openai()
# Register your agent
marlo.agent(
name="my-agent",
system_prompt="You are a helpful assistant.",
tools=[],
mcp=[],
)
# Wrap your agent logic
client = OpenAI()
with marlo.task(thread_id="user-123", agent="my-agent") as task:
task.input("What is 2 + 2?")
response = client.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": "What is 2 + 2?"}]
)
task.output(response.choices[0].message.content)
marlo.shutdown()TypeScript
import * as marlo from '@marshmallo/marlo';
import OpenAI from 'openai';
// Initialize
await marlo.init(process.env.MARLO_API_KEY!);
// Register your agent
marlo.registerAgent(
'my-agent',
'You are a helpful assistant.',
[],
[],
);
// Wrap your agent logic
const client = new OpenAI();
const task = marlo.task('user-123', 'my-agent').start();
task.input('What is 2 + 2?');
const response = await client.chat.completions.create({
model: 'gpt-4',
messages: [{ role: 'user', content: 'What is 2 + 2?' }],
});
task.llm({
model: 'gpt-4',
usage: {
input_tokens: response.usage?.prompt_tokens || 0,
output_tokens: response.usage?.completion_tokens || 0,
},
});
task.output(response.choices[0].message.content || '');
task.end();
await marlo.shutdown();View Results
After running your agent:
- Go to your project in the Marlo dashboard
- Click on Threads to see your conversations
- Click into a task to see the full trace
- Watch as Rewards score your agent’s performance
- Check Learnings to see guidance generated from your agent’s behavior
Try Without Code: Marlo Inbox
Want to see Marlo in action without integrating your own agent? Try Marlo Inbox, a complete email and calendar assistant that demonstrates the full learning loop.
Quick Start
git clone https://github.com/Marshmallo-AI/marlo-inbox.git
cd marlo-inbox
cp .env.example .env
# Fill in your credentials in .env
make install-all
make dev # Python version
# or: make dev-ts-full # TypeScript versionOpen http://localhost:5173, sign in with Google, and start chatting. Within 10-15 interactions, you’ll see learnings appear that improve the agent’s behavior.
See the Marlo Inbox README for detailed setup instructions.
What’s Next?
Now that you’re capturing data, explore:
- Python SDK - Full SDK documentation for Python
- TypeScript SDK - Full SDK documentation for TypeScript
- Tracing - Understand what gets captured
- Rewards - How tasks are evaluated
- Learnings - How guidance is generated and applied
Last updated on