For developers
Build agents in ordinary Python.
The mAIvn SDK turns the functions you already write into tools an agent can use. The platform runs them with your approvals, private-data controls and a record of every step.
Available to businesses in the United States.
For developers
Your first agent, in one file.
Install the SDK, save the file, run it. The same steps work on macOS, Linux and Windows.
macOS
python3 -m venv .venv
source .venv/bin/activate
python -m pip install maivn
export MAIVN_API_KEY=your-runtime-key
python weather_app.pyLinux
python3 -m venv .venv
source .venv/bin/activate
python -m pip install maivn
export MAIVN_API_KEY=your-runtime-key
python weather_app.pyWindows
python -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install maivn
$env:MAIVN_API_KEY = 'your-runtime-key'
python weather_app.pyRunning it calls the hosted platform and can use plan allowance. Python 3.10 or newer.
import os
from maivn import Agent
from pydantic import BaseModel, Field
# 1. Write a typed tool with a clear description.
def get_weather(city: str) -> dict[str, str | int]:
"""Return the weather fixture for Austin, in degrees Fahrenheit."""
if city.casefold() != 'austin':
return {'error': 'The fixture contains only Austin.'}
return {'city': 'Austin', 'temperature': 72, 'condition': 'sunny'}
# 2. Define the answer fields your application needs.
class WeatherReport(BaseModel):
city: str = Field(description='City returned by the weather tool.')
temperature: int = Field(description='Temperature in degrees Fahrenheit.')
summary: str = Field(description='A short summary of the tool result.')
# 3. Give the agent a plain tools list.
agent = Agent(
name='Weather Assistant',
api_key=os.environ['MAIVN_API_KEY'],
system_prompt='Call get_weather for the requested city. Answer from its result.',
tools=[get_weather],
)
# 4. Invoke with the answer model.
response = agent.invoke(
'What is the weather in Austin?',
structured_output=WeatherReport,
)
# 5. Read the typed result.
report = response.result
print(report.city, report.temperature, report.summary)Inside mAIvn Studio
The real run, with the code behind it.
A customer’s order arrived damaged. Watch the agent check the policy, stop to ask you, and create the replacement only after you approve.
Ask the agent to sort out a damaged order, and to check with you before it acts.
Studio · Desktop · dark. Narrated live model and human approval. Sample orders in a local demo store. Pauses trimmed.
- The request. A customer’s order arrived damaged, and their photo is on file. Ask the agent to check whether it qualifies and to get your approval before creating a replacement.
- Policy check. The agent reads the request and looks up the order. The sample order qualifies for a free replacement under the store’s policy. Creating it still needs a person to say yes.
- Your approval. Studio stops the run before anything happens. Check the replacement, the $0 charge to the customer, and the delivery estimate. Choose Yes and submit to go ahead, or No to decline. The model cannot give this approval for you.
- The result. Once you approve, the tool saves replacement RPL-1042 in the local demo store. The finished run keeps your decision and every step the agent took. This is a real model and approval workflow using sample orders. No customer email or physical shipment is sent.
Recorded v2 walkthrough. Real model. Human approval. Sample order. Interface may differ from the current app.
The code behind the demo.
You define the tools and rules. mAIvn handles the execution, human approvals, and trace.
10 lines declare this approval step.
The platform
Connect your agents.
Control how they work.
mAIvn connects a model to the systems your product uses. You define what agents can access and how their work is checked.
At the surface: your product
- Route
Choose a model for each job
Pick a model and reasoning level for the task. Keep the same integration as your product grows.
- Connect
Give agents usable tools
Connect agents to services that need a sign-in. Limit their access to what the job needs.
- Protect
Control what agents access
Hold back the fields you mark private. Agents see placeholders for those values while using the rest of the context.
- Coordinate
Carry multi-step work through
Memory, teams of agents, retries and your approvals all belong to one run.
- Verify
Check the result
Check that the answer comes back in the shape you asked for, and judge the work before it moves on.
- Operate
Understand what happened
Open a run in Studio to inspect its tool calls and decisions. See what each step returned.
Six layers down: the foundation
Privacy control, not certification: mAIvn holds no SOC 2, HIPAA, ISO 27001, or FedRAMP certification. The Terms and the Disclaimer set out what mAIvn does and does not cover.
The full picture
See everything mAIvn does.
Read the full feature reference, from writing your first agent to inspecting a run. Each capability includes a plain-language explanation and a note for developers.