Getting Started¶
This guide takes you from a fresh Python environment to a running JarvisCore agent in under ten minutes. It covers installation, initial configuration, and your first working agent.
Requirements¶
JarvisCore requires Python 3.10 or later. No infrastructure is required to run a minimal agent. The first working example in this guide uses only an LLM API key.
Optional: Docker is required for two capabilities:
jarviscore nexus upstarts the local Nexus broker and gateway for OAuth2 credential managementjarviscore-framework[browser]runs Playwright in a Docker-managed Chromium for browser automation
If you are not using Nexus or browser automation, Docker is not needed.
Installation¶
To install optional extras for specific capabilities:
P2P_ENABLED=true.
REDIS_URL is set.
BrowserSubAgent and Playwright-based web interaction tools. Required when BROWSER_ENABLED=true.
browser + rag + BeautifulSoup4. Everything ResearcherSubAgent needs for deep web research.
ATHENA_URL=http://localhost:8080.
azure_storage atoms.
/metrics endpoint for operational dashboards and alerting.
Scaffold Your Project¶
Run jarviscore init to create the initial project structure and a pre-populated .env.example:
This creates:
Copy the example to create your working configuration:
Configure an LLM Provider¶
JarvisCore supports four LLM providers. Configure exactly one by adding the appropriate variables to your .env file.
Verify Your Installation¶
This command validates your Python version, package installation, and LLM configuration. To also test live inference against the configured provider:
Expected output when everything is correctly configured:
======================================================================
JarvisCore Health Check
======================================================================
[System Requirements]
Python Version: 3.12.2
JarvisCore Package: v1.3.0
[Dependencies]
pydantic: Core validation
pydantic_settings: Configuration management
[LLM Configuration]
Claude: CLAUDE_API_KEY=sk-a...key
[LLM Connectivity Test]
Claude API: Connected
All checks passed. Ready to use JarvisCore.
Choose Your Agent Profile¶
JarvisCore ships exactly two agent profiles. This is the first decision in every project:
AutoAgent |
CustomAgent |
|
|---|---|---|
| Who brings the logic | The framework: LLM reasoning, sandboxed code generation, self-repair | You: plain Python in execute_task |
| You write | role, capabilities, system_prompt |
The implementation |
| Use for | Tasks you can describe: research, analysis, content, data extraction | Logic you can code: API workers, wrapping existing services, deterministic pipelines |
| Guide | AutoAgent guide | CustomAgent guide |
Both run on the same mesh and mix freely in one system. Not sure? Start with AutoAgent below; switch any agent to CustomAgent later without touching the rest.
Your First Agent¶
Create a file named main.py:
import asyncio
from jarviscore import Mesh, AutoAgent
class ResearcherAgent(AutoAgent):
name = "Researcher"
role = "researcher"
description = "Researches topics and produces concise summaries."
system_prompt = """
You are a systematic research analyst. When given a topic,
you identify the most relevant facts, verify them against
multiple angles, and summarise your findings clearly.
"""
async def main():
mesh = Mesh()
mesh.add(ResearcherAgent)
await mesh.start()
result = await mesh.run_task(
agent="researcher",
task="What are the main architectural differences between the SWIM and Raft consensus protocols?",
)
print(result)
if __name__ == "__main__":
asyncio.run(main())
Run it:
The agent will reason through the task using the OODA loop and return a structured response. Because no infrastructure is configured beyond the LLM key, all state is held in process memory and discarded when the script exits.
The same agent as a CustomAgent, when you want to own the logic instead of describing the task:
from jarviscore.profiles import CustomAgent
class ResearcherAgent(CustomAgent):
role = "researcher"
capabilities = ["research"]
async def execute_task(self, task):
findings = await my_research_pipeline(task["task"]) # your code
return {"status": "success", "output": findings}
Everything else on this page works identically for both profiles.
Your First Multi-Agent Workflow¶
The following example demonstrates a two-agent pipeline where a Scout gathers raw data and an Analyst processes it.
import asyncio
from jarviscore import Mesh, AutoAgent
class ScoutAgent(AutoAgent):
name = "Scout"
role = "scout"
description = "Gathers raw data on a given subject."
system_prompt = "You gather raw, factual data on the subject provided. Be thorough and cite your sources."
class AnalystAgent(AutoAgent):
name = "Analyst"
role = "analyst"
description = "Analyses data and produces structured intelligence reports."
system_prompt = "You receive raw research data and produce a structured intelligence report with clear conclusions."
async def main():
mesh = Mesh()
mesh.add(ScoutAgent)
mesh.add(AnalystAgent)
await mesh.start()
# Step 1: Scout gathers raw data
raw_data = await mesh.run_task(
agent="scout",
task="Gather data on the current state of vector database technology.",
)
# Step 2: Analyst processes the raw data
report = await mesh.run_task(
agent="analyst",
task=f"Analyse the following research data and produce a structured report:\n\n{raw_data}",
)
print(report)
if __name__ == "__main__":
asyncio.run(main())
Two Ways to Run¶
mesh.run_task(agent=..., task=...)runs one task on one agent. Use it for single asks and hand-rolled pipelines where your code decides what happens between steps.mesh.workflow(id, steps)runs declared steps as one traced unit: ordering, dependencies, retries, and a single workflow id. Use it when steps belong together.
Rule of thumb: passing one agent's output into another agent's prompt by hand means you want workflow. See Workflow DAGs.
Next Steps¶
Once you have a working agent, add infrastructure incrementally based on your requirements.
Add persistent memory so agents retain context across runs:
Add cross-session semantic memory with Athena:
Add third-party service credentials for agents that call external APIs:
jarviscore nexus init
jarviscore nexus register github --client-id=YOUR_ID --client-secret=YOUR_SECRET
Enable multi-node distributed execution with P2P:
See the Configuration Reference for the complete list of environment variables and their defaults.