# Database Connection (REQUIRED)# Format: postgresql://user:password@host:port/databaseDB_URL=postgresql://postgres:your-password@localhost:54322/postgres# Hugging Face Token (OPTIONAL - for gated models)HF_TOKEN=# MCP Server Credentials (OPTIONAL - for tool integrations)GOOGLE_OAUTH_CREDENTIALS=GOOGLE_CALENDAR_MCP_TOKEN_PATH=BRAVE_API_KEY=# OpenAI API Key (REQUIRED by mem0, but can be placeholder)OPENAI_API_KEY=sk-placeholder
The DB_URL environment variable is required. ARKOS uses PostgreSQL for storing conversation context and Supabase for vector memory.
from openai import OpenAIclient = OpenAI( base_url="http://localhost:1111/v1", api_key="not-needed" # Local deployment)response = client.chat.completions.create( model="ark-agent", messages=[ {"role": "user", "content": "Hello! What can you help me with?"} ])print(response.choices[0].message.content)
stream = client.chat.completions.create( model="ark-agent", messages=[{"role": "user", "content": "Tell me about ARKOS"}], stream=True)for chunk in stream: if chunk.choices[0].delta.content: print(chunk.choices[0].delta.content, end="")
State Graph Configuration (state_module/state_graph.yaml)
Copy
initial: agent_replystates: ask_user: description: "state used for input from user" type: user transition: next: [agent_reply] agent_reply: description: "state used for your reasoning" type: agent transition: next: [ask_user, use_tool] use_tool: description: "state used for tool use" type: tool transition: next: [agent_reply]