Connect Railway to Toolspoke
Manage Railway projects, services, deployments, logs and variables. Toolspoke gives your agents 15 of its actions, and you decide which ones each project allows.
- Connection
- Provider REST API
- Authentication
- API token
- Actions exposed
- 15
- What a call bills
- Nothing
- Adapter
- Maintained by Toolspoke
- Category
- Infrastructure
Connected in three steps
Install Railway
Open the marketplace in your workspace, add Railway to the project your agents work in, and it appears on the gateway immediately.
Connect the credential
Provide the credential Railway asks for. Where to get it, and what it has to be able to reach, is the next section.
Give it to an agent
Describe the job in one sentence and the builder proposes the instructions, the toolkits it needs, a schedule and where it should answer, or start from a catalogue agent. It can use every Railway action the project leaves on.
Where the agent answers
Slack
Ask it in a channel or a thread, and it replies in the thread it was asked in.
Email
Email it. Each write waits for a person's go-ahead unless that action is allowed in advance.
GitHub
Mention it on a pull request, and it answers there.
Schedule
A routine wakes it on a schedule, or when a new item matches.
Any agent in the project can use Railway, and only the actions the project leaves on.
What Railway asks for
API token. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.
- API tokenRequired
- Railway → Account Settings → Tokens → Create Token. Leave the workspace empty for an account token that reaches every workspace you belong to, or choose one workspace to limit it. Project tokens are not accepted here.
- xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
What an agent can do in Railway
15 actions, each one declared by name in the connector. A workspace policy grants a person all of them, a hand-picked selection, everything on the read side, everything on the write side, or none.
9 read, 3 write, 3 destructive
Reads
9Fetches data and changes nothing.
get_meReturn the user an account token belongs to, with the workspaces they can reach. A workspace token has no user, so this fails for one; use list_projects instead.
list_projectsList projects with their id, name and workspace. Takes no required arguments, which is why an install tests itself with it. Pass workspace_id to list one workspace's projects.
get_projectRead one project with its environments and services. The environment and service ids here are what the deployment, log and variable actions take.
get_serviceRead one service by id.
list_deploymentsList deployments, newest first, narrowed to a project, environment or service. Shows each one's status (SUCCESS, FAILED, CRASHED, BUILDING …) and URL.
get_deploymentRead one deployment, with its status and whether it can be redeployed or rolled back to.
get_deployment_logsRead a deployment's runtime logs. Logs can contain user data and secrets the app printed, so the response is never written to the audit log.
get_build_logsRead a deployment's build logs. The first call when a deployment FAILED before it started. Never written to the audit log.
list_variablesReturn the variables of a service in an environment as a name-to-value map, or the environment's shared variables when service_id is omitted. Values are secrets, so the response is never written to the audit log.
Writes
3Creates or updates something on the other side.
upsert_variableCreate or update one variable on a service, or a shared one when service_id is omitted. Railway redeploys the affected services unless skip_deploys is true. The value is masked in the audit log.
redeploy_serviceRedeploy a service's latest deployment in an environment, with the same code. Use it to pick up changed variables.
restart_deploymentRestart a running deployment's containers without rebuilding. Requests in flight are dropped while it restarts.
Destructive
3Deletes or permanently alters something. Worth granting on purpose.
delete_variableDelete one variable. Destructive because its value is gone and the next deployment runs without it.
rollback_deploymentMake an earlier deployment live again. Destructive because it changes the code serving traffic at once.
cancel_deploymentCancel a deployment that is still building or deploying. Destructive because it cannot be resumed.
What it will not do
The gateway enforces each of these, so they can be stated flatly.
- It cannot call anything else
- The 15 actions above are the whole of it. A call to any other name is refused before it reaches Railway rather than forwarded on, and connecting your account does not add to the list: it is fixed by the connector, not discovered at run time.
- It reaches no further than your credential
- Toolspoke holds no access to Railway of its own. Every call carries the credential you stored and nothing besides, so whatever that credential cannot reach, this connector cannot reach either.
- It never hears from Railway
- Nothing is pushed to it. There is no webhook, no subscription and no polling, so this connector cannot notice by itself that something changed in Railway. An agent has to ask.
- It does not smooth over provider limits
- Toolspoke does not retry, queue or back off around Railway's own rate limits. A call that Railway refuses comes back to the agent as a failed call.
Before you connect it
What can an agent do in Railway?
15 named actions: 9 that only read, 3 that write and 3 that delete or permanently alter something. They include get_me, list_projects and get_project. Nothing outside that list is reachable: the connector declares each operation by name rather than proxying whatever an agent asks for.
What credentials does the Railway connector need?
API token. The connector asks for api token. Values are encrypted at rest and attached to the outbound request by the gateway, so they are never part of the arguments an agent sends and never reach the audit log.
How does an agent get to use Railway?
Install Railway in a project and every agent in that project can use the actions the project leaves on. Describe a job in one sentence and the builder proposes the instructions, the toolkits it needs, a schedule and where it should answer, or start from a catalogue agent. The agent answers when someone asks it in Slack, emails it or mentions it on a GitHub pull request, or when its routine wakes it.
What does the Railway connector not do?
The 15 actions above are the whole of it. A call to any other name is refused before it reaches Railway rather than forwarded on, and connecting your account does not add to the list: it is fixed by the connector, not discovered at run time. Toolspoke holds no access to Railway of its own. Every call carries the credential you stored and nothing besides, so whatever that credential cannot reach, this connector cannot reach either. Nothing is pushed to it. There is no webhook, no subscription and no polling, so this connector cannot notice by itself that something changed in Railway. An agent has to ask. Toolspoke does not retry, queue or back off around Railway's own rate limits. A call that Railway refuses comes back to the agent as a failed call.
Can I limit which actions an agent can call?
Yes, in two places. The project switches Railway's actions on and off one at a time, for everyone in the project at once, and the screen groups them by read, write and destructive so turning off everything that deletes is one click. An individual agent key can then be narrowed further, to particular toolkits in a project and to particular actions in a toolkit. Whatever it was granted, a key never reaches a project its owner cannot.
What gets recorded when an agent calls Railway?
Every attempt, with the agent that made it and the person that agent belongs to, the full request payload, the response payload, the status, the duration, and what the call cost in sandbox time and model tokens. Values whose key names a secret are masked out before the record is shown to anyone. An operation the connector marks as not retained never has its response body written at all, so the gateway keeps no second copy of what was read.